List of usage examples for org.eclipse.jface.preference JFacePreferences COUNTER_COLOR
String COUNTER_COLOR
To view the source code for org.eclipse.jface.preference JFacePreferences COUNTER_COLOR.
Click Source Link
From source file:com.google.dart.tools.search.internal.ui.text.DecoratingFileSearchLabelProvider.java
License:Open Source License
public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR) || property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(HIGHLIGHT_BG_COLOR_NAME) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) { Display.getDefault().asyncExec(new Runnable() { public void run() { refresh();/* ww w . j a v a2 s. com*/ } }); } }
From source file:com.google.dart.tools.ui.internal.viewsupport.ColoredViewersManager.java
License:Open Source License
@Override public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(QUALIFIER_COLOR_NAME) || property.equals(COUNTER_COLOR_NAME) || property.equals(DECORATIONS_COLOR_NAME) || property.equals(AppearancePreferencePage.PREF_COLORED_LABELS) || property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR) || property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(HIGHLIGHT_BG_COLOR_NAME) || property.equals(HIGHLIGHT_WRITE_BG_COLOR_NAME) || property.equals(INHERITED_COLOR_NAME) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) { Display.getDefault().asyncExec(new Runnable() { @Override//from www . jav a2 s. c om public void run() { refreshAllViewers(); } }); } }
From source file:com.mentor.nucleus.bp.ui.search.providers.DecoratingModelSearchLabelProvider.java
License:Open Source License
@Override public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR) || property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(HIGHLIGHT_BG_COLOR_NAME) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) { Display.getDefault().asyncExec(new Runnable() { public void run() { refresh();/*from ww w. ja va 2s . co m*/ } }); } }
From source file:com.technophobia.substeps.junit.ui.component.ColoredViewersManager.java
License:Open Source License
@Override public void propertyChange(final PropertyChangeEvent event) { final String property = event.getProperty(); if (property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR) || property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(HIGHLIGHT_BG_COLOR_NAME) || property.equals(HIGHLIGHT_WRITE_BG_COLOR_NAME) || property.equals(INHERITED_COLOR_NAME) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) { Display.getDefault().asyncExec(new Runnable() { @Override//w w w. j a v a2s . co m public void run() { updateAllViewers(); } }); } }
From source file:eu.esdihumboldt.hale.ui.common.graph.figures.EntityFigure.java
License:Open Source License
/** * Create a entity figure./*from w w w . ja v a 2 s . com*/ * * @param painter the shape * @param contextText the context text, may be <code>null</code> * @param cardinalityText the cardinality text, may be <code>null</code> * @param customFont a custom font to use, may be <code>null</code> */ public EntityFigure(ShapePainter painter, final String contextText, final String cardinalityText, final Font customFont) { super(painter, customFont); setAntialias(SWT.ON); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 1; if (cardinalityText != null) gridLayout.numColumns++; if (contextText != null) gridLayout.numColumns++; gridLayout.marginHeight = 3; gridLayout.marginWidth = 3; gridLayout.makeColumnsEqualWidth = true; setLayoutManager(gridLayout); // the label for the label provider text and image Label label = new EndSubTextLabel(); GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true); add(label, gridData); // the additional label for the cardinality text if (cardinalityText != null) { Label cardLabel = new Label(); ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); // XXX uses the same color as in schema explorer label provider - // centralize this? cardLabel.setForegroundColor(colorRegistry.get(JFacePreferences.COUNTER_COLOR)); if (customFont != null) { cardLabel.setFont(customFont); } cardLabel.setText(cardinalityText); GridData cardGridData = new GridData(GridData.END, GridData.CENTER, false, true); add(cardLabel, cardGridData); } // the additional label for the context text if (contextText != null) { Label contextLabel = new Label(); ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); // XXX uses the same color as in schema explorer label provider - // centralize this? contextLabel.setForegroundColor(colorRegistry.get(JFacePreferences.DECORATIONS_COLOR)); if (customFont != null) { contextLabel.setFont(customFont); } contextLabel.setText(contextText); contextLabel.setToolTip(new Label(contextText)); GridData contextGridData = new GridData(GridData.END, GridData.CENTER, true, true); add(contextLabel, contextGridData); } setTextLabel(label); setIconLabel(label); }
From source file:ext.org.eclipse.jdt.internal.ui.viewsupport.ColoredViewersManager.java
License:Open Source License
public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR) || property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(HIGHLIGHT_BG_COLOR_NAME) || property.equals(HIGHLIGHT_WRITE_BG_COLOR_NAME) || property.equals(INHERITED_COLOR_NAME) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) { Display.getDefault().asyncExec(new Runnable() { public void run() { updateAllViewers();//from w w w . j a v a 2 s.c o m } }); } }
From source file:org.eclipse.cdt.internal.ui.viewsupport.ColoredViewersManager.java
License:Open Source License
@Override public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR) || property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(HIGHLIGHT_BG_COLOR_NAME) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS) || property.equals(HIGHLIGHT_WRITE_BG_COLOR_NAME)) { Display.getDefault().asyncExec(new Runnable() { @Override/*from ww w . j a v a 2 s . c o m*/ public void run() { refreshAllViewers(); } }); } }
From source file:org.eclipse.ease.ui.modules.ui.DecoratedLabelProvider.java
License:Open Source License
@Override public void propertyChange(final PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR) || property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) { Display.getDefault().asyncExec(new Runnable() { @Override/* ww w. j ava2s .c om*/ public void run() { refresh(); } }); } }
From source file:org.eclipse.jface.snippets.viewers.Snippet049StyledCellLabelProvider.java
License:Open Source License
public static void main(String[] args) { JFaceResources.getColorRegistry().put(JFacePreferences.COUNTER_COLOR, new RGB(0, 127, 174)); Shell shell = new Shell(DISPLAY, SWT.CLOSE | SWT.RESIZE); shell.setSize(SHELL_WIDTH, 400);//from w ww . ja v a 2 s . c o m shell.setLayout(new GridLayout(1, false)); Snippet049StyledCellLabelProvider example = new Snippet049StyledCellLabelProvider(); Control composite = example.createPartControl(shell); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); shell.open(); while (!shell.isDisposed()) { if (!DISPLAY.readAndDispatch()) { DISPLAY.sleep(); } } DISPLAY.dispose(); }
From source file:org.eclipse.jface.snippets.viewers.Snippet050DelegatingStyledCellLabelProvider.java
License:Open Source License
public static void main(String[] args) { JFaceResources.getColorRegistry().put(JFacePreferences.COUNTER_COLOR, new RGB(0, 127, 174)); Shell shell = new Shell(DISPLAY, SWT.CLOSE | SWT.RESIZE); shell.setSize(SHELL_WIDTH, 300);// w w w . j a v a 2 s . com shell.setLayout(new GridLayout(1, false)); Snippet050DelegatingStyledCellLabelProvider example = new Snippet050DelegatingStyledCellLabelProvider(); example.createPartControl(shell); shell.open(); while (!shell.isDisposed()) { if (!DISPLAY.readAndDispatch()) { DISPLAY.sleep(); } } DISPLAY.dispose(); }