|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.control.ComponentHierarchyObserver
public class ComponentHierarchyObserver
A class collecting all Components which are somehow used on or with
the Dockables in the realm of one DockController.
A global instance of ComponentHierarchyObserver can be obtained
through DockController.getComponentHierarchyObserver().
Note that a hierarchy observer may also know Components which are
not directly associated with Dockables.
| Constructor Summary | |
|---|---|
ComponentHierarchyObserver(DockController controller)
Creates a new observer. |
|
| Method Summary | |
|---|---|
void |
add(Component component)
Adds component and all its children to the set of
known Components. |
void |
addListener(ComponentHierarchyObserverListener listener)
Adds a listener to this observer. |
Set<Component> |
getComponents()
Gets a Set containing all Components which are
used on Dockables known in the realm of the DockController
of this observer. |
DockController |
getController()
Gets the controller in whose realm this observer searches for Components. |
protected ComponentHierarchyObserverListener[] |
listeners()
Gets an array containing all listeners that are registered at this observer. |
void |
remove(Component component)
Removes component and all its children from the set
of known Components. |
void |
removeListener(ComponentHierarchyObserverListener listener)
Removes a listener from this observer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentHierarchyObserver(DockController controller)
controller - the controller whose Dockables will be observed.| Method Detail |
|---|
public Set<Component> getComponents()
Set containing all Components which are
used on Dockables known in the realm of the DockController
of this observer.
Components.public DockController getController()
Components.
public void addListener(ComponentHierarchyObserverListener listener)
listener - the new listener, not nullpublic void removeListener(ComponentHierarchyObserverListener listener)
listener - the listener to removeprotected ComponentHierarchyObserverListener[] listeners()
public void add(Component component)
component and all its children to the set of
known Components. Components that are already known will
not be registered twice. This observer will notice when a child of
component changes and update itself accordingly.
component - the new componentpublic void remove(Component component)
component and all its children from the set
of known Components. If a child was added as a root, then
the recursion stops there because roots can't be removed implicitly.
component - the component to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||