Package com.alee.managers.style.skin

Examples of com.alee.managers.style.skin.WebLafSkin


    {
        // Checking skin support
        checkSupport ( skin );

        // Saving new default skin
        final WebLafSkin oldSkin = StyleManager.defaultSkin;
        StyleManager.defaultSkin = skin;
        return oldSkin;
    }
View Full Code Here


    {
        // Checking skin support
        checkSupport ( skin );

        // Saving previously applied skin
        final WebLafSkin previousSkin = currentSkin;

        // Updating currently applied skin
        currentSkin = skin;

        // Applying new skin to all existing skinnable components
        for ( final Map.Entry<JComponent, WebLafSkin> entry : appliedSkins.entrySet () )
        {
            final JComponent component = entry.getKey ();
            final WebLafSkin oldSkin = entry.getValue ();
            if ( oldSkin != null )
            {
                oldSkin.removeSkin ( component );
            }
            if ( skin != null )
            {
                skin.applySkin ( component );
            }
View Full Code Here

    {
        // Checking skin support
        checkSupport ( skin );

        // Removing old skin from the component
        final WebLafSkin previousSkin = removeSkin ( component );

        // Applying new skin
        skin.applySkin ( component );
        appliedSkins.put ( component, skin );
View Full Code Here

     * @param component component to remove skin from
     * @return previously applied skin
     */
    public static WebLafSkin removeSkin ( final JComponent component )
    {
        final WebLafSkin skin = appliedSkins.get ( component );
        if ( skin != null )
        {
            skin.removeSkin ( component );
            appliedSkins.remove ( component );
        }
        return skin;
    }
View Full Code Here

     * @param <T>       style property value type
     * @return style property value
     */
    public static <T> T getPainterPropertyValue ( final JComponent component, final String painterId, final String key )
    {
        final WebLafSkin skin = appliedSkins.get ( component );
        return skin != null ? ( T ) skin.getPainterPropertyValue ( component, painterId, key ) : null;
    }
View Full Code Here

        // Saving custom property
        final T oldValue = ( T ) properties.put ( key, value );

        // Applying custom style property if there is a skin applied to this component
        final WebLafSkin componentSkin = appliedSkins.get ( component );
        if ( componentSkin != null )
        {
            componentSkin.setCustomPainterProperty ( component, key, value );
        }

        return oldValue;
    }
View Full Code Here

TOP

Related Classes of com.alee.managers.style.skin.WebLafSkin

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.