Examples of Theme


Examples of org.apache.pivot.wtk.Theme

    private static final int PARAGRAPH_TERMINATOR_WIDTH = 4;
    private static final FontRenderContext FONT_RENDER_CONTEXT = new FontRenderContext(null, true, true);
    private static final int SCROLL_RATE = 30;

    public TextAreaSkin() {
        Theme theme = Theme.getTheme();
        font = theme.getFont();
        color = Color.BLACK;
        inactiveColor = Color.GRAY;
        backgroundColor = null;
        selectionColor = Color.LIGHT_GRAY;
        selectionBackgroundColor = Color.BLACK;
View Full Code Here

Examples of org.apache.pivot.wtk.Theme

    private float textHeight = -1;

    private static final FontRenderContext FONT_RENDER_CONTEXT = new FontRenderContext(null, true, true);

    public LabelSkin() {
        Theme theme = Theme.getTheme();
        font = theme.getFont();
        color = Color.BLACK;
        backgroundColor = null;
        textDecoration = null;
        horizontalAlignment = HorizontalAlignment.LEFT;
        verticalAlignment = VerticalAlignment.TOP;
View Full Code Here

Examples of org.apache.pivot.wtk.Theme

    private int thickness;
    private Insets padding;
    private CornerRadii cornerRadii;

    public BorderSkin() {
        Theme theme = Theme.getTheme();
        setBackgroundColor(Color.WHITE);

        font = theme.getFont().deriveFont(Font.BOLD);
        color = Color.BLACK;
        titleColor = Color.BLACK;
        thickness = 1;
        padding = Insets.NONE;
        cornerRadii = CornerRadii.NONE;
View Full Code Here

Examples of org.apache.roller.pojos.Theme

     * @see org.apache.roller.model.ThemeManager#getTheme(java.lang.String)
     */
    public Theme getTheme(String name)
        throws ThemeNotFoundException, RollerException {
       
        Theme theme = (Theme) this.themes.get(name);
        if(theme == null)
            throw new ThemeNotFoundException("Couldn't find theme ["+name+"]");
       
        return theme;
    }
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.Theme

        }
       
        // now go through each theme and load it into a Theme object
        for(int i=0; i < themenames.length; i++) {
            try {
                Theme theme = new SharedThemeFromDir(this.themeDir + File.separator + themenames[i]);
                if(theme != null) {
                    themes.put(theme.getId(), theme);
                }
            } catch (Throwable unexpected) {
                // shouldn't happen, so let's learn why it did
                log.error("Problem reading theme " + themenames[i], unexpected);
            }
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.Theme

        long resourceLastMod = 0;
        InputStream resourceStream = null;
       
        // first, see if we have a preview theme to operate from
        if(!StringUtils.isEmpty(resourceRequest.getThemeName())) {
            Theme theme = resourceRequest.getTheme();
            ThemeResource resource = theme.getResource(resourceRequest.getResourcePath());
            if(resource != null) {
                resourceLastMod = resource.getLastModified();
                resourceStream = resource.getInputStream();
            }
        }
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.Theme

           
        // we are dealing with a shared theme scenario
        } else if("shared".equals(getThemeType())) {
           
            // make sure theme is valid and enabled
            Theme newTheme = null;
            if(getThemeId() == null) {
                // TODO: i18n
                addError("No theme specified");
               
            } else {
                try {
                    ThemeManager themeMgr = WebloggerFactory.getWeblogger().getThemeManager();
                    newTheme = themeMgr.getTheme(getThemeId());
                   
                    if(!newTheme.isEnabled()) {
                        // TODO: i18n
                        addError("Theme not enabled");
                    }
                   
                } catch(Exception ex) {
                    log.warn(ex);
                    // TODO: i18n
                    addError("Theme not found");
                }
            }
           
            if(!hasActionErrors()) try {
                weblog.setEditorTheme(getThemeId());
                log.debug("Saving theme "+getThemeId()+" for weblog "+weblog.getHandle());
               
                // save updated weblog and flush
                UserManager userMgr = WebloggerFactory.getWeblogger().getUserManager();
                userMgr.saveWebsite(weblog);
                WebloggerFactory.getWeblogger().flush();
               
                // make sure to flush the page cache so ppl can see the change
                CacheManager.invalidate(weblog);
               
                // TODO: i18n
                addMessage("Successfully set theme to - "+newTheme.getName());
               
            } catch(WebloggerException re) {
                log.error("Error saving weblog - "+getActionWeblog().getHandle(), re);
                addError("Error setting theme");
            }
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.Theme

           
            WeblogTemplate stylesheet = getTemplate();
           
            // lookup the theme used by this weblog
            ThemeManager tmgr = WebloggerFactory.getWeblogger().getThemeManager();
            Theme theme = tmgr.getTheme(getActionWeblog().getEditorTheme());
           
            // lookup
            stylesheet.setLastModified(new Date());
            stylesheet.setContents(theme.getStylesheet().getContents());
           
            // save template and flush
            UserManager mgr = WebloggerFactory.getWeblogger().getUserManager();
            mgr.savePage(stylesheet);
            WebloggerFactory.getWeblogger().flush();
View Full Code Here

Examples of org.beangle.struts2.view.template.Theme

  final public boolean usesBody() {
    return true;
  }

  public final void setTheme(String newTheme) {
    this.theme = new Theme(newTheme);
    pushTheme(theme);
    useNewTheme = true;
  }
View Full Code Here

Examples of org.beangle.struts2.view.template.Theme

      return theme;
    }
  }

  public void setTheme(String theme) {
    this.theme = new Theme(theme);
  }
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.