Class UITransmitter<V,U extends UIValue<V>>
java.lang.Object
bibliothek.gui.dock.common.intern.ui.UITransmitter<V,U>
- Type Parameters:
V- the kind of value that is described by theUIValueU- the kind ofUIValueused in this transmitter
- All Implemented Interfaces:
UIBridge<V,U>
- Direct Known Subclasses:
ColorTransmitter,FontTransmitter
An
UITransmitter listens to some kind of map
and updates some UIValues when the contents of that map change.- Author:
- Benjamin Sigg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voidAdds a listener todockableand callsupdate(CDockable, String, Object)whenever some value needs an update.protected abstract voiddisconnect(CDockable dockable) Removes a listener fromdockable.protected abstract VCalled when a value needs to be set whose key has been registered at thisUITransmitter.protected abstract CDockablegetDockable(U observer) Gets theCDockablewhich is associated withobserver.voidprotected voidTransmitsvalueto allUIValues which listen to the given id and which are associated withdockable.voidvoidsetControl(CControl control) protected abstract voidCalled when a value in an observed map has changed.
-
Constructor Details
-
UITransmitter
Creates a newColorTransmitter.- Parameters:
keys- the keys which should be monitored by this transmitter
-
-
Method Details
-
add
-
remove
-
setControl
- Parameters:
control- the observed control, can benull
-
set
-
get
Called when a value needs to be set whose key has been registered at thisUITransmitter.- Parameters:
value- the original valueid- the key of the valueobserver- the destination for the value- Returns:
- the value that should be set to
observer
-
update
Called when a value in an observed map has changed.- Parameters:
dockable- the owner of the mapkey- the name of the changed valuevalue- the new value in the map, can benull
-
getDockable
Gets theCDockablewhich is associated withobserver.- Parameters:
observer- some observer- Returns:
- the associated dockable or
null
-
set
Transmitsvalueto allUIValues which listen to the given id and which are associated withdockable.- Parameters:
id- the id of the changed valuevalue- the new value, might benulldockable- the associated dockable, might benull
-
connect
Adds a listener todockableand callsupdate(CDockable, String, Object)whenever some value needs an update.- Parameters:
dockable- the element to observe
-
disconnect
Removes a listener fromdockable.- Parameters:
dockable- the element from which a listener should be removed
-