Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.ColorRegistry


   * @param manager
   * @param defaultColor
   * @return Font
   */
  public static Color getThemeColor(String key, ResourceManager manager, RGB defaultColor) {
    ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
    if (colorRegistry != null)
      return getColor(manager, colorRegistry.getColorDescriptor(key));

    return getColor(manager, defaultColor);
  }
View Full Code Here


   * @param key
   * @param defaultRGB
   * @return Font
   */
  public static RGB getThemeRGB(String key, RGB defaultRGB) {
    ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
    if (colorRegistry != null)
      return colorRegistry.getRGB(key);

    return defaultRGB;
  }
View Full Code Here

   * @param manager
   * @param defaultColor
   * @return Font
   */
  public static Color getThemeColor(String key, ResourceManager manager, RGB defaultColor) {
    ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
    if (colorRegistry != null)
      return getColor(manager, colorRegistry.getColorDescriptor(key));

    return getColor(manager, defaultColor);
  }
View Full Code Here

   * @param key
   * @param defaultRGB
   * @return Font
   */
  public static RGB getThemeRGB(String key, RGB defaultRGB) {
    ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
    if (colorRegistry != null)
      return colorRegistry.getRGB(key);

    return defaultRGB;
  }
View Full Code Here

   * @param manager
   * @param defaultColor
   * @return Font
   */
  public static Color getThemeColor(String key, ResourceManager manager, RGB defaultColor) {
    ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
    if (colorRegistry != null)
      return getColor(manager, colorRegistry.getColorDescriptor(key));

    return getColor(manager, defaultColor);
  }
View Full Code Here

   * @param key
   * @param defaultRGB
   * @return Font
   */
  public static RGB getThemeRGB(String key, RGB defaultRGB) {
    ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
    if (colorRegistry != null)
      return colorRegistry.getRGB(key);

    return defaultRGB;
  }
View Full Code Here

    {
        super.start( context );

        if ( colorRegistry == null )
        {
            colorRegistry = new ColorRegistry( getWorkbench().getDisplay() );
        }

        if ( ldifTemplateContextTypeRegistry == null )
        {
            ldifTemplateContextTypeRegistry = new ContributionContextTypeRegistry();
View Full Code Here

    private Control createResultsTabControl(Composite parent) {
        SashHighlightForm sashForm = new SashHighlightForm(parent, SWT.VERTICAL);
        sashForm.setSashWidth(6);

        ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
        Color sashColor = colorRegistry.get("org.eclipse.ui.workbench.ACTIVE_TAB_HIGHLIGHT_START");
        sashForm.setSashBackground(sashColor);
        sashForm.setSashForeground(sashColor);

        Composite cmpRequired = new Composite(sashForm, SWT.NONE);
        cmpRequired.setLayout(new GridLayout(2, false));
View Full Code Here

      fForegroundColorName = foregroundColorName;
      fBackgroundColorName = backgroundColorName;
    }

    public void applyStyles(TextStyle textStyle) {
      ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
      if (fForegroundColorName != null) {
        textStyle.foreground = colorRegistry.get(fForegroundColorName);
      }
      if (fBackgroundColorName != null) {
        textStyle.background = colorRegistry.get(fBackgroundColorName);
      }
    }
View Full Code Here

        ITheme theme = editor.getEditorSite().getWorkbenchWindow()
                .getWorkbench().getThemeManager().getCurrentTheme();
        Gradient g = new Gradient();

        ColorRegistry colorRegistry = theme.getColorRegistry();
        if (activePart) {
            g.fgColor = colorRegistry
                    .get(IWorkbenchThemeConstants.ACTIVE_TAB_TEXT_COLOR);
            g.bgColors = new Color[2];
            g.bgColors[0] = colorRegistry
                    .get(IWorkbenchThemeConstants.ACTIVE_TAB_BG_START);
            g.bgColors[1] = colorRegistry
                    .get(IWorkbenchThemeConstants.ACTIVE_TAB_BG_END);
        } else {
            if (activeEditor) {
                g.fgColor = colorRegistry
                        .get(IWorkbenchThemeConstants.ACTIVE_TAB_TEXT_COLOR);
                g.bgColors = new Color[2];
                g.bgColors[0] = colorRegistry
                        .get(IWorkbenchThemeConstants.ACTIVE_TAB_BG_START);
                g.bgColors[1] = colorRegistry
                        .get(IWorkbenchThemeConstants.ACTIVE_TAB_BG_END);
            } else {
                g.fgColor = colorRegistry
                        .get(IWorkbenchThemeConstants.INACTIVE_TAB_TEXT_COLOR);
                g.bgColors = new Color[2];
                g.bgColors[0] = colorRegistry
                        .get(IWorkbenchThemeConstants.INACTIVE_TAB_BG_START);
                g.bgColors[1] = colorRegistry
                        .get(IWorkbenchThemeConstants.INACTIVE_TAB_BG_END);
            }
        }
        g.bgPercents = new int[] { theme
                .getInt(IWorkbenchThemeConstants.ACTIVE_TAB_PERCENT) };
View Full Code Here

TOP

Related Classes of org.eclipse.jface.resource.ColorRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.