Java 2 Platform
v1.3

edu.umich.visualsoar
Class MainFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--edu.umich.visualsoar.MainFrame
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class MainFrame
extends javax.swing.JFrame

This is the main project window of Visual Soar

See Also:
Serialized Form

Nested Class Summary
(package private)  class MainFrame.AgentConnectionActionListener
          Listener activated when the user clicks on an Agent in the Soar Runtime |Agents menu.
(package private)  class MainFrame.CascadeAction
           
(package private)  class MainFrame.CheckAllProductionsAction
          This class is responsible for comparing all productions in the project with the project's model of working memory - the datamap.
(package private)  class MainFrame.CloseProjectAction
          Close Project Action Closes all open rule editors
(package private)  class MainFrame.CommitAction
           
(package private)  class MainFrame.ContactUsAction
          This is where the user user wants some info about the authors
(package private)  class MainFrame.ExitAction
          Exit command First closes all the RuleEditor windows if all the closes go successfully, then it closes the operator hierarchy then exits
(package private)  class MainFrame.ExportAgentAction
          Export Agent Writes all the _source.soar files necesary for sourcing agent files written in into the TSI
(package private)  class MainFrame.FindInProjectAction
           
(package private)  class MainFrame.GenerateDataMapAction
          This class is responsible for comparing all productions in the project with the project's datamaps and 'fixing' any discrepencies by adding missing productions to the datamap.
(package private)  class MainFrame.NewProjectAction
          New Project Action Creates a dialog that gets the new project name and then creates the new project by creating a new Operator Window.
(package private)  class MainFrame.OpenFileAction
          Open a text file unrelated to the project in a rule editor Opened file is not necessarily part of project and not soar formatted
(package private)  class MainFrame.OpenProjectAction
          Open Project Action a filechooser is created to determine project file Opens a project by creating a new OperatorWindow
(package private)  class MainFrame.PreferencesAction
          Creates and shows the preferences dialog
(package private)  class MainFrame.ReplaceInProjectAction
           
(package private)  class MainFrame.ReTileWindowsAction
           
(package private)  class MainFrame.SaveAllFilesAction
           
(package private)  class MainFrame.SaveDataMapAndProjectAction
          Attempts to save the datamap
(package private)  class MainFrame.SaveProjectAsAction
           
(package private)  class MainFrame.SendProductionsAction
           
(package private)  class MainFrame.SoarRuntimeAgentMenuListener
          When the Soar Runtime|Agent menu is selected, this listener populates the menu with the agents that are currently connected to via the STI.
(package private)  class MainFrame.SoarRuntimeInitAction
          Handles Soar Runtime|Connect menu option
(package private)  class MainFrame.SoarRuntimePumpMessagesTimerListener
          Message timer listener which is used to pump the STI messages in the background.
(package private)  class MainFrame.SoarRuntimeSendRawCommandAction
          Handles Soar Runtime|Send Raw Command menu option
(package private)  class MainFrame.SoarRuntimeTermAction
          Handles Soar Runtime|Disconnect menu option
(package private)  class MainFrame.TileWindowsAction
           
(package private)  class MainFrame.WindowMenuListener
          This class is used to bring an internal frame to the front if it is selected from the view menu
 
Nested classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  edu.umich.visualsoar.dialogs.AboutDialog aboutDialog
           
(package private)  javax.swing.Action cascadeAction
           
(package private)  javax.swing.Action checkAllProductionsAction
           
(package private)  javax.swing.Action closeProjectAction
           
(package private)  edu.umich.visualsoar.misc.PerformableAction commitAction
           
(package private)  javax.swing.Action contactUsAction
           
private  edu.umich.visualsoar.misc.TemplateManager d_templateManager
           
private  edu.umich.visualsoar.misc.CustomDesktopPane DesktopPane
           
(package private)  javax.swing.Action exitAction
           
(package private)  edu.umich.visualsoar.misc.PerformableAction exportAgentAction
           
private  javax.swing.JSplitPane feedbackDesktopSplit
           
 edu.umich.visualsoar.misc.FeedbackList feedbackList
           
(package private)  javax.swing.Action findInProjectAction
           
(package private)  javax.swing.Action generateDataMapAction
           
 edu.umich.visualsoar.dialogs.NameDialog nameDialog
           
(package private)  javax.swing.Action newProjectAction
           
(package private)  javax.swing.Action openFileAction
           
(package private)  javax.swing.Action openProjectAction
           
private  javax.swing.JSplitPane operatorDesktopSplit
           
private  edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow
           
(package private)  javax.swing.Action preferencesAction
           
(package private)  edu.umich.visualsoar.misc.Preferences prefs
           
(package private)  javax.swing.Action replaceInProjectAction
           
(package private)  javax.swing.Action reTileWindowsAction
           
private static edu.umich.visualsoar.MainFrame s_mainFrame
           
(package private)  edu.umich.visualsoar.misc.PerformableAction saveAllFilesAction
           
(package private)  edu.umich.visualsoar.misc.PerformableAction saveDataMapAndProjectAction
           
(package private)  javax.swing.Action saveProjectAsAction
           
(package private)  javax.swing.Action sendProductionsAction
           
private  javax.swing.JMenu soarRuntimeAgentMenu
           
(package private)  javax.swing.Action soarRuntimeInitAction
           
(package private)  javax.swing.Action soarRuntimeSendRawCommandAction
           
(package private)  javax.swing.Action soarRuntimeTermAction
           
private  SoarToolJavaInterface soarToolJavaInterface
           
private  javax.swing.Timer soarToolPumpMessageTimer
           
(package private)  javax.swing.Action tileWindowsAction
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
private MainFrame()
          Private constructor not used
  MainFrame(java.lang.String s)
          Constructs the operatorWindow, the DesktopPane, the SplitPane, the menubar and the file chooser 3P Also initializes the STI library
 
Method Summary
 void addDataMap(edu.umich.visualsoar.datamap.DataMap dm)
          Creates a datamap window with the given datamap.
 void addRuleEditor(edu.umich.visualsoar.ruleeditor.RuleEditor re)
          Creates a rule window opening with the given file name
private  javax.swing.JMenu createEditMenu()
          A helper function to create the edit menu
private  javax.swing.JMenu createFileMenu()
          A helper function to create the file menu
private  javax.swing.JMenu createHelpMenu()
          A helper function to create the help menu
private  javax.swing.JMenuBar createMainMenu()
          A Helper function that creates the main menu bar
private  javax.swing.JMenu createSearchMenu()
          A helper function to create the search menu
private  javax.swing.JMenu createSoarRuntimeMenu()
          Creates the "Soar Runtime" menu which appears in the MainFrame
private  javax.swing.JMenu createViewMenu()
          A helper function to create the view menu
protected  void EditProductionByName(java.lang.String sProductionName)
          Edits a production (in the project) based on its name.
 edu.umich.visualsoar.misc.CustomDesktopPane getDesktopPane()
          Gets the project CustomDesktopPane
static edu.umich.visualsoar.MainFrame getMainFrame()
          Gets the main window
 edu.umich.visualsoar.operatorwindow.OperatorWindow getOperatorWindow()
          Gets the project OperatorWindow
 SoarToolJavaInterface GetSoarToolJavaInterface()
           
 edu.umich.visualsoar.misc.TemplateManager getTemplateManager()
          Gets the project TemplateManager
protected  void ProcessSoarToolJavaCommand(SoarToolJavaCommand command)
          Processes incoming STI commands from the runtime
private  void projectActionsEnable(boolean areEnabled)
          enables the corresponding actions for when a project is opened
 void removeOperatorWindow()
          Gets rid of the operator window
 void setFeedbackListData(java.util.Vector v)
          Method updates the FeedBack list window
static void setMainFrame(edu.umich.visualsoar.MainFrame mainFrame)
          Sets the main window
 void showRuleEditor(edu.umich.visualsoar.ruleeditor.RuleEditor re)
          Makes the specified rule editor window the selected window and brings the window to the front of the frame.
(package private)  boolean SoarRuntimeInit()
          Initializes the Soar Tool Interface (STI) object and enabled/disables menu items as needed.
(package private)  void SoarRuntimeTerm()
          Terminates the Soar Tool Interface (STI) object and enabled/disables menu items as needed.
 void tryOpenProject(java.io.File file)
          Attempts to open a new project by creating a new OperatorWindow
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

s_mainFrame

private static edu.umich.visualsoar.MainFrame s_mainFrame

operatorWindow

private edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow

DesktopPane

private edu.umich.visualsoar.misc.CustomDesktopPane DesktopPane

d_templateManager

private edu.umich.visualsoar.misc.TemplateManager d_templateManager

operatorDesktopSplit

private javax.swing.JSplitPane operatorDesktopSplit

feedbackDesktopSplit

private javax.swing.JSplitPane feedbackDesktopSplit

feedbackList

public edu.umich.visualsoar.misc.FeedbackList feedbackList

prefs

edu.umich.visualsoar.misc.Preferences prefs

soarToolJavaInterface

private SoarToolJavaInterface soarToolJavaInterface

soarToolPumpMessageTimer

private javax.swing.Timer soarToolPumpMessageTimer

soarRuntimeAgentMenu

private javax.swing.JMenu soarRuntimeAgentMenu

aboutDialog

edu.umich.visualsoar.dialogs.AboutDialog aboutDialog

nameDialog

public edu.umich.visualsoar.dialogs.NameDialog nameDialog

newProjectAction

javax.swing.Action newProjectAction

openProjectAction

javax.swing.Action openProjectAction

openFileAction

javax.swing.Action openFileAction

closeProjectAction

javax.swing.Action closeProjectAction

saveAllFilesAction

edu.umich.visualsoar.misc.PerformableAction saveAllFilesAction

exportAgentAction

edu.umich.visualsoar.misc.PerformableAction exportAgentAction

saveDataMapAndProjectAction

edu.umich.visualsoar.misc.PerformableAction saveDataMapAndProjectAction

preferencesAction

javax.swing.Action preferencesAction

commitAction

edu.umich.visualsoar.misc.PerformableAction commitAction

exitAction

javax.swing.Action exitAction

cascadeAction

javax.swing.Action cascadeAction

tileWindowsAction

javax.swing.Action tileWindowsAction

reTileWindowsAction

javax.swing.Action reTileWindowsAction

sendProductionsAction

javax.swing.Action sendProductionsAction

checkAllProductionsAction

javax.swing.Action checkAllProductionsAction

generateDataMapAction

javax.swing.Action generateDataMapAction

saveProjectAsAction

javax.swing.Action saveProjectAsAction

contactUsAction

javax.swing.Action contactUsAction

findInProjectAction

javax.swing.Action findInProjectAction

replaceInProjectAction

javax.swing.Action replaceInProjectAction

soarRuntimeInitAction

javax.swing.Action soarRuntimeInitAction

soarRuntimeTermAction

javax.swing.Action soarRuntimeTermAction

soarRuntimeSendRawCommandAction

javax.swing.Action soarRuntimeSendRawCommandAction
Constructor Detail

MainFrame

private MainFrame()
Private constructor not used


MainFrame

public MainFrame(java.lang.String s)
Constructs the operatorWindow, the DesktopPane, the SplitPane, the menubar and the file chooser 3P Also initializes the STI library

Parameters:
s - the name of the window
Method Detail

GetSoarToolJavaInterface

public SoarToolJavaInterface GetSoarToolJavaInterface()

setFeedbackListData

public void setFeedbackListData(java.util.Vector v)
Method updates the FeedBack list window

Parameters:
v - the vector list of feedback data

getTemplateManager

public edu.umich.visualsoar.misc.TemplateManager getTemplateManager()
Gets the project TemplateManager

Returns:
a TemplateManager in charge of all template matters.

getOperatorWindow

public edu.umich.visualsoar.operatorwindow.OperatorWindow getOperatorWindow()
Gets the project OperatorWindow

Returns:
the project's only OperatorWindow.

getDesktopPane

public edu.umich.visualsoar.misc.CustomDesktopPane getDesktopPane()
Gets the project CustomDesktopPane

Returns:
the project's only CustomDesktopPane.
See Also:
CustomDesktopPane

createFileMenu

private javax.swing.JMenu createFileMenu()
A helper function to create the file menu

Returns:
The file menu

createEditMenu

private javax.swing.JMenu createEditMenu()
A helper function to create the edit menu

Returns:
The edit menu

createSearchMenu

private javax.swing.JMenu createSearchMenu()
A helper function to create the search menu

Returns:
The search menu

createViewMenu

private javax.swing.JMenu createViewMenu()
A helper function to create the view menu

Returns:
The view menu

createSoarRuntimeMenu

private javax.swing.JMenu createSoarRuntimeMenu()
Creates the "Soar Runtime" menu which appears in the MainFrame

Returns:
a soarRuntimeMenu JMenu

createHelpMenu

private javax.swing.JMenu createHelpMenu()
A helper function to create the help menu

Returns:
The help menu

createMainMenu

private javax.swing.JMenuBar createMainMenu()
A Helper function that creates the main menu bar

Returns:
The MenuBar just created

addRuleEditor

public void addRuleEditor(edu.umich.visualsoar.ruleeditor.RuleEditor re)
Creates a rule window opening with the given file name

Parameters:
re - the ruleeditor file that the rule editor should open

addDataMap

public void addDataMap(edu.umich.visualsoar.datamap.DataMap dm)
Creates a datamap window with the given datamap.

Parameters:
dm - the datamap that the window should open
See Also:
DataMap

showRuleEditor

public void showRuleEditor(edu.umich.visualsoar.ruleeditor.RuleEditor re)
Makes the specified rule editor window the selected window and brings the window to the front of the frame.

Parameters:
re - the specified rule editor window

removeOperatorWindow

public void removeOperatorWindow()
Gets rid of the operator window


setMainFrame

public static void setMainFrame(edu.umich.visualsoar.MainFrame mainFrame)
Sets the main window


getMainFrame

public static edu.umich.visualsoar.MainFrame getMainFrame()
Gets the main window


projectActionsEnable

private void projectActionsEnable(boolean areEnabled)
enables the corresponding actions for when a project is opened


tryOpenProject

public void tryOpenProject(java.io.File file)
                    throws java.io.FileNotFoundException,
                           java.io.IOException
Attempts to open a new project by creating a new OperatorWindow

Parameters:
file - .vsa project file that is to be opened
java.io.FileNotFoundException
java.io.IOException
See Also:
OperatorWindow

ProcessSoarToolJavaCommand

protected void ProcessSoarToolJavaCommand(SoarToolJavaCommand command)
Processes incoming STI commands from the runtime


EditProductionByName

protected void EditProductionByName(java.lang.String sProductionName)
Edits a production (in the project) based on its name.


SoarRuntimeInit

boolean SoarRuntimeInit()
Initializes the Soar Tool Interface (STI) object and enabled/disables menu items as needed.


SoarRuntimeTerm

void SoarRuntimeTerm()
Terminates the Soar Tool Interface (STI) object and enabled/disables menu items as needed.


Java 2 Platform
v1.3