uk.ac.ic.doc.y2002.tool.application
Class PNAnimator

java.lang.Object
  |
  +--uk.ac.ic.doc.y2002.tool.application.PNAnimator
Direct Known Subclasses:
GSPNAnimator

public class PNAnimator
extends java.lang.Object


Constructor Summary
PNAnimator(DisplayPane display)
           
 
Method Summary
 void animate()
          Call this function to start the automatic animation of the currently active net.
 void animate(java.lang.String[] list_trans, int length)
          Call this function to start a particular animation of the currently active net.
protected  TransitionLabel chooseFire(java.util.List trans)
           
 void highlightAll(boolean highlight)
           
 java.util.List highlightEnabledTransitions(boolean highlight)
          Highlights enabled transitions and returns a List of enabled transitions
 boolean highlightPNLabel(PNLabel label, boolean highlight)
           
 boolean highlightPNLabel(java.lang.String id, boolean highlight)
           
 boolean highlightPNLabelOnly(PNLabel label, boolean highlight)
           
 boolean isAnimating()
           
protected  void makeBackup()
          Makes a backup of the current DOM - but not if there's already a backup stored.
 void pause()
          Call this function to stop (pause) any currently running animation.
protected  void restoreFromBackup()
           
 void revert()
          Restores main DOM to the backed-up version
 void setTimestep(int t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNAnimator

public PNAnimator(DisplayPane display)
Method Detail

setTimestep

public void setTimestep(int t)

isAnimating

public boolean isAnimating()

makeBackup

protected void makeBackup()
Makes a backup of the current DOM - but not if there's already a backup stored.

restoreFromBackup

protected void restoreFromBackup()

revert

public void revert()
Restores main DOM to the backed-up version

highlightPNLabel

public boolean highlightPNLabel(PNLabel label,
                                boolean highlight)

highlightPNLabel

public boolean highlightPNLabel(java.lang.String id,
                                boolean highlight)

highlightPNLabelOnly

public boolean highlightPNLabelOnly(PNLabel label,
                                    boolean highlight)

highlightAll

public void highlightAll(boolean highlight)

highlightEnabledTransitions

public java.util.List highlightEnabledTransitions(boolean highlight)
Highlights enabled transitions and returns a List of enabled transitions
Returns:
List of enabled transitions (the TransitionLabels)

animate

public void animate()
Call this function to start the automatic animation of the currently active net.

animate

public void animate(java.lang.String[] list_trans,
                    int length)
Call this function to start a particular animation of the currently active net.
Parameters:
list_trans - String array of transition IDs, in order of firing
length - Number of transitions in the array

pause

public void pause()
Call this function to stop (pause) any currently running animation.

chooseFire

protected TransitionLabel chooseFire(java.util.List trans)