com.alee.managers.style.skin
Class CustomSkin

java.lang.Object
  extended by com.alee.managers.style.skin.WebLafSkin
      extended by com.alee.managers.style.skin.CustomSkin
Direct Known Subclasses:
DemoSkin, NinePatchSkin, StyleEditorSkin, WebSkin

public class CustomSkin
extends WebLafSkin

This theme is used by StyleManager for cases when theme settings are stored within XML. To use it simply specify XML location relative to your skin class or provide SkinInfo object. All settings and painters will be loaded and applied by this skin automatically when it is used.

Author:
Mikle Garin
See Also:
How to use StyleManager, StyleManager, WebLafSkin, SkinInfo

Field Summary
protected  SkinInfo skinInfo
          Theme information.
 
Fields inherited from class com.alee.managers.style.skin.WebLafSkin
ALL_SYSTEMS_SUPPORTED
 
Constructor Summary
CustomSkin(SkinInfo skinInfo)
          Constructs new custom theme.
CustomSkin(java.lang.String location)
          Constructs new custom theme.
 
Method Summary
 java.lang.String getAuthor()
          Returns skin author.
 ComponentStyle getComponentStyle(javax.swing.JComponent component, SupportedComponent type)
          Returns style for the specified supported component type.
 java.lang.String getDescription()
          Returns skin description.
 java.lang.String getId()
          Returns unique skin ID.
 java.lang.String getName()
          Returns skin name.
 java.lang.String getSkinClass()
          Returns skin base class name.
 SkinInfo getSkinInfo()
          Returns theme information.
 java.util.List<java.lang.String> getSupportedSystems()
          Returns list of supported OS.
 
Methods inherited from class com.alee.managers.style.skin.WebLafSkin
applyProperties, applySkin, applySkin, getComponentStyleImpl, getComponentStyleImpl, getComponentUIImpl, getCustomPainterProperties, getFieldValue, getPainter, getPainterPropertyValue, getPainterPropertyValue, getSupportedComponentTypeImpl, isSupported, removeSkin, setCustomPainterProperty, setCustomPainterProperty, setFieldValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

skinInfo

protected SkinInfo skinInfo
Theme information. Contains complete information about this theme.

Constructor Detail

CustomSkin

public CustomSkin(java.lang.String location)
Constructs new custom theme.

Parameters:
location - skin info XML location relative to this class

CustomSkin

public CustomSkin(SkinInfo skinInfo)
Constructs new custom theme.

Parameters:
skinInfo - theme information
Method Detail

getSkinInfo

public SkinInfo getSkinInfo()
Returns theme information.

Returns:
theme information

getId

public java.lang.String getId()
Returns unique skin ID. Used to collect and manage skins within StyleManager.

Specified by:
getId in class WebLafSkin
Returns:
unique skin ID

getName

public java.lang.String getName()
Returns skin name.

Specified by:
getName in class WebLafSkin
Returns:
skin name

getDescription

public java.lang.String getDescription()
Returns skin description.

Specified by:
getDescription in class WebLafSkin
Returns:
skin description

getAuthor

public java.lang.String getAuthor()
Returns skin author.

Specified by:
getAuthor in class WebLafSkin
Returns:
skin author

getSupportedSystems

public java.util.List<java.lang.String> getSupportedSystems()
Returns list of supported OS.

Specified by:
getSupportedSystems in class WebLafSkin
Returns:
list of supported OS

getSkinClass

public java.lang.String getSkinClass()
Returns skin base class name.

Specified by:
getSkinClass in class WebLafSkin
Returns:
skin base class name

getComponentStyle

public ComponentStyle getComponentStyle(javax.swing.JComponent component,
                                        SupportedComponent type)
Returns style for the specified supported component type. Custom style ID can be specified in any Web-component or Web-UI to override default component style. If style for such custom ID is not found in skin descriptor then default style for that component is used.

Specified by:
getComponentStyle in class WebLafSkin
Parameters:
component - component instance
type - component type
Returns:
component style