bibliothek.gui.dock.common.theme.color
Class ExtendedColorBridge

java.lang.Object
  extended by bibliothek.gui.dock.common.theme.color.ExtendedColorBridge
All Implemented Interfaces:
ColorBridge, UIBridge<Color,DockColor>

@FrameworkOnly
public class ExtendedColorBridge
extends Object
implements ColorBridge

This ColorBridge uses a delegate and applies a set of CColorBridges.

Author:
Benjamin Sigg

Constructor Summary
ExtendedColorBridge(ColorBridge bridge, CColorBridge[] extensions)
          Creates a new bridge.
 
Method Summary
 void add(String id, DockColor uiValue)
          Adds a new UIValue that gets its resource from this bridge.
 void remove(String id, DockColor uiValue)
          Removes a value from this bridge.
 void set(String id, Color value, DockColor uiValue)
          Called by the UIProperties when one resource or UIValue has been exchanged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedColorBridge

public ExtendedColorBridge(ColorBridge bridge,
                           CColorBridge[] extensions)
Creates a new bridge.

Parameters:
bridge - the delegate
extensions - the extensions that are asked first
Method Detail

add

public void add(String id,
                DockColor uiValue)
Description copied from interface: UIBridge
Adds a new UIValue that gets its resource from this bridge.

Specified by:
add in interface UIBridge<Color,DockColor>
Parameters:
id - the id of the resource the new value needs
uiValue - a value that can be modified by this bride

remove

public void remove(String id,
                   DockColor uiValue)
Description copied from interface: UIBridge
Removes a value from this bridge.

Specified by:
remove in interface UIBridge<Color,DockColor>
Parameters:
id - the id of the resource the value needed
uiValue - the value that is no longer in use

set

public void set(String id,
                Color value,
                DockColor uiValue)
Description copied from interface: UIBridge
Called by the UIProperties when one resource or UIValue has been exchanged. Normally an UIBridge can just call UIValue.set(Object) with the argument value.
This method may also be called with an UIValue that was not added to this UIBridge.

Specified by:
set in interface UIBridge<Color,DockColor>
Parameters:
id - the identifier of the resource
value - the new resource, can be null
uiValue - the value that is affected by the change