Package org.flexdock.plaf.theme

Examples of org.flexdock.plaf.theme.Theme


            if( titlebarUIList.getSelectedValue() != null)
                p.setProperty(UIFactory.TITLEBAR_KEY, titlebarUIList.getSelectedValue().toString());
            if( buttonUIList.getSelectedValue() != null)
                p.setProperty(UIFactory.BUTTON_KEY, buttonUIList.getSelectedValue().toString());

            Theme theme = PlafManager.setCustomTheme("custom.theme", p);
            PlafManager.setPreferredTheme("custom.theme", true);
            themeInfo.update(theme);
            //PlafManager.installPreferredTheme();
        }
View Full Code Here


                           .getProperty(XMLConstants.NAME_KEY);
        if (themeName == null)
            throw new IllegalArgumentException(
                "Unable to find property 'name' in the supplied data set.");

        Theme theme = addCustomTheme(themeName, p);
        if (theme != null)
            setPreferredTheme(themeName, true);
    }
View Full Code Here

        if (reload || themeChanged)
            installPreferredTheme();
    }

    public static void installPreferredTheme() {
        Theme theme = getPreferredTheme();

        UI_DEFAULTS.clear();
        setProperty(View.class, theme.getViewUI());
        setProperty(Titlebar.class, theme.getTitlebarUI());
        setProperty(Button.class, theme.getButtonUI());

        RootWindow[] windows = RootWindow.getVisibleWindows();
        for (int i = 0; i < windows.length; i++)
            windows[i].updateComponentTreeUI();
    }
View Full Code Here

        for (int i = 0; i < windows.length; i++)
            windows[i].updateComponentTreeUI();
    }

    private static Theme getPreferredTheme() {
        Theme theme = null;
        String themeName = (String) UI_DEFAULTS.get(PREFERRED_THEME_KEY);
        if (themeName != null) {
            theme = (Theme) CUSTOM_THEMES.get(themeName);
            if (theme == null)
                theme = UIFactory.getTheme(themeName);
View Full Code Here

    public static Theme loadCustomTheme(String themeName, Properties p,
                                        boolean exclusive) {
        if (Configurator.isNull(themeName) || p == null)
            return null;

        Theme theme = UIFactory.createTheme(p);
        if (theme != null) {
            theme.setName(themeName);
            if (exclusive)
                CUSTOM_THEMES.clear();
            CUSTOM_THEMES.put(themeName, theme);
        }
        return theme;
View Full Code Here

TOP

Related Classes of org.flexdock.plaf.theme.Theme

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.