public class HierarchyDockActionSource extends AbstractDockActionSource
DockActionSource
which observes the hierarchy of a Dockable
and changes its content using DockController.listOffers(bibliothek.gui.Dockable)
.bind()
to connect the source with its Dockable
,
and unbind()
to free resources.listeners
Constructor and Description |
---|
HierarchyDockActionSource(Dockable dockable)
Creates a new source.
|
Modifier and Type | Method and Description |
---|---|
void |
addDockActionSourceListener(DockActionSourceListener listener)
Adds a listener to this source.
|
void |
bind()
Ensures that this source observes its Dockable.
|
DockAction |
getDockAction(int index)
Gets the index'th
DockAction of this source. |
int |
getDockActionCount()
Gets the number of
DockActions which are
provided by this source. |
LocationHint |
getLocationHint()
Gets a hint where to put this source in relation to other sources.
|
Iterator<DockAction> |
iterator() |
void |
removeDockActionSourceListener(DockActionSourceListener listener)
Removes an earlier added listener.
|
void |
unbind()
Ensures that this source frees resources.
|
void |
update()
Updates the list of actions known to this source.
|
fireAdded, fireRemoved, hasListeners, indexOf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public HierarchyDockActionSource(Dockable dockable)
dockable
- the Dockable to observepublic void bind()
public void unbind()
public void update()
public void addDockActionSourceListener(DockActionSourceListener listener)
DockActionSource
DockActionSourceListener
should
be informed whenever some DockActions
are added or
removed from this source.addDockActionSourceListener
in interface DockActionSource
addDockActionSourceListener
in class AbstractDockActionSource
listener
- The listenerpublic void removeDockActionSourceListener(DockActionSourceListener listener)
DockActionSource
removeDockActionSourceListener
in interface DockActionSource
removeDockActionSourceListener
in class AbstractDockActionSource
listener
- The listener to removeDockActionSource.addDockActionSourceListener(DockActionSourceListener)
public DockAction getDockAction(int index)
DockActionSource
DockAction
of this source.index
- The index of the actionpublic int getDockActionCount()
DockActionSource
DockActions
which are
provided by this source.DockActions
public LocationHint getLocationHint()
DockActionSource
ActionOffer
can choose to ignore these hints, or interpret
them in an unexpected way.public Iterator<DockAction> iterator()