ConForM.CoopnTools.HLPN
Class HLPN

java.lang.Object
  |
  +--ConForM.CoopnTools.HLPN.HLPN
All Implemented Interfaces:
CoopnTool, GraphicalTool, java.lang.Runnable

public class HLPN
extends java.lang.Object
implements CoopnTool, GraphicalTool

CO-OPN to HLPN nets translator. This tool allows the translation of a CO-OPN spec to a high level Petri net . A HLPN-net translator is a runnable. It is composed of a factory, building a tool, by a method run, implementing the tool itself, and a method main. Hence, a tool can be started either from a command line, or by another CoopnTool. In this case, a checker is likely to by started as a new thread.

See Also:
run

Field Summary
static java.lang.String TOOL
          Checker tool name.
static java.lang.String VERSION
          Checker version.
 
Constructor Summary
protected HLPN(HLPNEnv env, HLPNEnvMgr envMgr)
          Simple constructor.
 
Method Summary
 CoopnEnv getEnv()
          Get the environment.
static HLPN getTool(CoopnEnv env)
          Creates a new HLPN, based on an existing environment, or null if the tool cannot be created.
static HLPN getTool(HLPNEnv env)
          Creates a new HLPN, based on an existing environment, or null if the tool cannot be created.
static void main(java.lang.String[] args)
          Main program.
 void notifyEdition()
          Notification routine: the visual generated a new edition.
 void notifyQuit()
          Notification routine: the visual quit.
 void notifyRedo()
          Notification routine: the visual generated a new redo.
 void notifySave()
          Notification routine: the visual generated a save.
 void notifySaveAs(java.lang.String name)
          Notification routine: the visual generated a save.
 void notifyUndo()
          Notification routine: the visual generated a new undo.
 void run()
          Implementation of the HLPN.
 CoopnGraphicalElement[] selectedCOOPNElements()
          Get the selected elements in the HLPN display
 CoopnGraphicalElement[] selectedElements()
          Get the selected elements in the each display
 CoopnGraphicalElement[] selectedHLPNElements()
          Get the selected elements in the COOPN display
 void show()
          Show the tool's window, if the tool has its own GUI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Checker version.

TOOL

public static final java.lang.String TOOL
Checker tool name.
Constructor Detail

HLPN

protected HLPN(HLPNEnv env,
               HLPNEnvMgr envMgr)
Simple constructor.
Parameters:
env - the simple CoopnTools environment
Method Detail

getTool

public static HLPN getTool(CoopnEnv env)
Creates a new HLPN, based on an existing environment, or null if the tool cannot be created.

getTool

public static HLPN getTool(HLPNEnv env)
Creates a new HLPN, based on an existing environment, or null if the tool cannot be created.

getEnv

public CoopnEnv getEnv()
Get the environment.
Specified by:
getEnv in interface CoopnTool

show

public void show()
Show the tool's window, if the tool has its own GUI. Do nothing else.
Specified by:
show in interface CoopnTool

run

public void run()
Implementation of the HLPN.
Specified by:
run in interface java.lang.Runnable

selectedElements

public CoopnGraphicalElement[] selectedElements()
Get the selected elements in the each display

selectedCOOPNElements

public CoopnGraphicalElement[] selectedCOOPNElements()
Get the selected elements in the HLPN display

selectedHLPNElements

public CoopnGraphicalElement[] selectedHLPNElements()
Get the selected elements in the COOPN display

main

public static void main(java.lang.String[] args)
Main program. This method creates a new environment from the command line, creates a new HLPN according to the environment, and call its run method.

notifyQuit

public void notifyQuit()
Notification routine: the visual quit.
Specified by:
notifyQuit in interface GraphicalTool

notifySave

public void notifySave()
Notification routine: the visual generated a save.
Specified by:
notifySave in interface GraphicalTool

notifySaveAs

public void notifySaveAs(java.lang.String name)
Notification routine: the visual generated a save.
Specified by:
notifySaveAs in interface GraphicalTool

notifyEdition

public void notifyEdition()
Notification routine: the visual generated a new edition.
Specified by:
notifyEdition in interface GraphicalTool

notifyUndo

public void notifyUndo()
Notification routine: the visual generated a new undo.
Specified by:
notifyUndo in interface GraphicalTool

notifyRedo

public void notifyRedo()
Notification routine: the visual generated a new redo.
Specified by:
notifyRedo in interface GraphicalTool