org.eclipse.jface.preference.ColorSelector Java Examples
The following examples show how to use
org.eclipse.jface.preference.ColorSelector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SWTFactory.java From xds-ide with Eclipse Public License 1.0 | 5 votes |
public static ColorSelector createColorSelector(Composite composite, int hspan) { ColorSelector cs = new ColorSelector(composite); GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); gd.horizontalSpan = hspan; cs.getButton().setLayoutData(gd); return cs; }
Example #2
Source File: RuleDialog.java From LogViewer with Eclipse Public License 2.0 | 5 votes |
private void createBackgroundColorSelector(Composite parent) { // Fix for issue 38: Cannot enter colors using Mac OS X createEmptyTable(parent,2); // draw label Label label = new Label(parent,SWT.LEFT); label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); label.setText(LogViewerPlugin.getResourceString("preferences.ruleseditor.dialog.background.label")); //$NON-NLS-1$ // draw selector backgroundColorSelector = new ColorSelector(parent); backgroundColorSelector.setColorValue(new RGB(255,255,255)); backgroundColorSelector.getButton().setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); if(edit) { backgroundColorSelector.setColorValue(this.data.getBackgroundColor()); } }
Example #3
Source File: RuleDialog.java From LogViewer with Eclipse Public License 2.0 | 5 votes |
private void createForegroundColorSelector(Composite parent) { // Fix for issue 38: Cannot enter colors using Mac OS X createEmptyTable(parent,2); // draw label Label label = new Label(parent,SWT.LEFT); label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); label.setText(LogViewerPlugin.getResourceString("preferences.ruleseditor.dialog.foreground.label")); //$NON-NLS-1$ // draw selector foregroundColorSelector = new ColorSelector(parent); foregroundColorSelector.setColorValue(new RGB(0,0,0)); foregroundColorSelector.getButton().setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); if(edit) { foregroundColorSelector.setColorValue(this.data.getForegroundColor()); } }
Example #4
Source File: BoxSettingsTab.java From gama with GNU General Public License v3.0 | 5 votes |
protected void updateBackground(final ColorSelector ctrl, final Color c) { if (c == null) { genGradientBut.setEnabled(false); } else { ctrl.setColorValue(c.getRGB()); } }
Example #5
Source File: ColorField.java From goclipse with Eclipse Public License 1.0 | 4 votes |
public ColorSelector getColorSelector() { return colorSelector; }