|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.DockUI
public class DockUI
A list of icons, text and methods used by the framework.
Constructor Summary | |
---|---|
protected |
DockUI()
Creates a new DockUI |
Method Summary | ||
---|---|---|
void |
fillIcons(IconManager manager)
Fills all known icons as default-icons into the given manager. |
|
ResourceBundle |
getBundle()
Gets the local resource bundle. |
|
static Combiner |
getCombiner(Combiner combiner,
DockStation station)
Gets a Combiner for station . |
|
static DockUI |
getDefaultDockUI()
Gets the default instance of DockUI. |
|
static DisplayerFactory |
getDisplayerFactory(DisplayerFactory factory,
DockStation station)
Gets a DisplayerFactory for station . |
|
Icon |
getIcon(String key)
Gets the icon stored under key . |
|
static StationPaint |
getPaint(StationPaint paint,
DockStation station)
Gets a StationPaint for station . |
|
String |
getString(String key)
Gets a string of the current bundle . |
|
ThemeFactory[] |
getThemes()
Gets the list of all available themes. |
|
protected Map<String,String> |
loadKeyPathMapping()
Gets a map containing keys and path for icon. |
|
|
registerTheme(Class<T> theme,
ResourceBundle bundle)
Registers a factory for theme . |
|
void |
registerTheme(ThemeFactory factory)
Stores a new theme. |
|
void |
setBundle(Locale locale)
Replaces the bundle of this DockUI using the given Locale |
|
void |
setBundle(ResourceBundle bundle)
Sets the resource bundle which should be used. |
|
void |
setIcon(String key,
Icon icon)
Sets the icon that is used for a certain key. |
|
void |
unregisterTheme(ThemeFactory factory)
Removes an earlier added factory from the set of theme-factories. |
|
static
|
updateTheme(D station,
DockFactory<? super D> factory)
Removes all children of station and then adds
the children again. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DockUI()
Method Detail |
---|
public static DockUI getDefaultDockUI()
public ThemeFactory[] getThemes()
public <T extends DockTheme> void registerTheme(Class<T> theme, ResourceBundle bundle)
theme
.
theme
- A class which must have the annotation
ThemeProperties
bundle
- The ResourceBundle
that should be used to read
name and description. This argument can be null
, in that
case the bundle of this DockUI will be used.public void registerTheme(ThemeFactory factory)
factory
- the new themepublic void unregisterTheme(ThemeFactory factory)
factory
- the factory to removepublic ResourceBundle getBundle()
public String getString(String key)
bundle
.
key
- the key of the string
public void setBundle(ResourceBundle bundle)
bundle
- the bundlepublic void setBundle(Locale locale)
locale
- the language of the DockUIpublic Icon getIcon(String key)
key
. The keys are stored in
a file "icons.ini" in the directory "data".
key
- the key for the icon
null
public void setIcon(String key, Icon icon)
key
- the keyicon
- the icon to return if getIcon(String)
is invokedprotected Map<String,String> loadKeyPathMapping()
public void fillIcons(IconManager manager)
manager
- the manager to fillpublic static StationPaint getPaint(StationPaint paint, DockStation station)
StationPaint
for station
.
paint
- a default value, may be null
station
- the station for which a paint is searched
paint
or another StationPaint, not null
public static DisplayerFactory getDisplayerFactory(DisplayerFactory factory, DockStation station)
DisplayerFactory
for station
.
factory
- a default value, may be null
station
- the station for which a factory is searched
factory
or another DisplayerFactory, not null
public static Combiner getCombiner(Combiner combiner, DockStation station)
Combiner
for station
.
combiner
- a default value, may be null
station
- the station for which a combiner is searched
combiner
or another Combiner, not null
public static <D extends DockStation> void updateTheme(D station, DockFactory<? super D> factory) throws IOException
station
and then adds
the children again. Reading the children ensures that all components are
build up again with the current theme of the station
D
- the type of the stationstation
- the station to updatefactory
- a factory used to remove and to add the elements
IOException
- if the factory throws an exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |