public class DefaultColorScheme extends AbstractColorScheme
ColorScheme
just uses some maps
to store its colors.
Warning: this class will be replaced in version 1.1.0COLOR_SCHEME_PARAMETER, EXTENSION_NAME
Constructor and Description |
---|
DefaultColorScheme() |
Modifier and Type | Method and Description |
---|---|
ColorBridge |
getBridge(Path name,
UIProperties<Color,DockColor,ColorBridge> properties)
Creates the
UIBridge that handles resources of type name . |
ColorBridgeFactory |
getBridgeFactory(Path kind)
Gets the factory that creates bridges for
kind . |
Color |
getColor(String id)
Gets the color that best matches the identifier
id . |
Color |
getResource(String name,
UIProperties<Color,DockColor,ColorBridge> properties)
Creates the resource with name
name . |
void |
setBridgeFactory(Path kind,
ColorBridgeFactory bridge)
Sets how to modify some
kind of DockColor s. |
void |
setColor(String id,
Color color)
Sets the value of some color.
|
void |
setNullColor(String id)
Sets the value of some color explicitely to
null , this is not the same as calling
setColor(String, Color) : setColor removes the entry, this method keeps the entry
but sets it to null . |
protected void |
updateUI()
Called when the look and feel changed.
|
addListener, fire, hasListeners, install, listeners, managers, removeListener, uninstall
public ColorBridge getBridge(Path name, UIProperties<Color,DockColor,ColorBridge> properties)
UIScheme
UIBridge
that handles resources of type name
.name
- the name of the bridgeproperties
- the map that will use the resourcenull
if this scheme does not know name
protected void updateUI()
AbstractColorScheme
updateUI
in class AbstractColorScheme
public void setBridgeFactory(Path kind, ColorBridgeFactory bridge)
kind
of DockColor
s.kind
- the kind of DockColor
s the bridge works withbridge
- the factory for modifications or null
public void setColor(String id, Color color)
id
- the identifier of the colorcolor
- the color or null
setNullColor(String)
public void setNullColor(String id)
null
, this is not the same as calling
setColor(String, Color)
: setColor
removes the entry, this method keeps the entry
but sets it to null
.id
- the identifier of the color to set explicitely to null
public Color getResource(String name, UIProperties<Color,DockColor,ColorBridge> properties)
UIScheme
name
. This method may be called often
and should complete quickly.name
- the name of some resourceproperties
- the map that will use the resourcenull
if this scheme does not know name
public Color getColor(String id)
id
.id
- some identifiernull
, the color may not be stored with the exact identifier id
public ColorBridgeFactory getBridgeFactory(Path kind)
kind
.kind
- some identifier for a typekind
or null