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 DockColors. |
void |
setColor(String id,
Color color)
Sets the value of some color.
|
void |
setNullColor(String id)
Sets the value of some color explicitly 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, uninstallpublic ColorBridge getBridge(Path name, UIProperties<Color,DockColor,ColorBridge> properties)
UISchemeUIBridge 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 nameprotected void updateUI()
AbstractColorSchemeupdateUI in class AbstractColorSchemepublic void setBridgeFactory(Path kind, ColorBridgeFactory bridge)
kind of DockColors.kind - the kind of DockColors the bridge works withbridge - the factory for modifications or nullpublic void setColor(String id, Color color)
id - the identifier of the colorcolor - the color or nullsetNullColor(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 explicitly to nullpublic Color getResource(String name, UIProperties<Color,DockColor,ColorBridge> properties)
UISchemename. 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 namepublic Color getColor(String id)
id.id - some identifiernull, the color may not be stored with the exact identifier idpublic ColorBridgeFactory getBridgeFactory(Path kind)
kind.kind - some identifier for a typekind or nullCopyright © 2017 Docking Frames. All rights reserved.