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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PNAnimator
public PNAnimator(DisplayPane display)
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 firinglength
- 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)