net.sf.jzeno.echo
Class AbstractHardCodedStyle

java.lang.Object
  extended by net.sf.jzeno.echo.AbstractHardCodedStyle
All Implemented Interfaces:
StyleManager
Direct Known Subclasses:
CalmsStyle, DHLStyle, ZenoStyle

public abstract class AbstractHardCodedStyle
extends java.lang.Object
implements StyleManager


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.jzeno.echo.StyleManager
StyleManager.MetaData
 
Field Summary
protected  java.util.Map styleNameToDemoPanelClass
           
protected  java.util.Map styleNameToDescription
           
protected  java.util.Map styleNameToMetaDataList
           
protected  java.util.Map styleNameToStyle
           
 
Constructor Summary
AbstractHardCodedStyle()
           
 
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.
static java.util.List importMetaData(java.lang.Class fromClass)
           Helper function that allows you to specify the MetaData for a style by importing all information of a single class through the reflection API.
protected  java.util.List importMetaData(Style style)
           Helper function that allows you to specify the MetaData for a style by importing all information from an example Style.
protected abstract  void init()
           
 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 metaData)
           Creates/Replaces a given style.
 void setStyle(java.lang.String styleName, Style style)
           Sets the Style with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

styleNameToStyle

protected java.util.Map styleNameToStyle

styleNameToMetaDataList

protected java.util.Map styleNameToMetaDataList

styleNameToDemoPanelClass

protected java.util.Map styleNameToDemoPanelClass

styleNameToDescription

protected java.util.Map styleNameToDescription
Constructor Detail

AbstractHardCodedStyle

public AbstractHardCodedStyle()
Method Detail

getStyle

public Style getStyle(java.lang.String styleName)
Description copied from interface: StyleManager

Gets the Style with the given name.

Specified by:
getStyle in interface StyleManager

getMetaData

public java.util.List getMetaData(java.lang.String styleName)
Description copied from interface: StyleManager

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

Specified by:
getMetaData in interface StyleManager

getDemoPanelClass

public java.lang.Class getDemoPanelClass(java.lang.String styleName)
Description copied from interface: StyleManager

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

Specified by:
getDemoPanelClass in interface StyleManager

getStyleNames

public java.util.List getStyleNames()
Description copied from interface: StyleManager

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

Specified by:
getStyleNames in interface StyleManager

getDescription

public java.lang.String getDescription(java.lang.String styleName)
Description copied from interface: StyleManager

Gets the description for a given style.

Specified by:
getDescription in interface StyleManager

setDescription

public void setDescription(java.lang.String styleName,
                           java.lang.String description)
Description copied from interface: StyleManager

Sets the description for a given style.

Specified by:
setDescription in interface StyleManager

setStyle

public void setStyle(java.lang.String styleName,
                     Style style)
Description copied from interface: StyleManager

Sets the Style with the given name.

Specified by:
setStyle in interface StyleManager

setMetaData

public void setMetaData(java.lang.String styleName,
                        java.util.List metaData)
Description copied from interface: StyleManager

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.

Specified by:
setMetaData in interface StyleManager

save

public void save()
Description copied from interface: StyleManager

Instructs the style manager to persist the current styles.

Specified by:
save in interface StyleManager

remove

public void remove(java.lang.String styleName)
Description copied from interface: StyleManager

Deletes a given style from the style manager.

Specified by:
remove in interface StyleManager

setDemoPanelClass

public void setDemoPanelClass(java.lang.String styleName,
                              java.lang.Class demoPanelClass)
Description copied from interface: StyleManager

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

Specified by:
setDemoPanelClass in interface StyleManager

importMetaData

public static java.util.List importMetaData(java.lang.Class fromClass)

Helper function that allows you to specify the MetaData for a style by importing all information of a single class through the reflection API.


importMetaData

protected java.util.List importMetaData(Style style)

Helper function that allows you to specify the MetaData for a style by importing all information from an example Style.


init

protected abstract void init()