ConForM.CoopnTools.Constraint
Class Constraint

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

public class Constraint
extends java.lang.Object
implements CoopnTool

Constraint tool. This tool allows users to edit constraints modules. More precisely, in normal mode, a window appears and display a very simple constraints editor. In "external editor mode", an external editor is launched and the instance of this class is just used to interface it. Such a tool is a "CoopnTool". Hence, it can be started either from a command line, or by another CoopnTool. In this case, a constraint editor is likely to by started as a new thread.

See Also:
run

Field Summary
static java.lang.String TOOL
          Package tool name.
static java.lang.String VERSION
          Package tool version.
 
Constructor Summary
protected Constraint(ConsEnv env, ConsEnvMgr envMgr)
          Simple constructor.
 
Method Summary
 ConsEnv getConsEnv()
          Get the environment.
 CoopnEnv getEnv()
          Get the environment.
static Constraint getTool(ConsEnv env)
          Creates a new editor tool, based on an existing environment, or null if the tool cannot be created.
static Constraint getTool(CoopnEnv env)
          Creates a new editor tool, based on an existing environment, or null if the tool cannot be created.
static void main(java.lang.String[] args)
          Main program.
 void run()
          Implementation of the editor tool.
 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
Package tool version.

TOOL

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

Constraint

protected Constraint(ConsEnv env,
                     ConsEnvMgr envMgr)
Simple constructor.
Parameters:
env - the simple CoopnTools environment
Method Detail

getTool

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

getTool

public static Constraint getTool(ConsEnv env)
Creates a new editor tool, 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

getConsEnv

public ConsEnv getConsEnv()
Get the environment.

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 editor tool.
Specified by:
run in interface java.lang.Runnable

main

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