bibliothek.gui.dock.util.text
Class DefaultTextScheme

java.lang.Object
  extended by bibliothek.gui.dock.util.AbstractUIScheme<String,TextValue,TextBridge>
      extended by bibliothek.gui.dock.util.text.DefaultTextScheme
All Implemented Interfaces:
UIScheme<String,TextValue,TextBridge>

public class DefaultTextScheme
extends AbstractUIScheme<String,TextValue,TextBridge>

This UIScheme is used by the TextManager to load the default set of strings from one or several ResourceBundles.

Author:
Benjamin Sigg

Constructor Summary
DefaultTextScheme(ResourceBundle... bundles)
          Creates a new scheme reading content from bundles
 
Method Summary
 TextBridge getBridge(Path name, UIProperties<String,TextValue,TextBridge> properties)
          Creates the UIBridge that handles resources of type name.
 String getResource(String name, UIProperties<String,TextValue,TextBridge> properties)
          Creates the resource with name name.
 void install(UIProperties<String,TextValue,TextBridge> properties)
          Informs this scheme that it is now used by properties.
 void uninstall(UIProperties<String,TextValue,TextBridge> properties)
          Informs this scheme that it is no longer used by properties.
 
Methods inherited from class bibliothek.gui.dock.util.AbstractUIScheme
addListener, fire, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTextScheme

public DefaultTextScheme(ResourceBundle... bundles)
Creates a new scheme reading content from bundles

Parameters:
bundles - the bundles to read, must not contain a null value
Method Detail

getBridge

public TextBridge getBridge(Path name,
                            UIProperties<String,TextValue,TextBridge> properties)
Description copied from interface: UIScheme
Creates the UIBridge that handles resources of type name.

Parameters:
name - the name of the bridge
properties - the map that will use the resource
Returns:
the new bridge or null if this scheme does not know name

getResource

public String getResource(String name,
                          UIProperties<String,TextValue,TextBridge> properties)
Description copied from interface: UIScheme
Creates the resource with name name. This method may be called often and should complete quickly.

Parameters:
name - the name of some resource
properties - the map that will use the resource
Returns:
the resource or null if this scheme does not know name

install

public void install(UIProperties<String,TextValue,TextBridge> properties)
Description copied from interface: UIScheme
Informs this scheme that it is now used by properties.

Parameters:
properties - the owner of this scheme

uninstall

public void uninstall(UIProperties<String,TextValue,TextBridge> properties)
Description copied from interface: UIScheme
Informs this scheme that it is no longer used by properties.

Parameters:
properties - an old client of this scheme