public abstract class WebLafSkin
extends java.lang.Object
StyleManager,
CustomSkin| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALL_SYSTEMS_SUPPORTED
Constant provided in the skin that supports any kind of systems.
|
| Constructor and Description |
|---|
WebLafSkin() |
| Modifier and Type | Method and Description |
|---|---|
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 <T> T |
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.
|
<T extends Painter> |
getPainter(javax.swing.JComponent component,
java.lang.String painterId)
Returns component painter for the specified painter ID.
|
<T> T |
getPainterPropertyValue(javax.swing.JComponent component,
java.lang.String key)
Returns painter property value from the specified component.
|
<T> T |
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() |
public static final java.lang.String ALL_SYSTEMS_SUPPORTED
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 typeprotected SupportedComponent getSupportedComponentTypeImpl(javax.swing.JComponent component)
component - component instanceprotected ComponentStyle getComponentStyleImpl(javax.swing.JComponent component)
component - component instanceprotected ComponentStyle getComponentStyleImpl(javax.swing.JComponent component, SupportedComponent type)
component - component instancetype - component typeprotected javax.swing.plaf.ComponentUI getComponentUIImpl(javax.swing.JComponent component)
component - component instancepublic boolean applySkin(javax.swing.JComponent component)
component - component to apply skin topublic 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 applyprotected 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 IDpublic boolean removeSkin(javax.swing.JComponent component)
component - component to remove skin frompublic <T> T getPainterPropertyValue(javax.swing.JComponent component,
java.lang.String key)
T - style property value typecomponent - component to retrieve style property fromkey - style property keypublic <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 keypublic 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 valuepublic 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 valueprotected 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 valuepublic static <T> T getFieldValue(java.lang.Object object,
java.lang.String field)
T - value typeobject - object instancefield - object fieldpublic <T extends Painter> T getPainter(javax.swing.JComponent component, java.lang.String painterId)
component - component to retrieve painter frompainterId - painter IDpublic java.lang.String toString()
toString in class java.lang.Object