EASE.Agents.Specification
Class Specification

java.lang.Object
  |
  +--EASE.Agents.Specification.Specification

public class Specification
extends java.lang.Object
implements java.awt.event.ActionListener, Constants

Main class for Agent Specification GUI


Field Summary
private static AllAgents agents
           
private  AgentSpecification agentSpec
           
private static Specification condSpec
           
static java.io.File currentFile
           
private  Debugger debugger
           
static boolean editing
           
private  javax.swing.JPanel emptyP
           
private static EnvironmentSpecification env
           
private static java.lang.String envName
           
static javax.swing.JFileChooser fileChooser
           
private  javax.swing.JMenu fileM
           
private  javax.swing.JFrame frame
           
(package private)  java.awt.GridBagConstraints gbc
           
private  javax.swing.JPanel main
           
private  javax.swing.JMenuBar menuBar
           
private  OpenFileAction openAction
           
private  QuitAction quitAction
           
private  SaveFileAction saveAction
           
private  SetStartAgentsAction setStartAction
           
private  javax.swing.JPanel specHolder
           
static boolean unsaved
           
 
Constructor Summary
Specification(java.lang.String envClass)
          Constructor
 
Method Summary
(package private)  void ()
           
 void actionPerformed(java.awt.event.ActionEvent e)
           
static AllAgents getAgents()
           
static Specification getConditionSpecification()
           
static Specification getConditionSpecification(java.lang.String envName)
          Version ued by runtime engine because envName is not set
 java.io.File getCurrentFile()
           
static EnvironmentSpecification getEnvironment()
           
 javax.swing.JFrame getFrame()
           
 java.util.Vector getStarters()
          Get the agents to run at start up.
static Specification getUniqueConditionSpecification()
          For getting a condspec when more than one might be requried at once
static void main(java.lang.String[] args)
          Needs to be updated to take env from command line -path command line argument gives the paths to search for files (separated by %'s). -env name Tells EASE to use environment name.
private  void newAgentSpec(Agent a)
          Set up the agent specification panel
 void setCurrentFile(java.io.File f)
           
 void setFile(FileFormat f)
          This method is called when a file is loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

agents

private static AllAgents agents

condSpec

private static Specification condSpec

env

private static EnvironmentSpecification env

envName

private static java.lang.String envName

unsaved

public static boolean unsaved

editing

public static boolean editing

fileChooser

public static javax.swing.JFileChooser fileChooser

currentFile

public static java.io.File currentFile

frame

private javax.swing.JFrame frame

agentSpec

private AgentSpecification agentSpec

openAction

private OpenFileAction openAction

saveAction

private SaveFileAction saveAction

quitAction

private QuitAction quitAction

setStartAction

private SetStartAgentsAction setStartAction

fileM

private javax.swing.JMenu fileM

menuBar

private javax.swing.JMenuBar menuBar

main

private javax.swing.JPanel main

specHolder

private javax.swing.JPanel specHolder

emptyP

private javax.swing.JPanel emptyP

debugger

private Debugger debugger

gbc

java.awt.GridBagConstraints gbc
Constructor Detail

Specification

public Specification(java.lang.String envClass)
Constructor
Parameters:
envClass - is the environment to use.

Method Detail

main

public static void main(java.lang.String[] args)
Needs to be updated to take env from command line

-path command line argument gives the paths to search for files (separated by %'s).

-env name Tells EASE to use environment name. Default is TACSIEnvironment


getAgents

public static AllAgents getAgents()

getFrame

public javax.swing.JFrame getFrame()

getCurrentFile

public java.io.File getCurrentFile()

setCurrentFile

public void setCurrentFile(java.io.File f)

setFile

public void setFile(FileFormat f)
This method is called when a file is loaded.
The process of creating the Agent objects from the AgentSave objects will set up the change listening so that any contracts the agents have will be automatically updated when the contracted agent is changed.

Making the StartAgentsWindow sets up those change listeners.


getStarters

public java.util.Vector getStarters()
Get the agents to run at start up.


getConditionSpecification

public static Specification getConditionSpecification()

getUniqueConditionSpecification

public static Specification getUniqueConditionSpecification()
For getting a condspec when more than one might be requried at once

getConditionSpecification

public static Specification getConditionSpecification(java.lang.String envName)
Version ued by runtime engine because envName is not set

getEnvironment

public static EnvironmentSpecification getEnvironment()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

newAgentSpec

private void newAgentSpec(Agent a)
Set up the agent specification panel

void ()
Overrides:
in class java.lang.Object