public abstract class FilteredDockActionSource extends AbstractDockActionSource
listeners| Constructor and Description |
|---|
FilteredDockActionSource(DockActionSource source)
Creates a new filtered DockActionSource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDockActionSourceListener(DockActionSourceListener listener)
Adds a listener to this source.
|
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.
|
protected abstract boolean |
include(DockAction action)
Tells whether
action should be included in the list of
actions of this source, or not. |
Iterator<DockAction> |
iterator() |
void |
refresh()
Recalculates the visibility of all actions and fires events to the registered
DockActionSourceListener
if the state of an action changed. |
void |
removeDockActionSourceListener(DockActionSourceListener listener)
Removes an earlier added listener.
|
fireAdded, fireRemoved, hasListeners, indexOfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic FilteredDockActionSource(DockActionSource source)
source - the source from which DockActions are fetched,
must not be nullpublic Iterator<DockAction> iterator()
public void addDockActionSourceListener(DockActionSourceListener listener)
DockActionSourceDockActionSourceListener should
be informed whenever some DockActions are added or
removed from this source.addDockActionSourceListener in interface DockActionSourceaddDockActionSourceListener in class AbstractDockActionSourcelistener - The listenerpublic void removeDockActionSourceListener(DockActionSourceListener listener)
DockActionSourceremoveDockActionSourceListener in interface DockActionSourceremoveDockActionSourceListener in class AbstractDockActionSourcelistener - The listener to removeDockActionSource.addDockActionSourceListener(DockActionSourceListener)public DockAction getDockAction(int index)
DockActionSourceDockAction of this source.index - The index of the actionpublic int getDockActionCount()
DockActionSourceDockActions which are
provided by this source.DockActionspublic LocationHint getLocationHint()
DockActionSourceActionOffer can choose to ignore these hints, or interpret
them in an unexpected way.public void refresh()
DockActionSourceListener
if the state of an action changed.protected abstract boolean include(DockAction action)
action should be included in the list of
actions of this source, or not.action - the action to testtrue if action should be shownCopyright © 2017 Docking Frames. All rights reserved.