public class IdentifiedColorScheme extends AbstractColorScheme
ColorScheme
that is wrapped around another scheme. This scheme
contains a unmodifiable String
which is used for equals(Object)
and for hashCode()
.COLOR_SCHEME_PARAMETER, EXTENSION_NAME
Constructor and Description |
---|
IdentifiedColorScheme(java.lang.String id,
ColorScheme delegate)
Creates a new scheme.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(UISchemeListener<java.awt.Color,DockColor,ColorBridge> listener)
Adds a listener to this scheme.
|
boolean |
equals(java.lang.Object obj) |
ColorBridge |
getBridge(Path name,
UIProperties<java.awt.Color,DockColor,ColorBridge> properties)
Creates the
UIBridge that handles resources of type name . |
java.awt.Color |
getResource(java.lang.String name,
UIProperties<java.awt.Color,DockColor,ColorBridge> properties)
Creates the resource with name
name . |
int |
hashCode() |
void |
install(UIProperties<java.awt.Color,DockColor,ColorBridge> properties)
Informs this scheme that it is now used by
properties . |
void |
removeListener(UISchemeListener<java.awt.Color,DockColor,ColorBridge> listener)
Removes a listener from this scheme.
|
void |
uninstall(UIProperties<java.awt.Color,DockColor,ColorBridge> properties)
Informs this scheme that it is no longer used by
properties . |
protected void |
updateUI()
Called when the look and feel changed.
|
fire, hasListeners, listeners, managers
public IdentifiedColorScheme(java.lang.String id, ColorScheme delegate)
id
- the unique identifier of this schemedelegate
- the source for any value of this schemejava.lang.IllegalArgumentException
- if either id
or
delegate
is null
public void addListener(UISchemeListener<java.awt.Color,DockColor,ColorBridge> listener)
UIScheme
addListener
in interface UIScheme<java.awt.Color,DockColor,ColorBridge>
addListener
in class AbstractColorScheme
listener
- the new listener, not null
public void removeListener(UISchemeListener<java.awt.Color,DockColor,ColorBridge> listener)
UIScheme
removeListener
in interface UIScheme<java.awt.Color,DockColor,ColorBridge>
removeListener
in class AbstractColorScheme
listener
- the listener to removepublic void install(UIProperties<java.awt.Color,DockColor,ColorBridge> properties)
UIScheme
properties
.install
in interface UIScheme<java.awt.Color,DockColor,ColorBridge>
install
in class AbstractColorScheme
properties
- the owner of this schemepublic void uninstall(UIProperties<java.awt.Color,DockColor,ColorBridge> properties)
UIScheme
properties
.uninstall
in interface UIScheme<java.awt.Color,DockColor,ColorBridge>
uninstall
in class AbstractColorScheme
properties
- an old client of this schemeprotected void updateUI()
AbstractColorScheme
updateUI
in class AbstractColorScheme
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public ColorBridge getBridge(Path name, UIProperties<java.awt.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
public java.awt.Color getResource(java.lang.String name, UIProperties<java.awt.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