uk.ac.ic.doc.y2002.tool.application
Class ModuleBridge
java.lang.Object
|
+--uk.ac.ic.doc.y2002.tool.application.ModuleBridge
- public class ModuleBridge
- extends java.lang.Object
Bridge class allowing Modules to pass instructions back to the main program, for example to display a sequence of transitions firing.
Constructor Summary |
ModuleBridge(DisplayPane display)
Initialise the ModuleBridge with a reference to the active DisplayPane. |
Method Summary |
void |
animate(java.lang.String[] trans_ids,
int length)
Request the program to animate a sequence of transitions, given a list of the transition ids. |
void |
highlight(java.lang.String id)
Request the program to highlight the object, given its id. |
void |
reloadDOM()
Signal the program to re-initialise the display from the current state of the DOM. |
void |
unHighlight()
Request the program to un-highlight all objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModuleBridge
public ModuleBridge(DisplayPane display)
- Initialise the ModuleBridge with a reference to the active DisplayPane.
- Parameters:
display
- a reference to the active DisplayPane which holds the Document which the module is working on.
reloadDOM
public void reloadDOM()
- Signal the program to re-initialise the display from the current state of the DOM.
Assumes that the type of net has not changed.
highlight
public void highlight(java.lang.String id)
- Request the program to highlight the object, given its id.
All other objects will be un-highlighted.
- Parameters:
id
- String holding the id of the object to be highlighted.
unHighlight
public void unHighlight()
- Request the program to un-highlight all objects.
animate
public void animate(java.lang.String[] trans_ids,
int length)
- Request the program to animate a sequence of transitions, given a list of the transition ids.
To refer to elements within subnets, may use (e.g.) _s0_p1 for element p1 within subnet s0
(p1 and s0 are ids). The automatic flattening (which the program does when requested) also uses
this naming scheme.
- Parameters:
trans_ids
- An array of transition ids, in order of firinglength
- The number of transitions in the sequence