bibliothek.gui.dock.themes.color
Class ExtendingColorScheme

java.lang.Object
  extended by bibliothek.gui.dock.themes.color.AbstractColorScheme
      extended by bibliothek.gui.dock.themes.color.ExtendingColorScheme
All Implemented Interfaces:
ColorScheme, UIScheme<Color,DockColor,ColorBridge>

public class ExtendingColorScheme
extends AbstractColorScheme

A ColorScheme that can be extended by additional ColorScheme.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.themes.ColorScheme
COLOR_SCHEME_PARAMETER, EXTENSION_NAME
 
Constructor Summary
ExtendingColorScheme(ColorScheme scheme, DockController controller)
          Creates a new scheme.
 
Method Summary
 void addListener(UISchemeListener<Color,DockColor,ColorBridge> listener)
          Adds a listener to this scheme.
 ColorBridge getBridge(Path name, UIProperties<Color,DockColor,ColorBridge> properties)
          Creates the UIBridge that handles resources of type name.
 Color getResource(String name, UIProperties<Color,DockColor,ColorBridge> properties)
          Creates the resource with name name.
 void install(UIProperties<Color,DockColor,ColorBridge> properties)
          Informs this scheme that it is now used by properties.
 void removeListener(UISchemeListener<Color,DockColor,ColorBridge> listener)
          Removes a listener from this scheme.
 void uninstall(UIProperties<Color,DockColor,ColorBridge> properties)
          Informs this scheme that it is no longer used by properties.
protected  void updateUI()
          Called when the look and feel changed.
 
Methods inherited from class bibliothek.gui.dock.themes.color.AbstractColorScheme
fire, hasListeners, listeners, managers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendingColorScheme

public ExtendingColorScheme(ColorScheme scheme,
                            DockController controller)
Creates a new scheme.

Parameters:
scheme - the basic settings
controller - the controller used to read additional schemes
Method Detail

addListener

public void addListener(UISchemeListener<Color,DockColor,ColorBridge> listener)
Description copied from interface: UIScheme
Adds a listener to this scheme.

Specified by:
addListener in interface UIScheme<Color,DockColor,ColorBridge>
Overrides:
addListener in class AbstractColorScheme
Parameters:
listener - the new listener, not null

removeListener

public void removeListener(UISchemeListener<Color,DockColor,ColorBridge> listener)
Description copied from interface: UIScheme
Removes a listener from this scheme.

Specified by:
removeListener in interface UIScheme<Color,DockColor,ColorBridge>
Overrides:
removeListener in class AbstractColorScheme
Parameters:
listener - the listener to remove

install

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

Specified by:
install in interface UIScheme<Color,DockColor,ColorBridge>
Overrides:
install in class AbstractColorScheme
Parameters:
properties - the owner of this scheme

uninstall

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

Specified by:
uninstall in interface UIScheme<Color,DockColor,ColorBridge>
Overrides:
uninstall in class AbstractColorScheme
Parameters:
properties - an old client of this scheme

updateUI

protected void updateUI()
Description copied from class: AbstractColorScheme
Called when the look and feel changed. Subclasses may override this method and update colors if necessary.

Specified by:
updateUI in class AbstractColorScheme

getBridge

public ColorBridge getBridge(Path name,
                             UIProperties<Color,DockColor,ColorBridge> 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 Color getResource(String name,
                         UIProperties<Color,DockColor,ColorBridge> 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