public class DefaultDockActionSource extends AbstractDockActionSource
DockActions that may be changed at any time.listeners| Constructor and Description |
|---|
DefaultDockActionSource(DockAction... actions)
Default constructor, fills the list with some initial actions.
|
DefaultDockActionSource(LocationHint hint,
DockAction... actions)
Default constructor, fills the list with some initial actions.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(DockAction... action)
Adds all given actions to the end of this source.
|
void |
add(int index,
DockAction... actions)
Inserts all given actions such that the first action
will have the given
index, the second action
index+1, and so on... |
void |
addSeparator()
Adds a separator at the end of this source
|
void |
addSeparator(int position)
Adds a separator at
position |
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.
|
int |
indexOf(DockAction action)
Gets the index of the given
action |
Iterator<DockAction> |
iterator() |
void |
remove(DockAction action)
Removes the given
action from this source. |
void |
remove(int index)
Removes the action at
index from this source. |
void |
remove(int index,
int length)
Removes all actions between
index (incl.)
and index+length (excl.). |
void |
removeAll()
Removes all actions stored in this source.
|
void |
setHint(LocationHint hint)
Sets the location-hint of this source.
|
addDockActionSourceListener, fireAdded, fireRemoved, hasListeners, removeDockActionSourceListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultDockActionSource(DockAction... actions)
actions - The actions to addpublic DefaultDockActionSource(LocationHint hint, DockAction... actions)
hint - the preferred location of this sourceactions - The actions to addpublic Iterator<DockAction> iterator()
public void setHint(LocationHint hint)
hint - the hint that tells an ActionOffer where to
put this source.public LocationHint getLocationHint()
DockActionSourceActionOffer can choose to ignore these hints, or interpret
them in an unexpected way.public int getDockActionCount()
DockActionSourceDockActions which are
provided by this source.DockActionspublic DockAction getDockAction(int index)
DockActionSourceDockAction of this source.index - The index of the actionpublic void addSeparator(int position)
positionposition - the location where to add the separatorpublic void addSeparator()
public void add(DockAction... action)
action - The actions to appendpublic void add(int index,
DockAction... actions)
index, the second action
index+1, and so on...index - The index of the first actionactions - The actions to insertpublic int indexOf(DockAction action)
AbstractDockActionSourceactionindexOf in class AbstractDockActionSourceaction - The action to search in this sourcepublic void remove(DockAction action)
action from this source.action - The action to removepublic void remove(int index)
index from this source.index - The index of the action to removepublic void removeAll()
public void remove(int index,
int length)
index (incl.)
and index+length (excl.).index - The index of the first action to removelength - The number of actions to removeIllegalArgumentException - If some actions should be removed that
do not existCopyright © 2017 Docking Frames. All rights reserved.