|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.util.color.MultiColorProvider<D>
D
- the kind of DockColor
s this provider handles.public class MultiColorProvider<D extends DockColor>
A ColorProvider
which uses other providers to handle some
colors.
Constructor Summary | |
---|---|
MultiColorProvider(ColorManager manager)
Creates a new ColorProvider . |
Method Summary | |
---|---|
void |
add(String id,
D color)
Adds a listener for some type of color to this provider. |
ColorProvider<? super D> |
getProvider(String id)
Searches the provider that handles colors with the key id . |
void |
put(String id,
ColorProvider<? super D> provider)
Specifies a provider that handles all calls regarding id . |
void |
remove(String id,
D color)
Removes a listener for some type of color from this provider. |
void |
set(String id,
Color color,
D observer)
Called by a ColorManager when one color has been exchanged. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiColorProvider(ColorManager manager)
ColorProvider
.
manager
- the manager from whom this provider will get default
colors when necessaryMethod Detail |
---|
public void put(String id, ColorProvider<? super D> provider)
id
.
id
- the key of the color provider
should handleprovider
- the new provider or null
public ColorProvider<? super D> getProvider(String id)
id
.
id
- the key of the colors
null
public void add(String id, D color)
ColorProvider
add
in interface ColorProvider<D extends DockColor>
id
- the id of the color the observer needscolor
- the new listenerpublic void remove(String id, D color)
ColorProvider
remove
in interface ColorProvider<D extends DockColor>
id
- the id of the color which the observer was observingcolor
- the listener to removepublic void set(String id, Color color, D observer)
ColorProvider
ColorManager
when one color has been exchanged.
Normally a provider would call DockColor.set(Color)
on
observer
with color
as argument.
set
in interface ColorProvider<D extends DockColor>
id
- the identifier of the colorcolor
- the new color, can be null
observer
- the observer which is affected
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |