pivot.wtk
Class Theme

java.lang.Object
  extended by pivot.wtk.Theme
Direct Known Subclasses:
ObsidianTheme, TerraTheme

public abstract class Theme
extends Object

Base class for Pivot themes. A theme defines a complete "look and feel" for a Pivot application.

Note that concrete Theme implementations should be declared as final. If multiple third-party libraries attempted to extend a theme, it would cause a conflict, as only one could be used in any given application.

IMPORTANT All skin mappings must be added to the map, even non-static inner classes. Otherwise, the component's base class will attempt to install its own skin, which will result in the addition of duplicate listeners.


Field Summary
protected  HashMap<Class<? extends Component>,Class<? extends Skin>> componentSkinMap
           
static String PROVIDER_NAME
           
 
Constructor Summary
Theme()
           
 
Method Summary
abstract  Font getFont()
           
abstract  Image getMessageIcon(MessageType messageType)
           
 Class<? extends Skin> getSkinClass(Class<? extends Component> componentClass)
           
abstract  Image getSmallMessageIcon(MessageType messageType)
           
static Theme getTheme()
           
protected abstract  void install()
           
static void setTheme(Theme theme)
           
protected abstract  void uninstall()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentSkinMap

protected HashMap<Class<? extends Component>,Class<? extends Skin>> componentSkinMap

PROVIDER_NAME

public static final String PROVIDER_NAME
See Also:
Constant Field Values
Constructor Detail

Theme

public Theme()
Method Detail

getSkinClass

public final Class<? extends Skin> getSkinClass(Class<? extends Component> componentClass)

install

protected abstract void install()

uninstall

protected abstract void uninstall()

getFont

public abstract Font getFont()

getMessageIcon

public abstract Image getMessageIcon(MessageType messageType)

getSmallMessageIcon

public abstract Image getSmallMessageIcon(MessageType messageType)

getTheme

public static Theme getTheme()

setTheme

public static void setTheme(Theme theme)