Examples of ITheme


Examples of org.eclipse.ui.themes.ITheme

        Collection colors = reader.getColorDefinitions();
        ColorDefinition[] colorDefs = (ColorDefinition[]) colors
                .toArray(new ColorDefinition[colors.size()]);

        ITheme theme = workbench.getThemeManager().getTheme(
                IThemeManager.DEFAULT_THEME);
        ThemeElementHelper.populateRegistry(theme, colorDefs, PrefUtil
        .getInternalPreferenceStore());

        Collection fonts = reader.getFontDefinitions();
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

        themeRegistry = ((ThemeRegistry) WorkbenchPlugin.getDefault()
                .getThemeRegistry());
        this.descriptor = descriptor;
        IWorkbench workbench = PlatformUI.getWorkbench();
        if (descriptor != null) {
          ITheme defaultTheme = workbench.getThemeManager().getTheme(
                    IThemeManager.DEFAULT_THEME);
         
            ColorDefinition[] colorDefinitions = this.descriptor.getColors();
            themeColorRegistry = new CascadingColorRegistry(defaultTheme
                    .getColorRegistry());
            if (colorDefinitions.length > 0) {
                ThemeElementHelper.populateRegistry(this, colorDefinitions,
                    PrefUtil.getInternalPreferenceStore());
            }

            FontDefinition[] fontDefinitions = this.descriptor.getFonts();
            themeFontRegistry = new CascadingFontRegistry(defaultTheme
                    .getFontRegistry());
            if (fontDefinitions.length > 0) {
                ThemeElementHelper.populateRegistry(this, fontDefinitions,
                    PrefUtil.getInternalPreferenceStore());
            }
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

   */
  private void ensureFontAndColorsCreated(final String[] actFonts, final String[] actColors) {
    final Display display = Display.getDefault();
    display.syncExec(new Runnable() {
      public void run() {
        ITheme theme  = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
        for (int i = 0; i < actColors.length; i++) {
          theme.getColorRegistry().get(actColors[i]);

        }
        for (int i = 0; i < actFonts.length; i++) {
          theme.getFontRegistry().get(actFonts[i]);
        }
        defaultBackgroundRgb = display.getSystemColor(
            SWT.COLOR_LIST_BACKGROUND).getRGB();
      }
    });
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

      decorateIcons(decoration, resource);
    }

    private void decorateFontAndColour(IDecoration decoration,
        IDecoratableResource resource) {
      ITheme current = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
      if (resource.isIgnored()) {
        Color bc = current.getColorRegistry().get(
            UIPreferences.THEME_IgnoredResourceBackgroundColor);
        Color fc = current.getColorRegistry().get(
            UIPreferences.THEME_IgnoredResourceForegroundColor);
        Font f = current.getFontRegistry().get(
            UIPreferences.THEME_IgnoredResourceFont);

        setBackgroundColor(decoration, bc);
        decoration.setForegroundColor(fc);
        decoration.setFont(f);
      } else if (!resource.isTracked()
          || resource.isDirty()
          || resource.staged() != Staged.NOT_STAGED) {
        Color bc = current.getColorRegistry().get(UIPreferences.THEME_UncommittedChangeBackgroundColor);
        Color fc = current.getColorRegistry().get(UIPreferences.THEME_UncommittedChangeForegroundColor);
        Font f = current.getFontRegistry().get(UIPreferences.THEME_UncommittedChangeFont);

        setBackgroundColor(decoration, bc);
        decoration.setForegroundColor(fc);
        decoration.setFont(f);
      }
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

    /* Check Cached version first */
    if (fgCachedOSTheme != null)
      return fgCachedOSTheme;

    ITheme currentTheme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
    if (HIGH_CONTRAST_THEME.equals(currentTheme.getId())) {
      fgCachedOSTheme = OSTheme.HIGH_CONTRAST;
      return fgCachedOSTheme;
    }

    RGB widgetBackground = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).getRGB();
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

   */
  @SuppressWarnings("restriction")
  public static void zoomNewsText(boolean zoomIn, boolean reset) {

    /* Retrieve Font */
    ITheme theme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
    FontRegistry registry = theme.getFontRegistry();
    FontData[] oldFontDatas = registry.getFontData(NEWS_TEXT_FONT_ID);
    FontData[] newFontDatas = new FontData[oldFontDatas.length];

    /* Set Height */
    for (int i = 0; i < oldFontDatas.length; i++) {
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

     * The constructor.
     */
    public SerialMonitor() {
  mySerialConnections = new LinkedHashMap<Serial, SerialListener>(myMaxSerialPorts);
  IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
  ITheme currentTheme = themeManager.getCurrentTheme();
  ColorRegistry colorRegistry = currentTheme.getColorRegistry();
  mySerialColor = new Color[myMaxSerialPorts];
  for (int i = 0; i < myMaxSerialPorts; i++) {
      String colorID = "it.baeyens.serial.color." + (1 + i);
      Color color = colorRegistry.get(colorID);
      mySerialColor[i] = color;
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

  theGriddata = new GridData(SWT.FILL, SWT.FILL, true, true);
  theGriddata.horizontalSpan = 7;
  myMonitorOutput.setLayoutData(theGriddata);
  myMonitorOutput.setEditable(false);
  IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
  ITheme currentTheme = themeManager.getCurrentTheme();
  FontRegistry fontRegistry = currentTheme.getFontRegistry();
  myMonitorOutput.setFont(fontRegistry.get("it.baeyens.serial.fontDefinition"));
  myMonitorOutput.setText("Currently there are no serial ports registered - please use the + button to add a port to the monitor.");

  myparent.getShell().setDefaultButton(mySendButton);
  makeActions();
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

    return myScope.getSize().x - 10; // Oscilloscope.TAILSIZE_MAX;
      }
  };

  IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
  ITheme currentTheme = themeManager.getCurrentTheme();
  ColorRegistry colorRegistry = currentTheme.getColorRegistry();

  myScope = new Oscilloscope(6, dsp, parent, SWT.NONE, colorRegistry.get("it.baeyens.scope.color.background"),
    colorRegistry.get("it.baeyens.scope.color.foreground"), colorRegistry.get("it.baeyens.scope.color.grid"));
  GridData theGriddata = new GridData(SWT.FILL, SWT.FILL, true, true);
  theGriddata.horizontalSpan = 7;
View Full Code Here

Examples of org.eclipse.ui.themes.ITheme

  private Color getColor(String name) {
    if (name == null) {
      return null;
    }

    ITheme theme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
    Color c = theme.getColorRegistry().get(name);

    if (c == null) {
      return Display.getDefault().getSystemColor(SWT.COLOR_BLACK);
    }
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.