bibliothek.extension.gui.dock.theme
Class IdentifiedColorScheme

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.IdentifiedColorScheme
All Implemented Interfaces:
ColorScheme

public class IdentifiedColorScheme
extends Object
implements ColorScheme

A ColorScheme that is wrapped around another scheme. This scheme contains a unmodifiable String which is used for equals(Object) and for hashCode().

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.themes.ColorScheme
COLOR_SCHEME_PARAMETER, EXTENSION_NAME
 
Constructor Summary
IdentifiedColorScheme(String id, ColorScheme delegate)
          Creates a new scheme.
 
Method Summary
 boolean equals(Object obj)
           
 ColorBridgeFactory getBridgeFactory(Path kind)
          Searches for a factory for a bridge that can be used for a specific kind of DockColor.
 Color getColor(String id)
          Searches for a color that can be used for the identifier id.
 int hashCode()
           
 void transmitAll(Priority priority, ColorManager manager)
          Transmits all values in this scheme to manager.
 boolean updateUI()
          Called when the LookAndFeel or a color of the LookAndFeelColors changed and this scheme perhaps needs to update its colors.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentifiedColorScheme

public IdentifiedColorScheme(String id,
                             ColorScheme delegate)
Creates a new scheme.

Parameters:
id - the unique identifier of this scheme
delegate - the source for any value of this scheme
Throws:
IllegalArgumentException - if either id or delegate is null
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getColor

public Color getColor(String id)
Description copied from interface: ColorScheme
Searches for a color that can be used for the identifier id.

Specified by:
getColor in interface ColorScheme
Parameters:
id - an identifier of some color
Returns:
some color or null

getBridgeFactory

public ColorBridgeFactory getBridgeFactory(Path kind)
Description copied from interface: ColorScheme
Searches for a factory for a bridge that can be used for a specific kind of DockColor.

Specified by:
getBridgeFactory in interface ColorScheme
Parameters:
kind - the kind of color the provider should support
Returns:
some a factory for a bridge or null

transmitAll

public void transmitAll(Priority priority,
                        ColorManager manager)
Description copied from interface: ColorScheme
Transmits all values in this scheme to manager.

Specified by:
transmitAll in interface ColorScheme
Parameters:
priority - the priority to use when registering colors and providers.
manager - the manager to fill

updateUI

public boolean updateUI()
Description copied from interface: ColorScheme
Called when the LookAndFeel or a color of the LookAndFeelColors changed and this scheme perhaps needs to update its colors.

Specified by:
updateUI in interface ColorScheme
Returns:
true if anything changed, false if this scheme was not changed.