|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.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. |
java.util.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(java.util.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, 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 null
hint
- the preferred location of this DockActionSource
, may be null
Method Detail |
---|
public Dockable getDockable()
null
public LocationHint getLocationHint()
DockActionSource
ActionOffer
can choose to ignore these hints, or interpret
them in an unexpected way.
public DockAction getDockAction(int index)
DockActionSource
DockAction
of this source.
index
- The index of the action
public int getDockActionCount()
DockActionSource
DockActions
which are
provided by this source.
DockActions
public java.util.Iterator<DockAction> iterator()
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)
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
null
protected void sort(java.util.List<Dockable> dockables)
DockStation
s
and Dockable
s). 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 |