bibliothek.gui.dock.themes
Class ThemePropertyFactory

java.lang.Object
  extended by bibliothek.gui.dock.themes.ThemePropertyFactory
All Implemented Interfaces:
ThemeFactory

public class ThemePropertyFactory
extends java.lang.Object
implements ThemeFactory

A factory using the ThemeProperties of a DockTheme to create instances of that DockTheme.

Author:
Benjamin Sigg

Field Summary
private  java.util.ResourceBundle bundle
          Bundle containing the text, may be null
private  java.lang.reflect.Constructor<? extends DockTheme> constructor
          Default constructor of the theme
private  ThemeProperties properties
          Information about the theme
private  DockUI ui
          Additional information, might be null
 
Constructor Summary
ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme)
          Creates a new factory.
ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme, DockUI ui)
          Creates a new factory.
ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme, java.util.ResourceBundle bundle)
          Creates a new factory.
ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme, java.util.ResourceBundle bundle, DockUI ui)
          Creates a new factory.
 
Method Summary
 DockTheme create()
          Creates a new theme.
 java.lang.String[] getAuthors()
          Gets a list of strings, containing the names of the authors.
 java.util.ResourceBundle getBundle()
          Gets the bundle used to retrieve text for this factory.
 java.lang.String getDescription()
          Gets a human readable description of the theme.
 java.lang.String getName()
          Gets the name of the theme.
protected  java.lang.String getString(java.lang.String key)
           
 DockUI getUi()
          Gets the DockUI used with this factory.
 java.net.URI[] getWebpages()
          Gets a set of links to any webpage the authors might want to show the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constructor

private java.lang.reflect.Constructor<? extends DockTheme> constructor
Default constructor of the theme


properties

private ThemeProperties properties
Information about the theme


bundle

private java.util.ResourceBundle bundle
Bundle containing the text, may be null


ui

private DockUI ui
Additional information, might be null

Constructor Detail

ThemePropertyFactory

public ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme)
Creates a new factory.

Parameters:
theme - the class of a theme, must have the ThemeProperties annotation.

ThemePropertyFactory

public ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme,
                            java.util.ResourceBundle bundle)
Creates a new factory.

Parameters:
theme - the class of a theme, must have the ThemeProperties annotation.
bundle - the bundle to retrieve text, might be null if the bundle of the DockUI should be used.

ThemePropertyFactory

public ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme,
                            DockUI ui)
Creates a new factory.

Parameters:
theme - the class of a theme, must have the ThemeProperties annotation.
ui - the DockUI to retrieve more information, might be null

ThemePropertyFactory

public ThemePropertyFactory(java.lang.Class<? extends DockTheme> theme,
                            java.util.ResourceBundle bundle,
                            DockUI ui)
Creates a new factory.

Parameters:
theme - the class of a theme, must have the ThemeProperties annotation.
bundle - the bundle to retrieve text, might be null if the bundle of the DockUI should be used.
ui - the DockUI to retrieve more information, might be null
Method Detail

getBundle

public java.util.ResourceBundle getBundle()
Gets the bundle used to retrieve text for this factory.

Returns:
the bundle or null if the bundle of the DockUI is used.

getUi

public DockUI getUi()
Gets the DockUI used with this factory.

Returns:
the ui or null if the default-DockUI is used

create

public DockTheme create()
Description copied from interface: ThemeFactory
Creates a new theme.

Specified by:
create in interface ThemeFactory
Returns:
the new theme

getAuthors

public java.lang.String[] getAuthors()
Description copied from interface: ThemeFactory
Gets a list of strings, containing the names of the authors.

Specified by:
getAuthors in interface ThemeFactory
Returns:
the authors, might be null

getString

protected java.lang.String getString(java.lang.String key)

getDescription

public java.lang.String getDescription()
Description copied from interface: ThemeFactory
Gets a human readable description of the theme.

Specified by:
getDescription in interface ThemeFactory
Returns:
the description, might be null

getName

public java.lang.String getName()
Description copied from interface: ThemeFactory
Gets the name of the theme.

Specified by:
getName in interface ThemeFactory
Returns:
the name, might be null

getWebpages

public java.net.URI[] getWebpages()
Description copied from interface: ThemeFactory
Gets a set of links to any webpage the authors might want to show the user.

Specified by:
getWebpages in interface ThemeFactory
Returns:
the pages, might be null