diff options
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java')
-rw-r--r-- | bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java deleted file mode 100644 index 0b6645612..000000000 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.team.internal.ui.synchronize; - -import org.eclipse.jface.viewers.*; -import org.eclipse.swt.graphics.*; - -class MultiLabelDecorator extends LabelProvider implements ILabelDecorator, IFontDecorator, IColorDecorator { - private ILabelDecorator[] decorators; - - public MultiLabelDecorator(ILabelDecorator[] decorators) { - this.decorators = decorators; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object) - */ - public Image decorateImage(Image image, Object element) { - for (int i = 0; i < decorators.length; i++) { - ILabelDecorator decorator = decorators[i]; - Image newImage = decorator.decorateImage(image, element); - if (newImage != null) { - image = newImage; - } - } - return image; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object) - */ - public String decorateText(String text, Object element) { - for (int i = 0; i < decorators.length; i++) { - ILabelDecorator decorator = decorators[i]; - String newText = decorator.decorateText(text, element); - if (newText != null) { - text = newText; - } - } - return text; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() - */ - public void dispose() { - for (int i = 0; i < decorators.length; i++) { - ILabelDecorator d = decorators[i]; - d.dispose(); - } - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IFontDecorator#decorateFont(java.lang.Object) - */ - public Font decorateFont(Object element) { - for (int i = 0; i < decorators.length; i++) { - ILabelDecorator decorator = decorators[i]; - if(decorator instanceof IFontDecorator) { - return ((IFontDecorator)decorator).decorateFont(element); - } - } - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IColorDecorator#decorateForeground(java.lang.Object) - */ - public Color decorateForeground(Object element) { - for (int i = 0; i < decorators.length; i++) { - ILabelDecorator decorator = decorators[i]; - if(decorator instanceof IColorDecorator) { - return ((IColorDecorator)decorator).decorateForeground(element); - } - } - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IColorDecorator#decorateBackground(java.lang.Object) - */ - public Color decorateBackground(Object element) { - for (int i = 0; i < decorators.length; i++) { - ILabelDecorator decorator = decorators[i]; - if(decorator instanceof IColorDecorator) { - return ((IColorDecorator)decorator).decorateBackground(element); - } - } - return null; - } -}
\ No newline at end of file |