Examples of StyleException


Examples of com.alee.managers.style.StyleException

    protected SupportedComponent getSupportedComponentTypeImpl ( final JComponent component )
    {
        final SupportedComponent type = SupportedComponent.getComponentTypeByUIClassID ( component.getUIClassID () );
        if ( type == null )
        {
            throw new StyleException ( "Unknown component UI class ID: " + component.getUIClassID () );
        }
        return type;
    }
View Full Code Here

Examples of com.alee.managers.style.StyleException

    protected ComponentStyle getComponentStyleImpl ( final JComponent component, final SupportedComponent type )
    {
        final ComponentStyle style = getComponentStyle ( component, type );
        if ( style == null )
        {
            throw new StyleException ( "Skin doesn't contain style for UI class ID: " + component.getUIClassID () );
        }
        return style;
    }
View Full Code Here

Examples of com.alee.managers.style.StyleException

    protected ComponentUI getComponentUIImpl ( final JComponent component )
    {
        final ComponentUI ui = LafUtils.getUI ( component );
        if ( ui == null )
        {
            throw new StyleException ( "Unable to retrieve UI from component: " + component );
        }
        return ui;
    }
View Full Code Here

Examples of com.alee.managers.style.StyleException

                    // Creating painter instance
                    // Be aware that all painters must have default constructor
                    painter = ReflectUtils.createInstanceSafely ( painterStyle.getPainterClass () );
                    if ( painter == null )
                    {
                        throw new StyleException (
                                "Unable to create painter \"" + painterStyle.getPainterClass () + "\" for component: " + component );
                    }

                    // Applying painter properties
                    // These properties are applied only for style-provided painters
View Full Code Here

Examples of com.alee.managers.style.StyleException

            return null;
        }
        else
        {
            // Throw exception if painter was not found
            throw new StyleException ( "Painter with ID \"" + painterId + "\" was not found for component: " + component );
        }
    }
View Full Code Here

Examples of com.alee.managers.style.StyleException

            return false;
        }
        else
        {
            // Throw exception if painter was not found
            throw new StyleException ( "Painter with ID \"" + painterId + "\" was not found for component: " + component );
        }
    }
View Full Code Here

Examples of com.alee.managers.style.StyleException

                    final Class<?> rClass = getter.getReturnType ();
                    properties.put ( propertyName, context.convertAnother ( properties, rClass ) );
                }
                else
                {
                    throw new StyleException ( "Component property \"" + propertyName + "\" type from style \"" + componentStyleId +
                            "\" cannot be determined! Make sure it points to existing field or getter method." );
                }
            }
        }
    }
View Full Code Here

Examples of com.alee.managers.style.StyleException

            if ( resourceFile.getClassName () == null )
            {
                final String skinClass = skinInfo.getSkinClass ();
                if ( skinClass == null )
                {
                    throw new StyleException (
                            "Included skin file \"" + resourceFile.getSource () + "\" specified but skin \"class\" property is not set!" );
                }
                resourceFile.setClassName ( skinClass );
            }

            // Reading skin part from included file
            final SkinInfo include = loadSkinInfo ( resourceFile );
            if ( include == null )
            {
                throw new StyleException ( "Included skin file \"" + resourceFile.getSource () + "\" cannot be read!" );
            }

            // Adding information from included file
            // Included styles order is preserved to preserve styles override order
            styles.addAll ( i, include.getStyles () );
View Full Code Here

Examples of com.alee.managers.style.StyleException

        }

        // Style cannot extend itself
        if ( extendsId.equals ( id ) )
        {
            throw new StyleException ( "Component style \"" + style.getType () + ":" + id + "\" extends itself!" );
        }

        // Extended style cannot be found
        final ComponentStyle extendedStyle = styles.get ( extendsId );
        if ( extendedStyle == null )
        {
            throw new StyleException (
                    "Component style \"" + style.getType () + ":" + id + "\" extends missing style \"" + extendsId + "\"!" );
        }

        // Remember that this style is already compiled
        // Doing this here to avoid cyclic dependencies throw stack overflow
View Full Code Here

Examples of com.alee.managers.style.StyleException

                final Class extendedPainterClass = ReflectUtils.getClassSafely ( extendedPainterStyle.getPainterClass () );
                if ( painterClass == null || extendedPainterClass == null )
                {
                    final String pc = painterClass == null ? painterStyle.getPainterClass () : extendedPainterStyle.getPainterClass ();
                    final String sid = style.getType () + ":" + style.getId ();
                    throw new StyleException ( "Component style \"" + sid + "\" points to missing painter class: \"" + pc + "\"!" );
                }
                if ( ReflectUtils.isAssignable ( extendedPainterClass, painterClass ) )
                {
                    copyProperties ( painterStyle.getProperties (), extendedPainterStyle.getProperties () );
                }
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.