public abstract class ItemAction extends GroupAction
setFilterPredicate(Predicate)
method
to change the filtering criteria.Modifier and Type | Field and Description |
---|---|
protected Predicate |
m_predicate
A reference to filtering predicate for this Action
|
m_group
DEFAULT_STEP_TIME, INFINITY
Constructor and Description |
---|
ItemAction()
Create a new ItemAction that processes all groups.
|
ItemAction(java.lang.String group)
Create a new ItemAction that processes the specified group.
|
ItemAction(java.lang.String group,
Predicate filter)
Create a new ItemAction that processes the specified group.
|
ItemAction(Visualization vis)
Create a new ItemAction that processes all groups.
|
ItemAction(Visualization vis,
java.lang.String group)
Create a new ItemAction that processes the specified group.
|
ItemAction(Visualization vis,
java.lang.String group,
Predicate filter)
Create a new ItemAction that processes the specified group.
|
Modifier and Type | Method and Description |
---|---|
Predicate |
getFilterPredicate()
Returns the filtering predicate used by this Action.
|
abstract void |
process(VisualItem item,
double frac)
Processes an individual item.
|
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs.
|
void |
setFilterPredicate(Predicate filter)
Sets the filtering predicate used by this Action.
|
getGroup, setGroup
getVisualization, run, setVisualization
addActivityListener, 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, setStepTime
protected Predicate m_predicate
public ItemAction()
Visualization.ALL_ITEMS
public ItemAction(Visualization vis)
vis
- the Visualization
to processVisualization.ALL_ITEMS
public ItemAction(java.lang.String group)
group
- the name of the group to processpublic ItemAction(java.lang.String group, Predicate filter)
group
- the name of the group to processfilter
- the filtering Predicate
public ItemAction(Visualization vis, java.lang.String group)
vis
- the Visualization
to processgroup
- the name of the group to processpublic ItemAction(Visualization vis, java.lang.String group, Predicate filter)
vis
- the Visualization
to processgroup
- the name of the group to processfilter
- the filtering Predicate
public Predicate getFilterPredicate()
Predicate
public void setFilterPredicate(Predicate filter)
filter
- the filtering Predicate
to usepublic void run(double frac)
Action
run
in class GroupAction
frac
- the fraction of this Action's duration that has elapsed.Action.run(double)
public abstract void process(VisualItem item, double frac)
item
- the VisualItem to processfrac
- the fraction of elapsed duration timeCopyright ? 2013 Regents of the University of California