public class ComponentActionList extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ComponentActionList.ActionEntry
Entry for a scheduled action.
|
Constructor and Description |
---|
ComponentActionList(IEnvironmentSpace space)
Create a new action list.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponentAction(ComponentActionList.ActionEntry entry)
Add an component action.
|
void |
cancelComponentAction(int id)
Cancels a component action.
|
void |
executeActions(IFilter filter,
boolean wakeup)
Should be called on environment thread only.
|
ComponentActionList.ActionEntry[] |
getActionEntries()
Get the queued entries, which have not yet been executed.
|
void |
removeComponentAction(ComponentActionList.ActionEntry entry)
Remove an component action.
|
int |
scheduleComponentAction(ISpaceAction action,
Map parameters,
IResultListener listener)
Schedules an component action.
|
void |
setOrdering(Comparator comp)
Set an ordering used for executing actions.
|
void |
setScheduleCommand(ICommand cmd)
Set the schedule command to be invoked, when an action should be scheduled.
|
void |
wakeupComponents(IFilter filter)
Should be called on environment thread only.
|
public ComponentActionList(IEnvironmentSpace space)
public int scheduleComponentAction(ISpaceAction action, Map parameters, IResultListener listener)
action
- The action.parameters
- parameters for the action (may be null)listener
- the result listenerpublic void cancelComponentAction(int id)
public void addComponentAction(ComponentActionList.ActionEntry entry)
entry
- The action entry.public void removeComponentAction(ComponentActionList.ActionEntry entry)
entry
- The action entry.public ComponentActionList.ActionEntry[] getActionEntries()
public void setOrdering(Comparator comp)
comp
- The comparator representing the ordering.public void executeActions(IFilter filter, boolean wakeup)
filter
- A filter to select only a subset of actions (or null for all actions).wakeup
- Immediately wake up each calling component after its action has been executed
(otherwise wakeupComponents() has to be called separately).public void wakeupComponents(IFilter filter)
filter
- A filter to select only a subset of actions (or null for all actions).
(otherwise wakeupComponents() has to be called separately).public void setScheduleCommand(ICommand cmd)
Copyright © 2013. All Rights Reserved.