bibliothek.gui.dock.common.intern.color
Class BubbleDisplayerTransmitter

java.lang.Object
  extended by bibliothek.gui.dock.common.intern.ui.UITransmitter<Color,DockColor>
      extended by bibliothek.gui.dock.common.intern.color.ColorTransmitter
          extended by bibliothek.gui.dock.common.intern.color.BubbleDisplayerTransmitter
All Implemented Interfaces:
ColorBridge, UIBridge<Color,DockColor>

public class BubbleDisplayerTransmitter
extends ColorTransmitter

A transmitter connecting ColorMap and BubbleDisplayer.

Author:
Benjamin Sigg

Constructor Summary
BubbleDisplayerTransmitter(ColorManager manager)
          Creates a new transmitter.
 
Method Summary
protected  Color convert(Color source, String key)
          Converts a color given by a ColorMap to the color needed on the displayer.
protected  Color convertFocused(Color source, String key)
          Converts a color given by a ColorMap to the color needed on the displayer.
protected  Color get(Color color, String id, CDockable dockable)
          Searches for a color that fits for the color with name id.
protected  Color get(Color color, String id, DockColor observer)
          Called when a value needs to be set whose key has been registered at this UITransmitter.
protected  CDockable getDockable(DockColor observer)
          Gets the CDockable which is associated with observer.
protected  void update(CDockable dockable, String key, Color color)
          Called when a value in an observed map has changed.
 
Methods inherited from class bibliothek.gui.dock.common.intern.color.ColorTransmitter
connect, disconnect, getFirstNonNull
 
Methods inherited from class bibliothek.gui.dock.common.intern.ui.UITransmitter
add, remove, set, set, setControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.util.UIBridge
add, remove, set
 

Constructor Detail

BubbleDisplayerTransmitter

public BubbleDisplayerTransmitter(ColorManager manager)
Creates a new transmitter.

Parameters:
manager - the source for new colors
Method Detail

get

protected Color get(Color color,
                    String id,
                    DockColor observer)
Description copied from class: UITransmitter
Called when a value needs to be set whose key has been registered at this UITransmitter.

Specified by:
get in class UITransmitter<Color,DockColor>
Parameters:
color - the original value
id - the key of the value
observer - the destination for the value
Returns:
the value that should be set to observer

get

protected Color get(Color color,
                    String id,
                    CDockable dockable)
Searches for a color that fits for the color with name id.

Parameters:
color - the original color
id - the name of the requested color
dockable - the element for which the color will be used
Returns:
either a new color or color

update

protected void update(CDockable dockable,
                      String key,
                      Color color)
Description copied from class: UITransmitter
Called when a value in an observed map has changed.

Specified by:
update in class UITransmitter<Color,DockColor>
Parameters:
dockable - the owner of the map
key - the name of the changed value
color - the new value in the map, can be null

convert

protected Color convert(Color source,
                        String key)
Converts a color given by a ColorMap to the color needed on the displayer.

Parameters:
source - the source color
key - the color that is needed
Returns:
the converted source, can be null

convertFocused

protected Color convertFocused(Color source,
                               String key)
Converts a color given by a ColorMap to the color needed on the displayer.

Parameters:
source - the source color
key - the color that is needed, the color is needed for a focused view
Returns:
the converted source, can be null

getDockable

protected CDockable getDockable(DockColor observer)
Description copied from class: UITransmitter
Gets the CDockable which is associated with observer.

Specified by:
getDockable in class UITransmitter<Color,DockColor>
Parameters:
observer - some observer
Returns:
the associated dockable or null