Examples of IThemeManager


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

Examples of org.eclipse.ui.themes.IThemeManager

     */
    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

Examples of org.eclipse.ui.themes.IThemeManager

    /**
     * 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

Examples of org.eclipse.ui.themes.IThemeManager

  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

Examples of org.eclipse.ui.themes.IThemeManager

      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

Examples of org.pentaho.platform.api.ui.IThemeManager

  @Path( "/list" )
  @Produces( { APPLICATION_JSON, APPLICATION_XML } )
  @Facet( name = "Unsupported" )
  public List<Theme> getSystemThemes() {
    ArrayList<Theme> themes = new ArrayList<Theme>();
    IThemeManager themeManager = PentahoSystem.get( IThemeManager.class );
    List<String> ids = themeManager.getSystemThemeIds();
    for ( String id : ids ) {
      org.pentaho.platform.api.ui.Theme theme = themeManager.getSystemTheme( id );
      if ( theme.isHidden() == false ) {
        themes.add( new Theme( id, theme.getName() ) );
      }
    }
    return themes;
View Full Code Here

Examples of org.pentaho.platform.api.ui.IThemeManager

      activeThemeName = StringUtils.defaultIfEmpty( (String) session.getAttribute( "pentaho-user-activeThemeName" ), settingsService
        .getUserSetting( "pentaho-user-activeThemeName", PentahoSystem.getSystemSetting( "default-activeThemeName", "onyx" ) )
          .getSettingValue() );
    }

    IThemeManager themeManager = PentahoSystem.get( IThemeManager.class, null );
    Theme theme = themeManager.getSystemTheme( activeThemeName );

    final ServletContext servletContext = (ServletContext) PentahoSystem.getApplicationContext().getContext();
    if ( servletContext != null ) {
      for ( ThemeResource res : theme.getResources() ) {
        if ( res.getLocation().endsWith( ".css" ) ) {
View Full Code Here

Examples of org.pentaho.platform.api.ui.IThemeManager

    StandaloneSession session = new StandaloneSession();
    PentahoSessionHolder.setSession( session );
    PentahoSystem.get( IPluginManager.class ).reload();

    IThemeManager themeManager = PentahoSystem.get( IThemeManager.class );

    assertTrue( themeManager.getSystemThemeIds().contains( "core" ) );
    assertNotNull( themeManager.getModuleThemeInfo( "themeplugin" ) );
    assertEquals( 1, themeManager.getModuleThemeInfo( "themeplugin" ).getSystemThemes().size() );
    Set<ThemeResource> resources =
        themeManager.getModuleThemeInfo( "themeplugin" ).getSystemThemes().get( 0 ).getResources();
    assertEquals( 3, resources.size() );

    assertNotNull( themeManager.getModuleThemeInfo( "test-module" ) );
    assertEquals( 1, themeManager.getModuleThemeInfo( "test-module" ).getSystemThemes().size() );
    resources = themeManager.getModuleThemeInfo( "test-module" ).getSystemThemes().get( 0 ).getResources();
    assertEquals( 3, resources.size() );
  }
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.