Package org.eclipse.ui.themes

Examples of org.eclipse.ui.themes.IThemeManager


    text3 = new StyledText(composite, SWT.H_SCROLL | SWT.V_SCROLL|SWT.READ_ONLY);
    text3.setEditable(false);

    int index = addPage(composite);
    setPageText(index, "Overview");
    IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
    ITheme currentTheme = themeManager.getCurrentTheme();

    FontRegistry fontRegistry = currentTheme.getFontRegistry();
    text3.setFont( fontRegistry.get(JFaceResources.TEXT_FONT));
    text3.addFocusListener(new FocusListener()
    {
View Full Code Here


     */
    public void init(IWorkbench aWorkbench) {
        this.workbench = (Workbench) aWorkbench;
        setPreferenceStore(PrefUtil.getInternalPreferenceStore());

        final IThemeManager themeManager = aWorkbench.getThemeManager();

        themeChangeListener = new IPropertyChangeListener() {

            /* (non-Javadoc)
             * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
             */
            public void propertyChange(PropertyChangeEvent event) {
                if (event.getProperty().equals(
                        IThemeManager.CHANGE_CURRENT_THEME)) {
                    updateThemeInfo(themeManager);
                    refreshCategory();
                    tree.getViewer().refresh(); // refresh all the labels in the tree
                }
            }
        };
        themeManager.addPropertyChangeListener(themeChangeListener);

        updateThemeInfo(themeManager);
    }
View Full Code Here

    /**
     * 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);
View Full Code Here

  myMonitorOutput = new StyledText(fTop, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
  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);
View Full Code Here

      public int getTailSize() {
    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);
View Full Code Here

TOP

Related Classes of org.eclipse.ui.themes.IThemeManager

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.