public class CActionSource extends AbstractDockActionSource
DockActionSource
handles CAction
s.listeners
Constructor and Description |
---|
CActionSource(LocationHint hint)
Creates a new source.
|
Modifier and Type | Method and Description |
---|---|
void |
add(CAction action)
Adds an action to this source.
|
CAction |
getAction(int index)
Gets the
index 'th action of 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.
|
void |
insert(int index,
CAction action)
Inserts an action at
index of this source. |
java.util.Iterator<DockAction> |
iterator() |
boolean |
remove(CAction action)
Removes
action from this source. |
CAction |
remove(int index)
Removes the action at
index . |
CAction |
set(int index,
CAction action)
Replaces the action at
index with index . |
addDockActionSourceListener, fireAdded, fireRemoved, hasListeners, indexOf, removeDockActionSourceListener
public CActionSource(LocationHint hint)
hint
- the location of this sourcepublic void add(CAction action)
action
- the new action, not null
public void insert(int index, CAction action)
index
of this source.index
- an index between 0 and getDockActionCount()
(incl.)action
- the new action, not null
public CAction set(int index, CAction action)
index
with index
.index
- the index of the new actionaction
- the new action, not null
null
public CAction remove(int index)
index
.index
- the index of the action to removepublic boolean remove(CAction action)
action
from this source.action
- the action to removetrue
if the action was removedpublic CAction getAction(int index)
index
'th action of this source.index
- the index of some actionnull
public DockAction getDockAction(int index)
DockActionSource
DockAction
of this source.index
- The index of the actionpublic int getDockActionCount()
DockActionSource
DockActions
which are
provided by this source.DockActions
public LocationHint getLocationHint()
DockActionSource
ActionOffer
can choose to ignore these hints, or interpret
them in an unexpected way.public java.util.Iterator<DockAction> iterator()