public abstract class CompositeAction extends Action
| Modifier and Type | Field and Description |
|---|---|
protected CopyOnWriteArrayList |
m_actions |
DEFAULT_STEP_TIME, INFINITY| Constructor and Description |
|---|
CompositeAction()
Creates a new run-once CompositeAction.
|
CompositeAction(long duration)
Creates a new CompositeAction of specified duration and default
step time of 20 milliseconds.
|
CompositeAction(long duration,
long stepTime)
Creates a new CompositeAction of specified duration and step time.
|
CompositeAction(Visualization vis)
Creates a new run-once CompositeAction that processes the given
Visualization.
|
CompositeAction(Visualization vis,
long duration)
Creates a new CompositeAction of specified duration and default
step time of 20 milliseconds that processes the given
Visualization.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Action a)
Adds an Action to the end of the composite list.
|
void |
add(int i,
Action a)
Adds an Action at the given index.
|
Action |
get(int i)
Returns the Action at the specified index.
|
boolean |
remove(Action a)
Removes a given Action from the composite.
|
Action |
remove(int i)
Removes the Action at the specified index.
|
void |
setVisualization(Visualization vis)
Set the Visualization processed by this Action.
|
int |
size()
Returns the number of Actions in the composite.
|
getVisualization, run, runaddActivityListener, alwaysRunAfter, cancel, fireActivityCancelled, fireActivityFinished, fireActivityScheduled, fireActivityStarted, fireActivityStepped, getDuration, getNextTime, getPace, getPacingFunction, getStartTime, getStepTime, getStopTime, isEnabled, isRunning, isScheduled, removeActivityListener, run, runAfter, runAt, setDuration, setEnabled, setPacingFunction, setStartTime, setStepTimeprotected CopyOnWriteArrayList m_actions
public CompositeAction()
public CompositeAction(Visualization vis)
vis - the Visualization processed by this Actionpublic CompositeAction(long duration)
duration - the duration of this Activity, in millisecondspublic CompositeAction(Visualization vis, long duration)
vis - the Visualization processed by this Actionduration - the duration of this Activity, in millisecondspublic CompositeAction(long duration,
long stepTime)
duration - the duration of this Activity, in millisecondsstepTime - the time to wait in milliseconds between executions
of the action listpublic void setVisualization(Visualization vis)
Action.setVisualization(Visualization) on all Action instances
contained within this composite.setVisualization in class Actionvis - the Visualization to processpublic int size()
public void add(Action a)
a - the Action instance to addpublic void add(int i,
Action a)
i - the index at which to add the Actiona - the Action instance to addpublic Action get(int i)
i - the indexpublic boolean remove(Action a)
a - the Action to removepublic Action remove(int i)
i - the index