|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.action.AbstractDockActionSource
public abstract class AbstractDockActionSource
A simple implementation of DockActionSource
that just handles
the listeners
for sources.
Field Summary | |
---|---|
protected List<DockActionSourceListener> |
listeners
The listeners which are registered on this source |
Constructor Summary | |
---|---|
AbstractDockActionSource()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.action.DockActionSource |
---|
getDockAction, getDockActionCount, getLocationHint |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Field Detail |
---|
protected List<DockActionSourceListener> listeners
Constructor Detail |
---|
public AbstractDockActionSource()
Method Detail |
---|
public void addDockActionSourceListener(DockActionSourceListener listener)
DockActionSource
DockActionSourceListener
should
be informed whenever some DockActions
are added or
removed from this source.
addDockActionSourceListener
in interface DockActionSource
listener
- The listenerpublic void removeDockActionSourceListener(DockActionSourceListener listener)
DockActionSource
removeDockActionSourceListener
in interface DockActionSource
listener
- 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)
action
action
- The action to search in this source
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |