org.eclipse.ui.forms.FormColors Java Examples
The following examples show how to use
org.eclipse.ui.forms.FormColors.
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: ScrolledPageContent.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
public ScrolledPageContent(Composite parent, int style) { super(parent, style); setFont(parent.getFont()); FormColors colors = new FormColors(parent.getDisplay()); colors.setBackground(null); colors.setForeground(null); fToolkit = new FormToolkit(colors); setExpandHorizontal(true); setExpandVertical(true); Composite body = new Composite(this, SWT.NONE); body.setFont(parent.getFont()); setContent(body); }
Example #2
Source File: AppEngineDeployPreferencesPanel.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
public AppEngineDeployPreferencesPanel(Composite parent, IProject project, IGoogleLoginService loginService, Runnable layoutChangedHandler, boolean requireValues, ProjectRepository projectRepository, DeployPreferences model) { super(parent, SWT.NONE); this.project = project; this.layoutChangedHandler = Preconditions.checkNotNull(layoutChangedHandler); this.requireValues = requireValues; this.projectRepository = projectRepository; this.model = model; FormColors colors = new FormColors(getDisplay()); colors.setBackground(null); colors.setForeground(null); formToolkit = new FormToolkit(colors); createCredentialSection(loginService); createProjectIdSection(); setupAccountEmailDataBinding(); setupProjectSelectorDataBinding(); createCenterArea(); createAdvancedSection(); setupTextFieldDataBinding(bucket, "bucket", new BucketNameValidator()); observables.addObservablesFromContext(bindingContext, true, true); Dialog.applyDialogFont(this); GridLayoutFactory.swtDefaults().numColumns(2).applyTo(this); }
Example #3
Source File: BreadcrumbItemDropDown.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private Color createColor(int color1, int color2, int ratio, Display display) { RGB rgb1= display.getSystemColor(color1).getRGB(); RGB rgb2= display.getSystemColor(color2).getRGB(); RGB blend= FormColors.blend(rgb2, rgb1, ratio); return new Color(display, blend); }
Example #4
Source File: BreadcrumbViewer.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private Color createColor(int color1, int color2, int ratio, Display display) { RGB rgb1= display.getSystemColor(color1).getRGB(); RGB rgb2= display.getSystemColor(color2).getRGB(); RGB blend= FormColors.blend(rgb2, rgb1, ratio); return new Color(display, blend); }
Example #5
Source File: BreadcrumbItemDropDown.java From birt with Eclipse Public License 1.0 | 5 votes |
private Color createColor( int color1, int color2, int ratio, Display display ) { RGB rgb1 = display.getSystemColor( color1 ).getRGB( ); RGB rgb2 = display.getSystemColor( color2 ).getRGB( ); RGB blend = FormColors.blend( rgb2, rgb1, ratio ); return new Color( display, blend ); }
Example #6
Source File: BreadcrumbViewer.java From birt with Eclipse Public License 1.0 | 5 votes |
private Color createColor( int color1, int color2, int ratio, Display display ) { RGB rgb1 = display.getSystemColor( color1 ).getRGB( ); RGB rgb2 = display.getSystemColor( color2 ).getRGB( ); RGB blend = FormColors.blend( rgb2, rgb1, ratio ); return new Color( display, blend ); }
Example #7
Source File: TabbedPropertyList.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public void setWidgetBackgroundColor(Color color) { widgetBackground = color; RGB black = Display.getCurrent().getSystemColor(SWT.COLOR_BLACK).getRGB(); RGB white = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE).getRGB(); defaultGradientStart = factory.getColors().createColor("TabbedPropertyList.defaultTabGradientStart", //$NON-NLS-1$ FormColors.blend(widgetBackground.getRGB(), FormColors.blend(white, widgetNormalShadow.getRGB(), 20), 60)); defaultGradientEnd = factory.getColors().createColor("TabbedPropertyList.defaultTabGradientEnd", //$NON-NLS-1$ FormColors.blend(widgetBackground.getRGB(), widgetNormalShadow.getRGB(), 40)); bottomNavigationElementShadowStroke1 = factory.getColors().createColor("TabbedPropertyList.tabShadowStroke1", //$NON-NLS-1$ FormColors.blend(black, widgetBackground.getRGB(), 10)); bottomNavigationElementShadowStroke2 = factory.getColors().createColor("TabbedPropertyList.tabShadowStroke2", //$NON-NLS-1$ FormColors.blend(black, widgetBackground.getRGB(), 5)); hoverGradientStart = factory.getColors().createColor("TabbedPropertyList.hoverBackgroundGradientStart", //$NON-NLS-1$ FormColors.blend(white, widgetBackground.getRGB(), 20)); hoverGradientEnd = factory.getColors().createColor("TabbedPropertyList.hoverBackgroundGradientEnd", //$NON-NLS-1$ FormColors.blend(widgetNormalShadow.getRGB(), widgetBackground.getRGB(), 10)); indentedDefaultBackground = factory.getColors().createColor("TabbedPropertyList.indentedDefaultBackground", //$NON-NLS-1$ FormColors.blend(white, widgetBackground.getRGB(), 10)); indentedHoverBackground = factory.getColors().createColor("TabbedPropertyList.indentedHoverBackground", //$NON-NLS-1$ FormColors.blend(white, widgetBackground.getRGB(), 75)); }
Example #8
Source File: TabbedPropertyList.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public void setWidgetNormalShadowColor(Color color) { widgetNormalShadow = color; RGB white = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE).getRGB(); navigationElementShadowStroke = factory.getColors().createColor("TabbedPropertyList.shadowStroke", //$NON-NLS-1$ FormColors.blend(white, widgetNormalShadow.getRGB(), 55)); }
Example #9
Source File: TabbedPropertyTitle.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public void resetSectionToolBarColors() { TabbedPropertySheetWidgetFactory f = new TabbedPropertySheetWidgetFactory(); FormColors defaultColors = f.getColors(); defaultColors.initializeSectionToolBarColors(); FormColors colors = factory.getColors(); colors.createColor(IFormColors.H_GRADIENT_START, defaultColors.getColor(IFormColors.H_GRADIENT_START).getRGB()); colors.createColor(IFormColors.H_GRADIENT_END, defaultColors.getColor(IFormColors.H_GRADIENT_END).getRGB()); colors.createColor(IFormColors.H_BOTTOM_KEYLINE1, defaultColors.getColor(IFormColors.H_BOTTOM_KEYLINE1).getRGB()); colors.createColor(IFormColors.H_BOTTOM_KEYLINE2, defaultColors.getColor(IFormColors.H_BOTTOM_KEYLINE2).getRGB()); }
Example #10
Source File: TAEConfiguratorPlugin.java From uima-uimaj with Apache License 2.0 | 5 votes |
/** * On first call, gets a formColors instance; on subsequent calls, returns that instance. * * @param display the display * @return a formColors instance */ public FormColors getFormColors(Display display) { if (null == formColors) { FormColors tempToAvoidSyncIssues = new FormColors(display); tempToAvoidSyncIssues.markShared(); // keep it from being disposed early formColors = tempToAvoidSyncIssues; } return formColors; }
Example #11
Source File: TabbedPropertyList.java From birt with Eclipse Public License 1.0 | 4 votes |
/** * Initialize the colours used. */ private void initColours( ) { /* * Colour 3 COLOR_LIST_BACKGROUND */ listBackground = Display.getCurrent( ) .getSystemColor( SWT.COLOR_LIST_BACKGROUND ); /* * Colour 13 COLOR_WIDGET_BACKGROUND */ widgetBackground = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_BACKGROUND ); /* * Colour 15 COLOR_WIDGET_DARK_SHADOW */ widgetDarkShadow = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_DARK_SHADOW ); /* * Colour 16 COLOR_WIDGET_FOREGROUND */ widgetForeground = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_FOREGROUND ); /* * Colour 19 COLOR_WIDGET_NORMAL_SHADOW */ widgetNormalShadow = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_NORMAL_SHADOW ); RGB infoBackground = Display.getCurrent( ) .getSystemColor( SWT.COLOR_INFO_BACKGROUND ) .getRGB( ); RGB white = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WHITE ) .getRGB( ); RGB black = Display.getCurrent( ) .getSystemColor( SWT.COLOR_BLACK ) .getRGB( ); /* * gradient in the default tab: start colour WIDGET_NORMAL_SHADOW 100% + * white 20% + INFO_BACKGROUND 60% end colour WIDGET_NORMAL_SHADOW 100% * + INFO_BACKGROUND 40% */ defaultGradientStart = factory.getColors( ) .createColor( "TabbedPropertyList.defaultTabGradientStart", //$NON-NLS-1$ FormColors.blend( infoBackground, FormColors.blend( white, widgetNormalShadow.getRGB( ), 20 ), 60 ) ); defaultGradientEnd = factory.getColors( ) .createColor( "TabbedPropertyList.defaultTabGradientEnd", //$NON-NLS-1$ FormColors.blend( infoBackground, widgetNormalShadow.getRGB( ), 40 ) ); navigationElementShadowStroke = factory.getColors( ) .createColor( "TabbedPropertyList.shadowStroke", //$NON-NLS-1$ FormColors.blend( white, widgetNormalShadow.getRGB( ), 55 ) ); bottomNavigationElementShadowStroke1 = factory.getColors( ) .createColor( "TabbedPropertyList.tabShadowStroke1", //$NON-NLS-1$ FormColors.blend( black, widgetBackground.getRGB( ), 10 ) ); bottomNavigationElementShadowStroke2 = factory.getColors( ) .createColor( "TabbedPropertyList.tabShadowStroke2", //$NON-NLS-1$ FormColors.blend( black, widgetBackground.getRGB( ), 5 ) ); /* * gradient in the hover tab: start colour WIDGET_BACKGROUND 100% + * white 20% end colour WIDGET_BACKGROUND 100% + WIDGET_NORMAL_SHADOW * 10% */ hoverGradientStart = factory.getColors( ) .createColor( "TabbedPropertyList.hoverBackgroundGradientStart", //$NON-NLS-1$ FormColors.blend( white, widgetBackground.getRGB( ), 20 ) ); hoverGradientEnd = factory.getColors( ) .createColor( "TabbedPropertyList.hoverBackgroundGradientEnd", //$NON-NLS-1$ FormColors.blend( widgetNormalShadow.getRGB( ), widgetBackground.getRGB( ), 10 ) ); indentedDefaultBackground = factory.getColors( ) .createColor( "TabbedPropertyList.indentedDefaultBackground", //$NON-NLS-1$ FormColors.blend( white, widgetBackground.getRGB( ), 10 ) ); indentedHoverBackground = factory.getColors( ) .createColor( "TabbedPropertyList.indentedHoverBackground", //$NON-NLS-1$ FormColors.blend( white, widgetBackground.getRGB( ), 75 ) ); }
Example #12
Source File: AccordionPropertyList.java From birt with Eclipse Public License 1.0 | 4 votes |
/** * Initialize the colours used. */ private void initColours( ) { /* * Colour 3 COLOR_LIST_BACKGROUND */ listBackground = Display.getCurrent( ) .getSystemColor( SWT.COLOR_LIST_BACKGROUND ); /* * Colour 13 COLOR_WIDGET_BACKGROUND */ widgetBackground = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_BACKGROUND ); /* * Colour 16 COLOR_WIDGET_FOREGROUND */ widgetForeground = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_FOREGROUND ); /* * Colour 19 COLOR_WIDGET_NORMAL_SHADOW */ widgetNormalShadow = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_NORMAL_SHADOW ); RGB white = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WHITE ) .getRGB( ); /* * Mimic palette view look and feel. */ defaultGradientStart = factory.getColors( ) .createColor( "TabbedPropertyList.defaultTabGradientStart", //$NON-NLS-1$ FormColors.blend( ColorConstants.button.getRGB( ), ColorConstants.listBackground.getRGB( ), 85 ) ); defaultGradientEnd = factory.getColors( ) .createColor( "TabbedPropertyList.defaultTabGradientEnd", //$NON-NLS-1$ FormColors.blend( ColorConstants.button.getRGB( ), ColorConstants.buttonDarker.getRGB( ), 45 ) ); /* * gradient in the hover tab: start colour WIDGET_BACKGROUND 100% + * white 20% end colour WIDGET_BACKGROUND 100% + WIDGET_NORMAL_SHADOW * 10% */ hoverGradientStart = factory.getColors( ) .createColor( "TabbedPropertyList.hoverBackgroundGradientStart", //$NON-NLS-1$ FormColors.blend( white, widgetBackground.getRGB( ), 20 ) ); hoverGradientEnd = factory.getColors( ) .createColor( "TabbedPropertyList.hoverBackgroundGradientEnd", //$NON-NLS-1$ FormColors.blend( widgetNormalShadow.getRGB( ), widgetBackground.getRGB( ), 10 ) ); indentedDefaultBackground = factory.getColors( ) .createColor( "TabbedPropertyList.indentedDefaultBackground", //$NON-NLS-1$ FormColors.blend( white, widgetBackground.getRGB( ), 10 ) ); indentedHoverBackground = factory.getColors( ) .createColor( "TabbedPropertyList.indentedHoverBackground", //$NON-NLS-1$ FormColors.blend( white, widgetBackground.getRGB( ), 75 ) ); }
Example #13
Source File: TabbedPropertyList.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
/** * Initialize the colours used in the list. */ public void initColours() { /* * Colour 3 COLOR_LIST_BACKGROUND */ listBackground = Display.getCurrent().getSystemColor( SWT.COLOR_LIST_BACKGROUND); /* * Colour 13 COLOR_WIDGET_BACKGROUND */ widgetBackground = Display.getCurrent().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND); /* * Colour 15 COLOR_WIDGET_DARK_SHADOW */ widgetDarkShadow = Display.getCurrent().getSystemColor( SWT.COLOR_WIDGET_DARK_SHADOW); /* * Colour 16 COLOR_WIDGET_FOREGROUND */ widgetForeground = Display.getCurrent().getSystemColor( SWT.COLOR_WIDGET_FOREGROUND); /* * Colour 19 COLOR_WIDGET_NORMAL_SHADOW */ widgetNormalShadow = Display.getCurrent().getSystemColor( SWT.COLOR_WIDGET_NORMAL_SHADOW); RGB white = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE) .getRGB(); RGB black = Display.getCurrent().getSystemColor(SWT.COLOR_BLACK) .getRGB(); /* * gradient in the default tab: start colour WIDGET_NORMAL_SHADOW 100% + * white 20% + WIDGET_BACKGROUND 60% end colour WIDGET_NORMAL_SHADOW * 100% + WIDGET_BACKGROUND 40% */ defaultGradientStart = factory.getColors().createColor( "TabbedPropertyList.defaultTabGradientStart", //$NON-NLS-1$ FormColors.blend(widgetBackground.getRGB(), FormColors.blend(white, widgetNormalShadow.getRGB(), 20), 60)); defaultGradientEnd = factory.getColors().createColor( "TabbedPropertyList.defaultTabGradientEnd", //$NON-NLS-1$ FormColors.blend(widgetBackground.getRGB(), widgetNormalShadow.getRGB(), 40)); navigationElementShadowStroke = factory.getColors().createColor( "TabbedPropertyList.shadowStroke", //$NON-NLS-1$ FormColors.blend(white, widgetNormalShadow.getRGB(), 55)); bottomNavigationElementShadowStroke1 = factory.getColors().createColor( "TabbedPropertyList.tabShadowStroke1", //$NON-NLS-1$ FormColors.blend(black, widgetBackground.getRGB(), 10)); bottomNavigationElementShadowStroke2 = factory.getColors().createColor( "TabbedPropertyList.tabShadowStroke2", //$NON-NLS-1$ FormColors.blend(black, widgetBackground.getRGB(), 5)); /* * gradient in the hover tab: start colour WIDGET_BACKGROUND 100% + * white 20% end colour WIDGET_BACKGROUND 100% + WIDGET_NORMAL_SHADOW * 10% */ hoverGradientStart = factory.getColors().createColor( "TabbedPropertyList.hoverBackgroundGradientStart", //$NON-NLS-1$ FormColors.blend(white, widgetBackground.getRGB(), 20)); hoverGradientEnd = factory.getColors().createColor( "TabbedPropertyList.hoverBackgroundGradientEnd", //$NON-NLS-1$ FormColors.blend(widgetNormalShadow.getRGB(), widgetBackground .getRGB(), 10)); indentedDefaultBackground = factory.getColors().createColor( "TabbedPropertyList.indentedDefaultBackground", //$NON-NLS-1$ FormColors.blend(white, widgetBackground.getRGB(), 10)); indentedHoverBackground = factory.getColors().createColor( "TabbedPropertyList.indentedHoverBackground", //$NON-NLS-1$ FormColors.blend(white, widgetBackground.getRGB(), 75)); }