Examples of ITheme


Examples of com.salas.bb.views.themes.ITheme

        // restore theme
        String defaultThemeName = ResourceUtils.getString(RESOURCE_DEFAULT_THEME_NAME);
        String themeName = preferences.get(RenderingSettingsNames.THEME, defaultThemeName);
       
        ITheme restoredTheme = ThemeSupport.getThemeByName(themeName);

        if (LOG.isLoggable(Level.FINE))
        {
            LOG.fine("Default theme name : " + defaultThemeName);
            LOG.fine("Stored theme name  : " + themeName);
            LOG.fine("Loaded theme name  : " + restoredTheme.getName());
        }

        if (restoredTheme == null) restoredTheme = ThemeSupport.getThemeByName(defaultThemeName);
        setTheme(restoredTheme);
       
View Full Code Here

Examples of com.salas.bb.views.themes.ITheme

     *
     * @return theme.
     */
    public ITheme getTheme()
    {
        ITheme theTheme = theme;

        if (theTheme == null && parent != null) theTheme = parent.getTheme();

        return theTheme;
    }
View Full Code Here

Examples of com.salas.bb.views.themes.ITheme

     */
    public void setTheme(ITheme aTheme)
    {
        if (aTheme == null) throw new IllegalArgumentException(Strings.error("unspecified.theme"));

        ITheme oldTheme = theme;
        theme = aTheme;
        firePropertyChange(RenderingSettingsNames.THEME, oldTheme, theme);
    }
View Full Code Here

Examples of de.agilecoders.wicket.core.settings.ITheme

        }
    }

    private void setActiveTheme(String activeTheme) {
        IBootstrapSettings bootstrapSettings = Bootstrap.getSettings();
        ITheme theme = getThemeByName(activeTheme);
        getActiveThemeProvider().setActiveTheme(theme);
        if (theme instanceof BootstrapThemeTheme) {
            bootstrapSettings.setThemeProvider(new SingleThemeProvider(theme));
        } else if (theme instanceof BootswatchTheme) {
            bootstrapSettings.setThemeProvider(new BootswatchThemeProvider((BootswatchTheme) theme));
View Full Code Here

Examples of de.agilecoders.wicket.core.settings.ITheme

            bootstrapSettings.setThemeProvider(new VegibitThemeProvider((VegibitTheme) theme));
        }
    }

    private ITheme getThemeByName(String themeName) {
        ITheme theme;
        try {
            if ("bootstrap-theme".equals(themeName)) {
                theme = new BootstrapThemeTheme();
            } else if (themeName.startsWith("veg")) {
                theme = VegibitTheme.valueOf(themeName);
View Full Code Here

Examples of de.agilecoders.wicket.core.settings.ITheme

     *
     * @param settings       the bound {@link IBootstrapSettings}
     * @param headerResponse the current {@link IHeaderResponse}
     */
    public void renderHead(final IBootstrapSettings settings, final IHeaderResponse headerResponse) {
        final ITheme theme = settings.getActiveThemeProvider().getActiveTheme();

        theme.renderHead(headerResponse);

        contributeIE8Dependencies(headerResponse);
    }
View Full Code Here

Examples of org.eclipse.e4.ui.css.swt.theme.ITheme

  @Execute
  public void onExecute() {
    eventBroker.subscribe(IThemeEngine.Events.THEME_CHANGED,
        new EventHandler() {
          public void handleEvent(Event event) {
            ITheme currentTheme = (ITheme) event
                .getProperty(IThemeEngine.Events.THEME);
            // if (!prefDarker.getBoolean(
            // THEME_DARKER_PREF_THEMEENABLED, false))
            if (currentTheme.getId().equals(THEME_DARKER_ID)) {
              setupPreferences();
              isLastThemeDarker = true;
              DarkerWeavingHook.enableWeaving();
              hookDarkerCore();
            } else if (isLastThemeDarker) {
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

     */
    public void updateGradient(IEditorPart editor) {
        boolean activeEditor = editor == getSite().getPage().getActiveEditor();
        boolean activePart = editor == getSite().getPage().getActivePart();

        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) };

        drawGradient(editor, g);
    }
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.