|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.action.AbstractDockActionSource
bibliothek.gui.dock.action.StationChildrenActionSource
public class StationChildrenActionSource
This DockActionSource is a wrapper around a Dockable or a DockStation
and adds one DockAction for each child of the station to itself. Subclasses may implement
a filter to show more or less actions.
| Nested Class Summary | |
|---|---|
protected class |
StationChildrenActionSource.FocusAction
An action that can transfer the focus |
| Field Summary |
|---|
| Fields inherited from class bibliothek.gui.dock.action.AbstractDockActionSource |
|---|
listeners |
| Constructor Summary | |
|---|---|
StationChildrenActionSource(Dockable dockable,
LocationHint hint)
Creates a new action source. |
|
| Method Summary | |
|---|---|
void |
addDockActionSourceListener(DockActionSourceListener listener)
Adds a listener to this source. |
protected DockAction |
createActionFor(Dockable dockable)
Creates the DockAction which is shown for dockable. |
Dockable |
getDockable()
Gets the dockable or station which is managed by 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. |
Iterator<DockAction> |
iterator()
|
void |
removeDockActionSourceListener(DockActionSourceListener listener)
Removes an earlier added listener. |
protected boolean |
shouldShow(Dockable dockable)
Tells which children to show and which not. |
protected void |
sort(List<Dockable> dockables)
Puts an order in the dockables, telling which items to show when. |
| Methods inherited from class bibliothek.gui.dock.action.AbstractDockActionSource |
|---|
fireAdded, fireRemoved, hasListeners, indexOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StationChildrenActionSource(Dockable dockable,
LocationHint hint)
dockable - the dockable or station whose children to show, not nullhint - the preferred location of this DockActionSource, may be null| Method Detail |
|---|
public Dockable getDockable()
nullpublic LocationHint getLocationHint()
DockActionSourceActionOffer can choose to ignore these hints, or interpret
them in an unexpected way.
public DockAction getDockAction(int index)
DockActionSourceDockAction of this source.
index - The index of the action
public int getDockActionCount()
DockActionSourceDockActions which are
provided by this source.
DockActionspublic 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)
DockActionSource
removeDockActionSourceListener in interface DockActionSourceremoveDockActionSourceListener in class AbstractDockActionSourcelistener - The listener to removeDockActionSource.addDockActionSourceListener(DockActionSourceListener)protected DockAction createActionFor(Dockable dockable)
DockAction which is shown for dockable. The
default behavior is to create a ButtonDockAction which can be pressed
and will transfer the focus to dockable.
dockable - the item for which an action is required
nullprotected void sort(List<Dockable> dockables)
DockStations
and Dockables). Subclasses may also modify the list by adding or removing items,
altough a filter is better implemented by overriding shouldShow(Dockable)
dockables - the array to orderprotected boolean shouldShow(Dockable dockable)
true for
any direct child or true if the monitored dockable is no station at all.
dockable - the child to check
true if there should be a button, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||