bibliothek.gui.dock.util
Interface UIScheme<V,U extends UIValue<V>,B extends UIBridge<V,U>>

Type Parameters:
V - The kind of values this map contains
U - The kind of observers used to read values from this map
B - The kind of bridges used to transfer values V to observers U
All Known Subinterfaces:
ColorScheme
All Known Implementing Classes:
AbstractColorScheme, AbstractIconScheme, AbstractUIScheme, BasicColorScheme, BubbleColorScheme, DefaultColorScheme, DefaultIconScheme, DefaultTextScheme, EclipseColorScheme, ExtendingColorScheme, FlatColorScheme, IdentifiedColorScheme, SimpleBubbleColorScheme, TypedPropertyUIScheme

public interface UIScheme<V,U extends UIValue<V>,B extends UIBridge<V,U>>

An algorithm that can create missing entries for an UIPropertiess.

Author:
Benjamin Sigg

Method Summary
 void addListener(UISchemeListener<V,U,B> listener)
          Adds a listener to this scheme.
 B getBridge(Path name, UIProperties<V,U,B> properties)
          Creates the UIBridge that handles resources of type name.
 V getResource(String name, UIProperties<V,U,B> properties)
          Creates the resource with name name.
 void install(UIProperties<V,U,B> properties)
          Informs this scheme that it is now used by properties.
 void removeListener(UISchemeListener<V,U,B> listener)
          Removes a listener from this scheme.
 void uninstall(UIProperties<V,U,B> properties)
          Informs this scheme that it is no longer used by properties.
 

Method Detail

install

void install(UIProperties<V,U,B> properties)
Informs this scheme that it is now used by properties.

Parameters:
properties - the owner of this scheme

uninstall

void uninstall(UIProperties<V,U,B> properties)
Informs this scheme that it is no longer used by properties.

Parameters:
properties - an old client of this scheme

getResource

V getResource(String name,
              UIProperties<V,U,B> properties)
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

getBridge

B getBridge(Path name,
            UIProperties<V,U,B> properties)
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

addListener

void addListener(UISchemeListener<V,U,B> listener)
Adds a listener to this scheme.

Parameters:
listener - the new listener, not null

removeListener

void removeListener(UISchemeListener<V,U,B> listener)
Removes a listener from this scheme.

Parameters:
listener - the listener to remove