|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.dockable.DockHierarchyObserver
public class DockHierarchyObserver
A helper class that is able to send DockHierarchyEvent
s to
DockHierarchyListener
s. A Dockable
might have one instance
of an observer. Whenever the parent-station of the Dockable changes, it
calls update()
and the observer ensures that all events are
send properly. The client should call controllerChanged(DockController)
whenever
the DockController
changes. This observer will automatically monitor the super-parents
of its owner and fire events when necessary.
Constructor Summary | |
---|---|
DockHierarchyObserver(Dockable owner)
Creates a new observer. |
Method Summary | |
---|---|
void |
addDockHierarchyListener(DockHierarchyListener listener)
Stores a listener which is informed when the path of the owner has changed. |
void |
controllerChanged(DockController controller)
Invoked by the owner in order to fire a DockHierarchyEvent |
void |
controllerChanged(DockHierarchyEvent event)
Invoked whenever the controller of dockable has changed |
protected void |
fireControllerChanged(DockController controller)
Informs all listeners that the controller of the owner has been changed. |
protected void |
fireHierarchyChanged()
Fires a DockHierarchyEvent to all registered listeners. |
void |
hierarchyChanged(DockHierarchyEvent event)
Called when the path of the observed Dockable has been changed. |
void |
removeDockHierarchyListener(DockHierarchyListener listener)
Removes an earlier stored listener. |
void |
update()
Builds up a new path of parents and adds this listeners to each parent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockHierarchyObserver(Dockable owner)
owner
- the Dockable for which events are firedMethod Detail |
---|
public void hierarchyChanged(DockHierarchyEvent event)
DockHierarchyListener
Dockable
has been changed.
hierarchyChanged
in interface DockHierarchyListener
event
- the new pathpublic void controllerChanged(DockHierarchyEvent event)
DockHierarchyListener
dockable
has changed
controllerChanged
in interface DockHierarchyListener
event
- the current path and controllerpublic void controllerChanged(DockController controller)
DockHierarchyEvent
controller
- the new controllerpublic void addDockHierarchyListener(DockHierarchyListener listener)
listener
- the new listenerpublic void removeDockHierarchyListener(DockHierarchyListener listener)
listener
- the listener to removeprotected void fireHierarchyChanged()
DockHierarchyEvent
to all registered listeners.
protected void fireControllerChanged(DockController controller)
controller
- the new controllerpublic void update()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |