Examples of ColorRegistry


Examples of org.eclipse.jface.resource.ColorRegistry

    }
  }

  private void createTabFolder(Composite parent) {
    if (fTabFolder == null) {
      ColorRegistry reg = JFaceResources.getColorRegistry();
      Color c1 = reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_BG_START"), //$NON-NLS-1$
          c2 = reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_BG_END"); //$NON-NLS-1$
      fTabFolder = new CTabFolder(parent, SWT.NO_REDRAW_RESIZE | SWT.NO_TRIM | SWT.FLAT);
      GridData gd = new GridData(GridData.FILL_BOTH);
      gd.horizontalSpan = 2;
      fTabFolder.setSelectionBackground(new Color[] {c1, c2}new int[] {100}, true);
      fTabFolder.setSelectionForeground(reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_TEXT_COLOR")); //$NON-NLS-1$
      fTabFolder.setSimple(PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS));
      fTabFolder.setLayoutData(gd);
          fTabFolder.setBorderVisible(true);
      fTabFolder.setFont(parent.getFont());
      fTabFolder.addSelectionListener(new SelectionAdapter() {
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

        styledText.setEditable(true);
        setFont(console.getFont());
        styledText.addMouseTrackListener(this);
        styledText.addListener(SWT.MouseUp, mouseUpListener);

        ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
        propertyChangeListener = new HyperlinkColorChangeListener();
        colorRegistry.addListener(propertyChangeListener);

        revealJob.setSystem(true);
        document.addDocumentListener(documentListener);
        document.addPositionUpdater(positionUpdater);
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

        }
        textCursor = null;
        hyperlink = null;
        console = null;

        ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
        colorRegistry.removeListener(propertyChangeListener);
       
        super.handleDispose();
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

    {
        super.start( context );

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

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

Examples of org.eclipse.jface.resource.ColorRegistry

            fontRegistry = new FontRegistry( getWorkbench().getDisplay() );
        }

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

        valueEditorPreferences = new ValueEditorsPreferences();

        if ( filterTemplateContextTypeRegistry == null )
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

      return synchronizedNatureAdapter;
    }
   
    private synchronized void createColorCache() {
      if (colorCache == null) {
        colorCache = new ColorRegistry(getWorkbench().getDisplay());
        colorCache.put("ccw.repl.expressionBackground", new RGB(0xf0, 0xf0, 0xf0));
      }
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

   * @param rgb
   * @return The <code>Color</code> instance cached for this rgb value, creating
   *         it along the way if required.
   */
  public static Color getColor(RGB rgb) {
    ColorRegistry r = getDefault().getColorCache();
    String rgbString = StringConverter.asString(rgb);
    if (!r.hasValueFor(rgbString)) {
      r.put(rgbString, rgb);
    }
    return r.get(rgbString);
  }
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

  public static Color getPreferenceColor(IPreferenceStore store, String preferenceKey, RGB defaultColor) {
    return getColor(getPreferenceRGB(store, preferenceKey, defaultColor));
  }
 
    public static void registerEditorColors(IPreferenceStore store, RGB foregroundColor) {
        final ColorRegistry colorCache = getDefault().getColorCache();
       
        for (Keyword token: PreferenceConstants.colorizableTokens) {
          PreferenceConstants.ColorizableToken tokenStyle = PreferenceConstants.getColorizableToken(store, token, foregroundColor);
          colorCache.put(tokenStyle.rgb.toString(), tokenStyle.rgb);
        }
       
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

        .getCurrentTheme().getFontRegistry();
    this.headlineFont = reg.get(THEME_DiffHeadlineFont);
  }

  private void refreshDiffColors() {
    ColorRegistry reg = PlatformUI.getWorkbench().getThemeManager()
        .getCurrentTheme().getColorRegistry();
    this.addBackgroundColor = reg.get(THEME_DiffAddBackgroundColor);
    this.addForegroundColor = reg.get(THEME_DiffAddForegroundColor);
    this.removeBackgroundColor = reg.get(THEME_DiffRemoveBackgroundColor);
    this.removeForegroundColor = reg.get(THEME_DiffRemoveForegroundColor);
    this.hunkBackgroundColor = reg.get(THEME_DiffHunkBackgroundColor);
    this.hunkForegroundColor = reg.get(THEME_DiffHunkForegroundColor);
    this.headlineBackgroundColor = reg.get(THEME_DiffHeadlineBackgroundColor);
    this.headlineForegroundColor = reg.get(THEME_DiffHeadlineForegroundColor);
  }
View Full Code Here

Examples of org.eclipse.jface.resource.ColorRegistry

    if (fLeft != null)
      fLeft.setBackgroundColor(color);
    if (fRight != null)
      fRight.setBackgroundColor(color);

    ColorRegistry registry = JFaceResources.getColorRegistry();

    RGB bg = getBackground(display);
    SELECTED_INCOMING = registry.getRGB(INCOMING_COLOR);
    if (SELECTED_INCOMING == null)
      SELECTED_INCOMING = new RGB(0, 0, 255); // BLUE
    INCOMING = interpolate(SELECTED_INCOMING, bg, 0.6);
    INCOMING_FILL = interpolate(SELECTED_INCOMING, bg, 0.97);
    INCOMING_TEXT_FILL = interpolate(SELECTED_INCOMING, bg, 0.85);

    SELECTED_OUTGOING = registry.getRGB(OUTGOING_COLOR);
    if (SELECTED_OUTGOING == null)
      SELECTED_OUTGOING = new RGB(0, 0, 0); // BLACK
    OUTGOING = interpolate(SELECTED_OUTGOING, bg, 0.6);
    OUTGOING_FILL = interpolate(SELECTED_OUTGOING, bg, 0.97);
    OUTGOING_TEXT_FILL = interpolate(SELECTED_OUTGOING, bg, 0.85);

    SELECTED_CONFLICT = registry.getRGB(CONFLICTING_COLOR);
    if (SELECTED_CONFLICT == null)
      SELECTED_CONFLICT = new RGB(255, 0, 0); // RED
    CONFLICT = interpolate(SELECTED_CONFLICT, bg, 0.6);
    CONFLICT_FILL = interpolate(SELECTED_CONFLICT, bg, 0.97);
    CONFLICT_TEXT_FILL = interpolate(SELECTED_CONFLICT, bg, 0.85);

    RESOLVED = registry.getRGB(RESOLVED_COLOR);
    if (RESOLVED == null)
      RESOLVED = new RGB(0, 255, 0); // GREEN

    updatePresentation(display);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.