net.sf.jzeno.echo
Interface StyleManager

All Known Implementing Classes:
AbstractHardCodedStyle, CalmsStyle, DHLStyle, GenericStyle, ZenoStyle

public interface StyleManager

Echo echo component can be styled through the applyStyle() method. A Style is in essence a collection of peroperty values that are applied to the component. (Although the component decides which properties can be applied through styling).

Dynamic components (Dyna*) in jZeno have one or more default Styles that influence the visual appearance of that component. These styles are automatically applied by the dynamic component at constuction time.

Implement this interface for you own custom requirements. For ease-of-use some pre-implemented styles are available, including a generic style manager that can be configured through an administration screen.

For an an example implementation take a look at

See Also:


Nested Class Summary
static class StyleManager.MetaData
           
 
Method Summary
 java.lang.Class getDemoPanelClass(java.lang.String styleName)
           Gets the class of the DemoPanel that is visualized when editing a given style.
 java.lang.String getDescription(java.lang.String styleName)
           Gets the description for a given style.
 java.util.List getMetaData(java.lang.String styleName)
           Returns a list of StyleManager.MetaData objects, describing all possible properties for the given style.
 Style getStyle(java.lang.String styleName)
           Gets the Style with the given name.
 java.util.List getStyleNames()
           Gives a list with all the style names known to this style manager.
 void remove(java.lang.String styleName)
           Deletes a given style from the style manager.
 void save()
           Instructs the style manager to persist the current styles.
 void setDemoPanelClass(java.lang.String styleName, java.lang.Class demoPanelClass)
           Sets the class of the DemoPanel that is visualized when editing a given style.
 void setDescription(java.lang.String styleName, java.lang.String description)
           Sets the description for a given style.
 void setMetaData(java.lang.String styleName, java.util.List metaDataList)
           Creates/Replaces a given style.
 void setStyle(java.lang.String styleName, Style style)
           Sets the Style with the given name.
 

Method Detail

getStyle

Style getStyle(java.lang.String styleName)

Gets the Style with the given name.


setStyle

void setStyle(java.lang.String styleName,
              Style style)

Sets the Style with the given name.


getMetaData

java.util.List getMetaData(java.lang.String styleName)

Returns a list of StyleManager.MetaData objects, describing all possible properties for the given style.


setMetaData

void setMetaData(java.lang.String styleName,
                 java.util.List metaDataList)

Creates/Replaces a given style. You need to supply the style's name, the class of a DemoPanel that needs to be shown when editing this Style (or null if no DemoPanel is available), and a list of StyleManager.MetaData objects, that describe all possible properties that are applicable for this Style.


getDemoPanelClass

java.lang.Class getDemoPanelClass(java.lang.String styleName)

Gets the class of the DemoPanel that is visualized when editing a given style.


setDemoPanelClass

void setDemoPanelClass(java.lang.String styleName,
                       java.lang.Class demoPanelClass)

Sets the class of the DemoPanel that is visualized when editing a given style.


getDescription

java.lang.String getDescription(java.lang.String styleName)

Gets the description for a given style.


setDescription

void setDescription(java.lang.String styleName,
                    java.lang.String description)

Sets the description for a given style.


remove

void remove(java.lang.String styleName)

Deletes a given style from the style manager.


getStyleNames

java.util.List getStyleNames()

Gives a list with all the style names known to this style manager.


save

void save()

Instructs the style manager to persist the current styles.