/** * Constructor. * * @param labelProvider * the {@link ILabelProvider} to decorate * @param labelDecorator * the {@link ILabelDecorator} adding decoration */ public DecoratingColumLabelProvider(ILabelProvider labelProvider, ILabelDecorator labelDecorator) { this.labelProvider = labelProvider; if (labelProvider instanceof IFontProvider) { this.fontProvider = (IFontProvider)labelProvider; } else { this.fontProvider = null; } if (labelProvider instanceof IColorProvider) { this.colorProvider = (IColorProvider)labelProvider; } else { this.colorProvider = null; } this.labelDecorator = labelDecorator; if (labelDecorator instanceof CellLabelProvider) { this.cellLabelProvider = (CellLabelProvider)labelDecorator; } else { this.cellLabelProvider = null; } }
public Color getForeground(Object element) { ILabelDecorator colorProvider = getLabelDecorator(); if (colorProvider instanceof IColorProvider) { return ((IColorProvider) colorProvider).getForeground(element); } // Default return null; }
public Color getBackground(Object element) { ILabelDecorator colorProvider = getLabelDecorator(); if (colorProvider instanceof IColorProvider) { return ((IColorProvider) colorProvider).getBackground(element); } // Default return null; }
private Color getBackground(Object element) { if (element instanceof ItemsListSeparator) { return null; } if (provider instanceof IColorProvider) { return ((IColorProvider) provider).getBackground(element); } return null; }
private Color getForeground(Object element) { if (element instanceof ItemsListSeparator) { return Display.getCurrent().getSystemColor( SWT.COLOR_WIDGET_NORMAL_SHADOW); } if (provider instanceof IColorProvider) { return ((IColorProvider) provider).getForeground(element); } return null; }
@Override public Color getForeground(Object element) { if (wrappedLabelProvider instanceof IColorProvider) { return ((IColorProvider) wrappedLabelProvider).getForeground(element); } return null; }
@Override public Color getBackground(Object element) { if (wrappedLabelProvider instanceof IColorProvider) { return ((IColorProvider) wrappedLabelProvider).getBackground(element); } return null; }
public Color getForeground(Object element) { if (disabled || !invasiveThemesEnabled()) { if (wrapped instanceof IColorProvider) { return ((IColorProvider) wrapped).getForeground(element); } return null; } return getThemeManager().getCurrentTheme().getForegroundColor(); }
@Override public IColorProvider getColorProvider(){ return fileLabelProvider; }
@Override public IColorProvider getColorProvider(){ return labelProvider; }
@Override public IColorProvider getColorProvider(){ // TODO Auto-generated method stub return null; }
@Override public IColorProvider getColorProvider(){ return null; }
/** * ColorProvider used by the outbox viewer. * * @return IColorProvider or null */ public IColorProvider getColorProvider();
/** * ColorProvider used by the inbox viewer. * * @return IColorProvider or null */ public IColorProvider getColorProvider();