|
||||||||||
| 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.MultiDockActionSource
public class MultiDockActionSource
A DockActionSource that combines various sources in one source.
This source behaves like a list of DockActionSources.
| Field Summary |
|---|
| Fields inherited from class bibliothek.gui.dock.action.AbstractDockActionSource |
|---|
listeners |
| Constructor Summary | |
|---|---|
MultiDockActionSource(DockActionSource... sources)
Constructs a new source. |
|
MultiDockActionSource(LocationHint hint,
DockActionSource... sources)
Constructs a new source. |
|
| Method Summary | |
|---|---|
void |
add(DockAction... actions)
Adds several actions to this source. |
void |
add(DockActionSource source)
Adds a source as child of this source. |
void |
addDockActionSourceListener(DockActionSourceListener listener)
Adds a listener to this source. |
void |
addSeparator()
Adds a separator at the end of the current list of actions |
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. |
protected int |
getDockActionCountUntil(int index,
boolean allowUpdate)
Counts how many DockActions are provided by the
source-children with index 0 (incl) to index (excl). |
LocationHint |
getLocationHint()
Gets a hint where to put this source in relation to other sources. |
protected int |
getSource(DockAction action)
Gets the index of the child-source which contains action. |
boolean |
isSeparateSources()
Tells whether there is a separator between sources or not |
java.util.Iterator<DockAction> |
iterator()
|
void |
remove(DockActionSource source)
Removes source from this MultiDockActionSource. |
void |
removeAll()
Removes all children of this source. |
void |
removeDockActionSourceListener(DockActionSourceListener listener)
Removes an earlier added listener. |
void |
setHint(LocationHint hint)
Sets the location-hint of this source. |
void |
setSeparateSources(boolean separateSources)
Sets whether there are separators between the children of this source or not. |
| 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 MultiDockActionSource(DockActionSource... sources)
sources are added as children
of this source.
sources - The children of this source
public MultiDockActionSource(LocationHint hint,
DockActionSource... sources)
sources are added as children
of this source.
hint - the preferred location of this sourcesources - The children of this source| Method Detail |
|---|
public java.util.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)public LocationHint getLocationHint()
DockActionSourceActionOffer can choose to ignore these hints, or interpret
them in an unexpected way.
public void setHint(LocationHint hint)
hint - the hint that tells an ActionOffer where to
put this source.public void addSeparator()
public boolean isSeparateSources()
true if there is a separatorpublic void setSeparateSources(boolean separateSources)
separateSources - true if children should be separatedpublic void add(DockActionSource source)
DockActions
of source will be presented as actions of this source.
source - the new childpublic void remove(DockActionSource source)
source from this MultiDockActionSource.
source - the child to removepublic void removeAll()
public void add(DockAction... actions)
actions - the new actionspublic int getDockActionCount()
DockActionSourceDockActions which are
provided by this source.
DockActionsprotected int getSource(DockAction action)
action.
action - the action for which is searched
protected int getDockActionCountUntil(int index,
boolean allowUpdate)
DockActions are provided by the
source-children with index 0 (incl) to index (excl).
index - the index of the first source that should not be countedallowUpdate - whether the updateSeparators() can be called
by this method or not
index
child-sources.public DockAction getDockAction(int index)
DockActionSourceDockAction of this source.
index - The index of the action
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||