1 package prefuse.action; 2 3 import java.util.logging.Logger ; 4 5 import prefuse.Visualization; 6 import prefuse.activity.Activity; 7 import prefuse.util.StringLib; 8 9 10 20 public class ActionList extends CompositeAction { 21 22 private static final Logger s_logger = 23 Logger.getLogger(ActionList.class.getName()); 24 25 28 public ActionList() { 29 super(0); 30 } 31 32 37 public ActionList(Visualization vis) { 38 super(vis); 39 } 40 41 46 public ActionList(long duration) { 47 super(duration, Activity.DEFAULT_STEP_TIME); 48 } 49 50 57 public ActionList(Visualization vis, long duration) { 58 super(vis, duration); 59 } 60 61 67 public ActionList(long duration, long stepTime) { 68 super(duration, stepTime); 69 } 70 71 74 public void run(double frac) { 75 Object [] actions = m_actions.getArray(); 76 for ( int i=0; i<actions.length; ++i ) { 77 Action a = (Action)actions[i]; 78 try { 79 if ( a.isEnabled() ) a.run(frac); 80 } catch ( Exception e ) { 81 s_logger.warning(e.getMessage() + '\n' 82 + StringLib.getStackTrace(e)); 83 } 84 } 85 } 86 87 } | Popular Tags |