bibliothek.gui.dock.title
Class DockTitleManager

java.lang.Object
  extended by bibliothek.gui.dock.title.DockTitleManager

public class DockTitleManager
extends Object

The manager of the DockTitleFactories. Every DockStation will try to register some factories here. The factories can be overridden by a client or a DockTheme.

Author:
Benjamin Sigg

Field Summary
static String THEME_FACTORY_ID
          unique identifier of the DockTitleVersion which represents the current DockThemes default factory
 
Constructor Summary
DockTitleManager(DockController controller)
          Creates a new manager
 
Method Summary
 void clearThemeFactories()
          Removes all factories that were added by a theme
 boolean existsTitleVersion(String id)
          Tests whether there is a handle registered at id or not.
 DockTitleVersion getVersion(String id)
          Gets the handle with the key id.
 DockTitleVersion getVersion(String id, DockTitleFactory factory)
          Gets the handle with the key id.
 DockTitleVersion register(String id, DockTitleFactory factory, Priority priority)
          Registers a factory for the given key
 DockTitleVersion registerClient(String id, DockTitleFactory factory)
          Registers a factory with client-priority
 DockTitleVersion registerDefault(String id, DockTitleFactory factory)
          Registers a factory with default-priority
 DockTitleVersion registerTheme(String id, DockTitleFactory factory)
          Registers a factory with theme-priority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THEME_FACTORY_ID

public static final String THEME_FACTORY_ID
unique identifier of the DockTitleVersion which represents the current DockThemes default factory

See Also:
Constant Field Values
Constructor Detail

DockTitleManager

public DockTitleManager(DockController controller)
Creates a new manager

Parameters:
controller - the controller for which the titles are used
Method Detail

existsTitleVersion

public boolean existsTitleVersion(String id)
Tests whether there is a handle registered at id or not.

Parameters:
id - the id
Returns:
true if there is a handle, false otherwise

getVersion

public DockTitleVersion getVersion(String id)
Gets the handle with the key id.

Parameters:
id - the key
Returns:
the handle or null if no handle is registered

getVersion

public DockTitleVersion getVersion(String id,
                                   DockTitleFactory factory)
Gets the handle with the key id. If the key is unknown, then a new handle is created, using factory as default factory.

Parameters:
id - the key of the handle
factory - the default factory used when a new handle has to be created, can be null
Returns:
the handle

registerClient

public DockTitleVersion registerClient(String id,
                                       DockTitleFactory factory)
Registers a factory with client-priority

Parameters:
id - the key of the factory
factory - the factory
Returns:
a handle of the factories of this id

registerTheme

public DockTitleVersion registerTheme(String id,
                                      DockTitleFactory factory)
Registers a factory with theme-priority

Parameters:
id - the key of the factory
factory - the factory
Returns:
a handle of the factories of this id

registerDefault

public DockTitleVersion registerDefault(String id,
                                        DockTitleFactory factory)
Registers a factory with default-priority

Parameters:
id - the key of the factory
factory - the factory
Returns:
a handle of the factories of this id

register

public DockTitleVersion register(String id,
                                 DockTitleFactory factory,
                                 Priority priority)
Registers a factory for the given key

Parameters:
id - the key of the factory
factory - the factory
priority - the priority of this registration
Returns:
the handle to the factory or a factory with higher priority

clearThemeFactories

public void clearThemeFactories()
Removes all factories that were added by a theme