|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.managers.style.skin.WebLafSkin
public abstract class WebLafSkin
This abstract class represents single WebLaF skin. Each skin combines a group of component painters and settings to provide an unique visual style.
StyleManager
,
CustomSkin
Field Summary | |
---|---|
static java.lang.String |
ALL_SYSTEMS_SUPPORTED
Constant provided in the skin that supports any kind of systems. |
Constructor Summary | |
---|---|
WebLafSkin()
|
Method Summary | ||
---|---|---|
protected void |
applyProperties(java.lang.Object object,
java.util.Map<java.lang.String,java.lang.Object> skinProperties,
java.util.Map<java.lang.String,java.lang.Object> customProperties)
Applies properties to specified object fields. |
|
boolean |
applySkin(javax.swing.JComponent component)
Applies this skin to the specified component. |
|
boolean |
applySkin(javax.swing.JComponent component,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> customPainterProperties,
java.util.Map<java.lang.String,Painter> customPainters)
Applies this skin to the specified component. |
|
abstract java.lang.String |
getAuthor()
Returns skin author. |
|
abstract ComponentStyle |
getComponentStyle(javax.swing.JComponent component,
SupportedComponent type)
Returns style for the specified supported component type. |
|
protected ComponentStyle |
getComponentStyleImpl(javax.swing.JComponent component)
Returns component style. |
|
protected ComponentStyle |
getComponentStyleImpl(javax.swing.JComponent component,
SupportedComponent type)
Returns component style. |
|
protected javax.swing.plaf.ComponentUI |
getComponentUIImpl(javax.swing.JComponent component)
Returns component UI object. |
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCustomPainterProperties(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> customPainterProperties,
PainterStyle painterStyle,
java.lang.String painterId)
Returns custom painter properties based on painter ID. |
|
abstract java.lang.String |
getDescription()
Returns skin description. |
|
static
|
getFieldValue(java.lang.Object object,
java.lang.String field)
Returns object field value. |
|
abstract java.lang.String |
getId()
Returns unique skin ID. |
|
abstract java.lang.String |
getName()
Returns skin name. |
|
|
getPainter(javax.swing.JComponent component,
java.lang.String painterId)
Returns component painter for the specified painter ID. |
|
|
getPainterPropertyValue(javax.swing.JComponent component,
java.lang.String key)
Returns painter property value from the specified component. |
|
|
getPainterPropertyValue(javax.swing.JComponent component,
java.lang.String painterId,
java.lang.String key)
Returns painter property value from the specified component. |
|
abstract java.lang.String |
getSkinClass()
Returns skin base class name. |
|
protected SupportedComponent |
getSupportedComponentTypeImpl(javax.swing.JComponent component)
Returns component type. |
|
abstract java.util.List<java.lang.String> |
getSupportedSystems()
Returns list of supported OS. |
|
boolean |
isSupported()
Returns whether this skin is supported or not. |
|
boolean |
removeSkin(javax.swing.JComponent component)
Removes this skin from the specified component. |
|
boolean |
setCustomPainterProperty(javax.swing.JComponent component,
java.lang.String key,
java.lang.Object value)
Sets custom value for painter property for the specified component. |
|
boolean |
setCustomPainterProperty(javax.swing.JComponent component,
java.lang.String painterId,
java.lang.String key,
java.lang.Object value)
Sets custom value for painter property for the specified component. |
|
static boolean |
setFieldValue(java.lang.Object object,
java.lang.String field,
java.lang.Object value)
Applies specified value to object field. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ALL_SYSTEMS_SUPPORTED
Constructor Detail |
---|
public WebLafSkin()
Method Detail |
---|
public abstract java.lang.String getId()
public abstract java.lang.String getName()
public abstract java.lang.String getDescription()
public abstract java.lang.String getAuthor()
public abstract java.util.List<java.lang.String> getSupportedSystems()
public boolean isSupported()
public abstract java.lang.String getSkinClass()
public abstract ComponentStyle getComponentStyle(javax.swing.JComponent component, SupportedComponent type)
component
- component instancetype
- component type
protected SupportedComponent getSupportedComponentTypeImpl(javax.swing.JComponent component)
component
- component instance
protected ComponentStyle getComponentStyleImpl(javax.swing.JComponent component)
component
- component instance
protected ComponentStyle getComponentStyleImpl(javax.swing.JComponent component, SupportedComponent type)
component
- component instancetype
- component type
protected javax.swing.plaf.ComponentUI getComponentUIImpl(javax.swing.JComponent component)
component
- component instance
public boolean applySkin(javax.swing.JComponent component)
component
- component to apply skin to
public boolean applySkin(javax.swing.JComponent component, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> customPainterProperties, java.util.Map<java.lang.String,Painter> customPainters)
component
- component to apply skin tocustomPainterProperties
- custom painter properties to applycustomPainters
- custom painters to apply
protected java.util.Map<java.lang.String,java.lang.Object> getCustomPainterProperties(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> customPainterProperties, PainterStyle painterStyle, java.lang.String painterId)
customPainterProperties
- all custom painter propertiespainterStyle
- painter stylepainterId
- painter ID
public boolean removeSkin(javax.swing.JComponent component)
component
- component to remove skin from
public <T> T getPainterPropertyValue(javax.swing.JComponent component, java.lang.String key)
T
- style property value typecomponent
- component to retrieve style property fromkey
- style property key
public <T> T getPainterPropertyValue(javax.swing.JComponent component, java.lang.String painterId, java.lang.String key)
T
- style property value typecomponent
- component to retrieve style property frompainterId
- painter IDkey
- style property key
public boolean setCustomPainterProperty(javax.swing.JComponent component, java.lang.String key, java.lang.Object value)
component
- component to apply custom style property tokey
- custom style property keyvalue
- custom style property value
public boolean setCustomPainterProperty(javax.swing.JComponent component, java.lang.String painterId, java.lang.String key, java.lang.Object value)
component
- component to apply custom style property topainterId
- painter IDkey
- custom style property keyvalue
- custom style property value
protected void applyProperties(java.lang.Object object, java.util.Map<java.lang.String,java.lang.Object> skinProperties, java.util.Map<java.lang.String,java.lang.Object> customProperties)
object
- object instanceskinProperties
- skin properties to apply, these properties come from the skincustomProperties
- custom properties to apply, these properties are provided directly into the specific componentpublic static boolean setFieldValue(java.lang.Object object, java.lang.String field, java.lang.Object value)
object
- object instancefield
- object fieldvalue
- field value
public static <T> T getFieldValue(java.lang.Object object, java.lang.String field)
T
- value typeobject
- object instancefield
- object field
public <T extends Painter> T getPainter(javax.swing.JComponent component, java.lang.String painterId)
component
- component to retrieve painter frompainterId
- painter ID
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |