List of usage examples for org.eclipse.jface.viewers ViewerLabel hasNewBackground
public boolean hasNewBackground()
From source file:org.neuro4j.studio.debug.ui.views.StructuredViewer.java
License:Apache License
/** * Build a label up for the element using the supplied label provider. * /*from ww w . j a v a 2 s. c o m*/ * @param updateLabel * The ViewerLabel to collect the result in * @param element * The element being decorated. */ protected void buildLabel(ViewerLabel updateLabel, Object element) { if (getLabelProvider() instanceof IViewerLabelProvider) { IViewerLabelProvider itemProvider = (IViewerLabelProvider) getLabelProvider(); itemProvider.updateLabel(updateLabel, element); colorAndFontCollector.setUsedDecorators(); if (updateLabel.hasNewBackground()) { colorAndFontCollector.setBackground(updateLabel.getBackground()); } if (updateLabel.hasNewForeground()) { colorAndFontCollector.setForeground(updateLabel.getForeground()); } if (updateLabel.hasNewFont()) { colorAndFontCollector.setFont(updateLabel.getFont()); } return; } if (getLabelProvider() instanceof ILabelProvider) { ILabelProvider labelProvider = (ILabelProvider) getLabelProvider(); updateLabel.setText(labelProvider.getText(element)); updateLabel.setImage(labelProvider.getImage(element)); } }
From source file:org.neuro4j.studio.debug.ui.views.StructuredViewer.java
License:Apache License
/** * Build a label up for the element using the supplied label provider. * //from w w w .j ava 2 s. co m * @param updateLabel * The ViewerLabel to collect the result in * @param element * The element being decorated. * @param labelProvider * ILabelProvider the labelProvider for the receiver. */ void buildLabel(ViewerLabel updateLabel, Object element, IViewerLabelProvider labelProvider) { labelProvider.updateLabel(updateLabel, element); colorAndFontCollector.setUsedDecorators(); if (updateLabel.hasNewBackground()) { colorAndFontCollector.setBackground(updateLabel.getBackground()); } if (updateLabel.hasNewForeground()) { colorAndFontCollector.setForeground(updateLabel.getForeground()); } if (updateLabel.hasNewFont()) { colorAndFontCollector.setFont(updateLabel.getFont()); } }
From source file:org.neuro4j.studio.debug.ui.views.StructuredViewer.java
License:Apache License
/** * Build a label up for the element using the supplied label provider. * // w ww.j av a 2s .c o m * @param updateLabel * The ViewerLabel to collect the result in * @param elementPath * The path of the element being decorated. * @param labelProvider * ILabelProvider the labelProvider for the receiver. */ void buildLabel(ViewerLabel updateLabel, TreePath elementPath, ITreePathLabelProvider labelProvider) { labelProvider.updateLabel(updateLabel, elementPath); colorAndFontCollector.setUsedDecorators(); if (updateLabel.hasNewBackground()) { colorAndFontCollector.setBackground(updateLabel.getBackground()); } if (updateLabel.hasNewForeground()) { colorAndFontCollector.setForeground(updateLabel.getForeground()); } if (updateLabel.hasNewFont()) { colorAndFontCollector.setFont(updateLabel.getFont()); } }