Package org.jvnet.substance.theme

Examples of org.jvnet.substance.theme.SubstanceTheme


                        final Color color = new Color(0xff & systemColor[0],
                                                0xff & systemColor[1],
                                                0xff & systemColor[2]);

                        final ColorScheme colorScheme = new LightZoneSkin.CustomColorScheme(color);
                        final SubstanceTheme theme = LightZoneSkin.makeTheme(colorScheme, p.name());

                        button.putClientProperty(SubstanceLookAndFeel.THEME_PROPERTY, theme);
                        button.putClientProperty(SubstanceLookAndFeel.PAINT_ACTIVE_PROPERTY, Boolean.TRUE);

                        button.setBorder(BorderFactory.createEmptyBorder(1, 2, 1, 3));
View Full Code Here


        public Color getDarkColor() { return mainDarkColor; }
        public Color getUltraDarkColor() { return mainUltraDarkColor; }
    }

    public static SubstanceTheme makeTheme(ColorScheme colorScheme, String name) {
        SubstanceTheme activeTheme = new SubstanceTheme(colorScheme, name, SubstanceTheme.ThemeKind.DARK);

        SubstanceTheme basicTheme = new SubstanceEbonyTheme().tint(0.05);
        SubstanceTheme defaultTheme = basicTheme.shade(0.2);
        SubstanceTheme disabledTheme = basicTheme.shade(0.3);
        SubstanceTheme activeTitleTheme = defaultTheme;

        SubstanceComplexTheme theme = new SubstanceComplexTheme(name + " Theme",
                                                                SubstanceTheme.ThemeKind.DARK, activeTheme, defaultTheme, disabledTheme,
                                                                activeTitleTheme);
View Full Code Here

    }

    public static final SubstanceTheme orangeTheme = makeTheme(new CustomColorScheme(Colors.LZOrange), "Orange");

    public LightZoneSkin() {
        SubstanceTheme activeTheme = new SubstanceEbonyTheme();
        SubstanceTheme defaultTheme = activeTheme.shade(0.2);
        SubstanceTheme disabledTheme = activeTheme.shade(0.3);
        SubstanceTheme activeTitleTheme = defaultTheme;

        SubstanceComplexTheme theme = new SubstanceComplexTheme(NAME,
                                                                SubstanceTheme.ThemeKind.DARK, activeTheme, defaultTheme, disabledTheme,
                                                                activeTitleTheme);
        theme.setNonActivePainter(new SimplisticSoftBorderReverseGradientPainter());
View Full Code Here

                SubstanceLookAndFeel.setCurrentTheme(arg);
            }

            Boolean bool = XMLutils.getElementBoolean("invert", config); //$NON-NLS-1$
            if (bool != null && bool.booleanValue()) {
                SubstanceTheme theme = SubstanceLookAndFeel.getTheme();

                SubstanceLookAndFeel.setCurrentTheme(theme.invert());
            }
            bool = XMLutils.getElementBoolean("negate", config); //$NON-NLS-1$
            if (bool != null && bool.booleanValue()) {
                SubstanceTheme theme = SubstanceLookAndFeel.getTheme();

                SubstanceLookAndFeel.setCurrentTheme(theme.negate());
            }

            Double factor = XMLutils.getElementDouble("saturate",config); //$NON-NLS-1$
            if (factor != null) {
                bool = XMLutils.getElementBoolean("saturateEverything", config); //$NON-NLS-1$
                if (bool == null)
                    bool = new Boolean(false);
               
                SubstanceTheme theme = SubstanceLookAndFeel.getTheme();

                SubstanceLookAndFeel.setCurrentTheme(theme.saturate(factor,
                        bool.booleanValue()));              
            }
           
            factor = XMLutils.getElementDouble("tint",config); //$NON-NLS-1$
            if (factor != null) {
                SubstanceTheme theme = SubstanceLookAndFeel.getTheme();
                SubstanceLookAndFeel.setCurrentTheme(theme.tint(factor.doubleValue()));
            }
            factor = XMLutils.getElementDouble("tone",config); //$NON-NLS-1$
            if (factor != null) {
                SubstanceTheme theme = SubstanceLookAndFeel.getTheme();
                SubstanceLookAndFeel.setCurrentTheme(theme.tone(factor.doubleValue()));
            }
            factor = XMLutils.getElementDouble("shade",config); //$NON-NLS-1$
            if (factor != null) {
                SubstanceTheme theme = SubstanceLookAndFeel.getTheme();
                SubstanceLookAndFeel.setCurrentTheme(theme.shade(factor.doubleValue()));
            }
            factor = XMLutils.getElementDouble("shift",config); //$NON-NLS-1$
            if (factor != null) {
                SubstanceTheme theme = SubstanceLookAndFeel.getTheme();
                SubstanceLookAndFeel.setCurrentTheme(theme.hueShift(factor.doubleValue()));
            }
           
        } catch (Exception ex) {
            LOG.error(Messages.getString("SubstanceConfigurator.17")+ex.getLocalizedMessage()); //$NON-NLS-1$
        }
View Full Code Here

TOP

Related Classes of org.jvnet.substance.theme.SubstanceTheme

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.