prefuse.action
Class ItemAction

java.lang.Object
  extended by prefuse.activity.Activity
      extended by prefuse.action.Action
          extended by prefuse.action.GroupAction
              extended by prefuse.action.ItemAction
Direct Known Subclasses:
ArrayAnimator, AxisLabelAnimator, ColorAnimator, EncoderAction, FontAnimator, LocationAnimator, PolarLocationAnimator, SizeAnimator

public abstract class ItemAction
extends GroupAction

An Action that processes VisualItems one item at a time. By default, it only processes items that are visible. Use the setFilterPredicate(Predicate) method to change the filtering criteria.

Author:
jeffrey heer

Field Summary
protected  Predicate m_predicate
          A reference to filtering predicate for this Action
 
Fields inherited from class prefuse.action.GroupAction
m_group
 
Fields inherited from class prefuse.action.Action
m_vis
 
Fields inherited from class prefuse.activity.Activity
DEFAULT_STEP_TIME, INFINITY
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class prefuse.action.GroupAction
getGroup, setGroup
 
Methods inherited from class prefuse.action.Action
getVisualization, run, setVisualization
 
Methods inherited from class prefuse.activity.Activity
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_predicate

protected Predicate m_predicate
A reference to filtering predicate for this Action

Constructor Detail

ItemAction

public ItemAction()
Create a new ItemAction that processes all groups.

See Also:
Visualization.ALL_ITEMS

ItemAction

public ItemAction(Visualization vis)
Create a new ItemAction that processes all groups.

Parameters:
vis - the Visualization to process
See Also:
Visualization.ALL_ITEMS

ItemAction

public ItemAction(java.lang.String group)
Create a new ItemAction that processes the specified group.

Parameters:
group - the name of the group to process

ItemAction

public ItemAction(java.lang.String group,
                  Predicate filter)
Create a new ItemAction that processes the specified group.

Parameters:
group - the name of the group to process
filter - the filtering Predicate

ItemAction

public ItemAction(Visualization vis,
                  java.lang.String group)
Create a new ItemAction that processes the specified group.

Parameters:
vis - the Visualization to process
group - the name of the group to process

ItemAction

public ItemAction(Visualization vis,
                  java.lang.String group,
                  Predicate filter)
Create a new ItemAction that processes the specified group.

Parameters:
vis - the Visualization to process
group - the name of the group to process
filter - the filtering Predicate
Method Detail

getFilterPredicate

public Predicate getFilterPredicate()
Returns the filtering predicate used by this Action.

Returns:
the filtering Predicate

setFilterPredicate

public void setFilterPredicate(Predicate filter)
Sets the filtering predicate used by this Action.

Parameters:
filter - the filtering Predicate to use

run

public void run(double frac)
Description copied from class: Action
Runs this Action, triggering whatever processing this Action performs. Subclass this method to create custom Actions.

Specified by:
run in class GroupAction
Parameters:
frac - the fraction of this Action's duration that has elapsed.
See Also:
Action.run(double)

process

public abstract void process(VisualItem item,
                             double frac)
Processes an individual item.

Parameters:
item - the VisualItem to process
frac - the fraction of elapsed duration time


Copyright © 2007 Regents of the University of California