|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.common.intern.ui.UITransmitter<FontModifier,DockFont> bibliothek.gui.dock.common.intern.font.FontTransmitter
public abstract class FontTransmitter
A FontTransmitter
observes some FontMap
and transmits
FontModifier
s of these maps to a set of DockFont
s.
Constructor Summary | |
---|---|
FontTransmitter(FontManager manager,
java.lang.String... keys)
Creates a new FontTransmitter . |
Method Summary | |
---|---|
protected void |
connect(CDockable dockable)
Adds a listener to dockable and calls
UITransmitter.update(CDockable, String, Object) whenever some value
needs an update. |
protected void |
disconnect(CDockable dockable)
Removes a listener from dockable . |
protected abstract FontModifier |
get(FontModifier value,
java.lang.String id,
CDockable dockable)
Transforms value into the form that should be used together
with dockable . |
protected FontModifier |
getFirstNonNull(FontMap map,
java.lang.String... keys)
Gets the first non- null color of map that
matches a given key. |
protected abstract boolean |
isObservedMapKey(java.lang.String key)
Tells whether key is one of the keys observed in
the FontMap . |
protected void |
update(CDockable dockable,
java.lang.String key,
FontModifier value)
Called when a value in an observed map has changed. |
Methods inherited from class bibliothek.gui.dock.common.intern.ui.UITransmitter |
---|
add, get, getDockable, remove, set, set, setControl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.util.UIBridge |
---|
add, remove, set |
Constructor Detail |
---|
public FontTransmitter(FontManager manager, java.lang.String... keys)
FontTransmitter
.
manager
- the source of original valueskeys
- the keys which should be monitored by this transmitterMethod Detail |
---|
protected FontModifier getFirstNonNull(FontMap map, java.lang.String... keys)
null
color of map
that
matches a given key.
map
- a map of colorskeys
- some keys that will be read from index 0 upward.
Color
that is not null
or null
protected void connect(CDockable dockable)
UITransmitter
dockable
and calls
UITransmitter.update(CDockable, String, Object)
whenever some value
needs an update.
connect
in class UITransmitter<FontModifier,DockFont>
dockable
- the element to observeprotected void disconnect(CDockable dockable)
UITransmitter
dockable
.
disconnect
in class UITransmitter<FontModifier,DockFont>
dockable
- the element from which a listener should be removedprotected void update(CDockable dockable, java.lang.String key, FontModifier value)
UITransmitter
update
in class UITransmitter<FontModifier,DockFont>
dockable
- the owner of the mapkey
- the name of the changed valuevalue
- the new value in the map, can be null
protected abstract boolean isObservedMapKey(java.lang.String key)
key
is one of the keys observed in
the FontMap
.
key
- the key which might be observed
true
if a change of key
can
result in a change of fontsprotected abstract FontModifier get(FontModifier value, java.lang.String id, CDockable dockable)
value
into the form that should be used together
with dockable
.
value
- some default value for id
id
- some of the keys specified for observationdockable
- the element for which the value would be used
value
or a transformed version of value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |