public abstract class AbstractDockActionSource extends Object implements DockActionSource
DockActionSource that just handles
the listeners for sources.| Modifier and Type | Field and Description |
|---|---|
protected List<DockActionSourceListener> |
listeners
The listeners which are registered on this source
|
| Constructor and Description |
|---|
AbstractDockActionSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDockActionSourceListener(DockActionSourceListener listener)
Adds a listener to this source.
|
protected void |
fireAdded(int firstIndex,
int lastIndex)
Invokes the
actionsAdded-method
on all registered DockActionSourceListeners. |
protected void |
fireRemoved(int firstIndex,
int lastIndex)
Invokes the
actionRemoved-method
on all registered DockActionSourceListeners. |
boolean |
hasListeners()
Checks whether this
DockActionSource has at least one registered DockActionSourceListener. |
int |
indexOf(DockAction action)
Gets the index of the given
action |
void |
removeDockActionSourceListener(DockActionSourceListener listener)
Removes an earlier added listener.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDockAction, getDockActionCount, getLocationHintforEach, iterator, spliteratorprotected List<DockActionSourceListener> listeners
public void addDockActionSourceListener(DockActionSourceListener listener)
DockActionSourceDockActionSourceListener should
be informed whenever some DockActions are added or
removed from this source.addDockActionSourceListener in interface DockActionSourcelistener - The listenerpublic void removeDockActionSourceListener(DockActionSourceListener listener)
DockActionSourceremoveDockActionSourceListener in interface DockActionSourcelistener - The listener to removeDockActionSource.addDockActionSourceListener(DockActionSourceListener)public boolean hasListeners()
DockActionSource has at least one registered DockActionSourceListener.protected void fireAdded(int firstIndex,
int lastIndex)
actionsAdded-method
on all registered DockActionSourceListeners.firstIndex - The index of the first action that was addedlastIndex - The index of the last action that was addedprotected void fireRemoved(int firstIndex,
int lastIndex)
actionRemoved-method
on all registered DockActionSourceListeners.firstIndex - The old index of the first action that was removedlastIndex - The old index of the last action that was removedpublic int indexOf(DockAction action)
actionaction - The action to search in this sourceCopyright © 2017 Docking Frames. All rights reserved.