|
Java 2 Platform v1.3 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JTree | +--edu.umich.visualsoar.operatorwindow.OperatorWindow
A class to implement the behavior of the operator window
Nested Class Summary | |
(package private) class |
OperatorWindow.BackupThread
Responsible for keeping track of the backup project files |
(package private) class |
OperatorWindow.OWDragGestureListener
Class used for drag and drop operations |
(package private) class |
OperatorWindow.OWDragSourceListener
Class used for drag and drop operations |
(package private) class |
OperatorWindow.OWDropTargetListener
Class used for drag and drop operations |
Nested classes inherited from class javax.swing.JTree |
javax.swing.JTree.AccessibleJTree, javax.swing.JTree.DynamicUtilTreeNode, javax.swing.JTree.EmptySelectionModel, javax.swing.JTree.TreeModelHandler, javax.swing.JTree.TreeSelectionRedirector |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
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 | |
private OperatorWindow.BackupThread |
backupThread
|
private boolean |
closed
|
(package private) java.awt.dnd.DragGestureListener |
dgListener
|
private java.awt.dnd.DropTarget |
dropTarget
|
(package private) java.awt.dnd.DropTargetListener |
dtListener
|
(package private) int |
nextId
|
private edu.umich.visualsoar.datamap.SoarWorkingMemoryModel |
WorkingMemory
|
Fields inherited from class javax.swing.JTree |
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
private |
OperatorWindow()
Private usage only. |
|
OperatorWindow(java.io.File in_file)
Opens an OperatorWindow for an existing project |
|
OperatorWindow(java.lang.String projectName,
java.lang.String projectFileName,
boolean is_new)
Creates an Operator Window given a project name. |
Method Summary | |
void |
addChild(edu.umich.visualsoar.operatorwindow.OperatorNode parent,
edu.umich.visualsoar.operatorwindow.OperatorNode child)
|
void |
addFile()
Adds a file object underneath the currently selected node after prompting for the name |
void |
addImpasse(java.lang.String s)
Adds an Impasse. |
void |
addSuboperator()
This prompts the user for a name for the suboperator, if the user returns a valid name then it inserts a new node into the tree |
java.util.Enumeration |
breadthFirstEnumeration()
Returns a breadth first enumeration of the tree |
void |
breadthFirstTraversal(edu.umich.visualsoar.util.Visitor v)
This applys the Visitor to every object in the tree according to a breadth first traversal |
void |
checkChildrenAgainstDataMap()
For the currently selected node, it will check all the children of this node against the datamap |
void |
checkProductions(edu.umich.visualsoar.operatorwindow.OperatorNode on,
java.util.Vector productions,
java.util.List errors)
Given the associated Operator Node, a vector of parsed soar productions, and a list to put the errors this function will check the productions consistency across the datamap. |
void |
checkProductionsLog(edu.umich.visualsoar.operatorwindow.OperatorNode on,
java.util.Vector productions,
java.util.List errors,
java.io.FileWriter w)
Similar to checkProductions(), but writes to a log file |
void |
closeHierarchy()
Saves Hierarchy and then closes it. |
edu.umich.visualsoar.operatorwindow.FileNode |
createFileNode(java.lang.String inName,
java.lang.String inFile)
Creates a new File node in the operator window |
edu.umich.visualsoar.operatorwindow.FileOperatorNode |
createFileOperatorNode(java.lang.String inName,
java.lang.String inFileName)
Creates a new File Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.FileOperatorNode |
createFileOperatorNode(java.lang.String inName,
java.lang.String inFileName,
java.lang.String inFolderName,
int inDataMapIdNumber)
Creates a high-level File Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.FileOperatorNode |
createFileOperatorNode(java.lang.String inName,
java.lang.String inFileName,
java.lang.String inFolderName,
edu.umich.visualsoar.graph.SoarIdentifierVertex inDataMapId)
Creates a high-level File Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.FolderNode |
createFolderNode(java.lang.String inName,
java.lang.String inFolderName)
Creates a new folder node in the operator window |
edu.umich.visualsoar.operatorwindow.ImpasseOperatorNode |
createImpasseOperatorNode(java.lang.String inName,
java.lang.String inFileName)
Creates a new Impasse Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.ImpasseOperatorNode |
createImpasseOperatorNode(java.lang.String inName,
java.lang.String inFileName,
java.lang.String inFolderName,
int inDataMapIdNumber)
Creates a high level Impassse Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.ImpasseOperatorNode |
createImpasseOperatorNode(java.lang.String inName,
java.lang.String inFileName,
java.lang.String inFolderName,
edu.umich.visualsoar.graph.SoarIdentifierVertex inDataMapId)
Creates a high level Impassse Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.LinkNode |
createLinkNode(edu.umich.visualsoar.operatorwindow.SoarOperatorNode inSoarOperatorNode)
LinkNodes not used in this version of Visual Soar |
edu.umich.visualsoar.operatorwindow.LinkNode |
createLinkNode(java.lang.String inName,
java.lang.String inFileName,
int inHighLevelId)
LinkNodes not used in this version of Visual Soar |
edu.umich.visualsoar.operatorwindow.OperatorRootNode |
createOperatorRootNode(java.lang.String inName,
java.lang.String inFolderName)
Creates the Root Node of the operator hierarchy. |
edu.umich.visualsoar.operatorwindow.OperatorRootNode |
createOperatorRootNode(java.lang.String inName,
java.lang.String inFullPathStart,
java.lang.String inFolderName)
Creates the Root Node of the operator hierarchy. |
edu.umich.visualsoar.operatorwindow.OperatorOperatorNode |
createSoarOperatorNode(java.lang.String inName,
java.lang.String inFileName)
Creates a new Soar Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.OperatorOperatorNode |
createSoarOperatorNode(java.lang.String inName,
java.lang.String inFileName,
java.lang.String inFolderName,
int inDataMapIdNumber)
Creates a high level Soar Operator Node in the operator window |
edu.umich.visualsoar.operatorwindow.OperatorOperatorNode |
createSoarOperatorNode(java.lang.String inName,
java.lang.String inFileName,
java.lang.String inFolderName,
edu.umich.visualsoar.graph.SoarIdentifierVertex inDataMapId)
Creates a high level Soar Operator Node in the operator window |
private javax.swing.tree.DefaultTreeModel |
defaultProject(java.lang.String projectName,
java.io.File projectFile)
Constructs a DefaultTreeModel exactly the way we decided how to do it Creates a root node named after the project name at the root of the tree. |
void |
delete()
removes the selected node from the tree |
void |
export()
|
void |
findInProject(java.lang.String stringToFind,
boolean matchCase)
Searches all files in the project for the specified string and returns a Vector of FindInProjectListObjects of all instances |
void |
findInProjectAndOpenRule(java.lang.String stringToFind,
boolean matchCase)
Searches all files in the project for the specified string and opens the file containing the first instance of that string. |
void |
generateProductions(edu.umich.visualsoar.operatorwindow.OperatorNode on,
java.util.Vector productions,
java.util.List generations,
edu.umich.visualsoar.operatorwindow.OperatorNode current)
Given the associated Operator Node, and a vector of parsed soar productions this function will check the productions consistency across the datamap and fill in missing portions of the datamap as needed. |
int |
getChildCount()
Returns the number of children associated with the root node / project node. |
edu.umich.visualsoar.datamap.SoarWorkingMemoryModel |
getDatamap()
Returns the SoarWorkingMemoryModel |
int |
getNextId()
Returns the next Id used for keeping track of each operator's datamap |
private edu.umich.visualsoar.operatorwindow.OperatorNode |
getNodeForId(int id)
|
void |
importFunc()
|
static boolean |
isProjectNameValid(java.lang.String theName)
Checks name entries for illegal values |
private edu.umich.visualsoar.operatorwindow.OperatorNode |
makeNodeVersionFive(java.util.HashMap linkedToMap,
java.util.List linkNodesToRestore,
java.io.Reader r,
edu.umich.visualsoar.graph.SoarIdentifierVertex parentDataMap)
Opens a Visual Soar project by creating the appropriate node |
private edu.umich.visualsoar.operatorwindow.OperatorNode |
makeNodeVersionFour(java.util.HashMap linkedToMap,
java.util.List linkNodesToRestore,
java.io.Reader r)
Opens a Visual Soar project by creating the appropriate node |
private edu.umich.visualsoar.operatorwindow.OperatorNode |
makeNodeVersionOne(java.io.Reader r)
Opens a Visual Soar project by creating the appropriate node |
private edu.umich.visualsoar.operatorwindow.OperatorNode |
makeNodeVersionThree(java.util.HashMap linkedToMap,
java.util.List linkNodesToRestore,
java.io.Reader r)
Opens a Visual Soar project by creating the appropriate node |
private edu.umich.visualsoar.operatorwindow.OperatorNode |
makeNodeVersionTwo(java.util.HashMap linkedToMap,
java.util.List linkNodesToRestore,
java.io.Reader r)
Opens a Visual Soar project by creating the appropriate node |
void |
openDataMap()
Asks the MainFrame class to open the datamap |
void |
openHierarchy(java.io.File in_file)
Opens up an existing operator hierarchy |
void |
openRules()
Asks the MainFrame class to open a rule editor with the associated file of the node |
private void |
openVersionFive(java.io.FileReader fr,
java.lang.String parentPath)
Opens a Version Five Operator Hierarchy file |
private void |
openVersionFour(java.io.FileReader fr,
java.lang.String parentPath)
Opens a Version Four Operator Hierarchy file |
private void |
openVersionOne(java.io.FileReader fr,
java.lang.String parentPath)
Opens a Version One Operator Hierarchy file |
private void |
openVersionThree(java.io.FileReader fr,
java.lang.String parentPath)
Opens a Version Three Operator Hierarchy file |
private void |
openVersionTwo(java.io.FileReader fr,
java.lang.String parentPath)
Opens a Version two Operator Hierarchy file |
static boolean |
operatorNameIsValid(java.lang.String theName)
Checks name entries for illegal values |
private void |
readVersionFive(java.io.Reader r)
Reads a Version Five .vsa project file and interprets it to create a Visual Soar project from the the file. |
private void |
readVersionFour(java.io.Reader r)
Reads a Version Four .vsa project file and interprets it to create a Visual Soar project from the the file. |
private void |
readVersionOne(java.io.Reader r)
Reads a Version One .vsa project file and interprets it to create a Visual Soar project from the the file. |
private void |
readVersionThree(java.io.Reader r)
Reads a Version Three .vsa project file and interprets it to create a Visual Soar project from the the file. |
private void |
readVersionTwo(java.io.Reader r)
Reads a Version Two .vsa project file and interprets it to create a Visual Soar project from the the file. |
private void |
reduceWorkingMemory()
Attempts to reduce Working Memory by finding all vertices that are unreachable from a state and adds them to a list of holes so that they can be recycled for later use |
void |
removeNode(edu.umich.visualsoar.operatorwindow.OperatorNode operatorNode)
Removes a node from the operator window |
void |
rename()
Renames the selected node |
private void |
restoreStateIds()
This is a helper function restores the ids to high-level operators |
void |
saveHierarchy()
Save entire Operator Hierarchy (including datamap) |
void |
saveProjectAs(java.lang.String newName,
java.lang.String newPath)
Saves project as a new project name |
void |
sendProductions(java.io.Writer w)
|
void |
suggestShowContextMenu(int x,
int y)
Checks to see if x,y is a valid location on the screen, if it is then it displays the context menu there |
private static boolean |
treePathSubset(javax.swing.tree.TreePath set,
javax.swing.tree.TreePath subset)
|
private void |
writeOutAllElabs(java.io.File fileToWriteTo)
Writes out the default productions in the _all.soar file |
void |
writeOutHierarchy(java.io.File inFileName,
java.io.File inDataMapName)
Saves the current hierarchy to disk using Version 4 method |
void |
writeOutHierarchy5(java.io.File inFileName,
java.io.File inDataMapName)
Saves the current hierarchy to disk - Version 5 Not Currently Iimplemented in Visual Soar |
private void |
writeOutTopStateElabs(java.io.File fileToWriteTo,
java.lang.String topStateName)
Writes out the default productions in the top-state.soar file |
Methods inherited from class javax.swing.JTree |
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getDragEnabled, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setDragEnabled, setEditable, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
int nextId
java.awt.dnd.DragGestureListener dgListener
java.awt.dnd.DropTargetListener dtListener
private java.awt.dnd.DropTarget dropTarget
private edu.umich.visualsoar.datamap.SoarWorkingMemoryModel WorkingMemory
private OperatorWindow.BackupThread backupThread
private boolean closed
Constructor Detail |
private OperatorWindow()
OperatorWindow.BackupThread
public OperatorWindow(java.lang.String projectName, java.lang.String projectFileName, boolean is_new)
projectName
- The name of the projectprojectFileName
- The full file path of the projects locationis_new
- True if it is a new projectSoarWorkingMemoryModel
,
defaultProject(String, File)
public OperatorWindow(java.io.File in_file) throws java.lang.NumberFormatException, java.io.IOException, java.io.FileNotFoundException
in_file
- the location of the project to be openedSoarWorkingMemoryModel
,
openHierarchy(File)
Method Detail |
public void suggestShowContextMenu(int x, int y)
x
- the x coordinate of the screeny
- the y coordinate of the screenpublic edu.umich.visualsoar.operatorwindow.FolderNode createFolderNode(java.lang.String inName, java.lang.String inFolderName)
inName
- Name given to new nodeinFolderName
- same as inName, name of created folderFolderNode
public edu.umich.visualsoar.operatorwindow.FileNode createFileNode(java.lang.String inName, java.lang.String inFile)
inName
- name of file nodeinFile
- name of created rule editor file, same as inNameFileNode
public edu.umich.visualsoar.operatorwindow.ImpasseOperatorNode createImpasseOperatorNode(java.lang.String inName, java.lang.String inFileName)
inName
- name of nodeinFileName
- name of created rule editor file, same as inNameImpasseOperatorNode
public edu.umich.visualsoar.operatorwindow.ImpasseOperatorNode createImpasseOperatorNode(java.lang.String inName, java.lang.String inFileName, java.lang.String inFolderName, edu.umich.visualsoar.graph.SoarIdentifierVertex inDataMapId)
inName
- name of nodeinFileName
- name of created rule editor file, same as inNameinFolderName
- name of created folder, same as inNameinDataMapId
- SoarIdentifierVertex corresponding to node's datamapImpasseOperatorNode
,
SoarIdentifierVertex
public edu.umich.visualsoar.operatorwindow.ImpasseOperatorNode createImpasseOperatorNode(java.lang.String inName, java.lang.String inFileName, java.lang.String inFolderName, int inDataMapIdNumber)
inName
- name of nodeinFileName
- name of created rule editor file, same as inNameinFolderName
- name of created folder, same as inNameinDataMapIdNumber
- integer corresponding to node's datamapImpasseOperatorNode
public edu.umich.visualsoar.operatorwindow.FileOperatorNode createFileOperatorNode(java.lang.String inName, java.lang.String inFileName)
inName
- name of nodeinFileName
- name of created rule editor file, same as inNameFileOperatorNode
public edu.umich.visualsoar.operatorwindow.FileOperatorNode createFileOperatorNode(java.lang.String inName, java.lang.String inFileName, java.lang.String inFolderName, edu.umich.visualsoar.graph.SoarIdentifierVertex inDataMapId)
inName
- name of nodeinFileName
- name of created rule editor file, same as inNameinFolderName
- name of created folder, same as inNameinDataMapId
- SoarIdentifierVertex corresponding to node's datamapFileOperatorNode
,
SoarIdentifierVertex
public edu.umich.visualsoar.operatorwindow.FileOperatorNode createFileOperatorNode(java.lang.String inName, java.lang.String inFileName, java.lang.String inFolderName, int inDataMapIdNumber)
inName
- name of nodeinFileName
- name of created rule editor file, same as inNameinFolderName
- name of created folder, same as inNameinDataMapIdNumber
- integer corresponding to node's datamapFileOperatorNode
public edu.umich.visualsoar.operatorwindow.OperatorOperatorNode createSoarOperatorNode(java.lang.String inName, java.lang.String inFileName)
inName
- name of the nodeinFileName
- name of created rule editor file, same as inNameOperatorOperatorNode
public edu.umich.visualsoar.operatorwindow.OperatorOperatorNode createSoarOperatorNode(java.lang.String inName, java.lang.String inFileName, java.lang.String inFolderName, edu.umich.visualsoar.graph.SoarIdentifierVertex inDataMapId)
inName
- name of the nodeinFileName
- name of created rule editor file, same as inNameinFolderName
- name of created folder, same as inNameinDataMapId
- SoarIdentifierVertex corresponding to node's datamapOperatorOperatorNode
,
SoarIdentifierVertex
public edu.umich.visualsoar.operatorwindow.OperatorOperatorNode createSoarOperatorNode(java.lang.String inName, java.lang.String inFileName, java.lang.String inFolderName, int inDataMapIdNumber)
inName
- name of the nodeinFileName
- name of created rule editor file, same as inNameinFolderName
- name of created folder, same as inNameinDataMapIdNumber
- integer corresponding to node's datamapOperatorOperatorNode
public edu.umich.visualsoar.operatorwindow.OperatorRootNode createOperatorRootNode(java.lang.String inName, java.lang.String inFullPathStart, java.lang.String inFolderName)
inName
- name of the root node, should be the same as the project nameinFullPathStart
- full path of the projectinFolderName
- created folder name, same as project nameOperatorRootNode
public edu.umich.visualsoar.operatorwindow.OperatorRootNode createOperatorRootNode(java.lang.String inName, java.lang.String inFolderName)
inName
- name of the node, same as the name of the projectinFolderName
- name of the root operator's folder, same as inNameOperatorRootNode
public edu.umich.visualsoar.operatorwindow.LinkNode createLinkNode(edu.umich.visualsoar.operatorwindow.SoarOperatorNode inSoarOperatorNode)
LinkNode
public edu.umich.visualsoar.operatorwindow.LinkNode createLinkNode(java.lang.String inName, java.lang.String inFileName, int inHighLevelId)
LinkNode
public void removeNode(edu.umich.visualsoar.operatorwindow.OperatorNode operatorNode)
operatorNode
- the node that is to be removedDefaultTreeModel#removeNodeFromParent(OperatorNode)
public final int getNextId()
public int getChildCount()
public void addChild(edu.umich.visualsoar.operatorwindow.OperatorNode parent, edu.umich.visualsoar.operatorwindow.OperatorNode child)
public static boolean operatorNameIsValid(java.lang.String theName)
theName
- the name entered
public static boolean isProjectNameValid(java.lang.String theName)
theName
- the name entered
public void addSuboperator()
java.lang.Exception
- invalid name givenpublic void export()
public void importFunc()
public void rename()
java.lang.Exception
- invalid nameNameDialog
public void addFile()
java.lang.Exception
- Invalid namepublic void addImpasse(java.lang.String s)
s
- impasse type string chosen from file menu, given as name of nodepublic void checkProductions(edu.umich.visualsoar.operatorwindow.OperatorNode on, java.util.Vector productions, java.util.List errors)
SoarProduction
,
SoarWorkingMemoryModel.checkProduction(SoarIdentifierVertex, SoarProduction)
public void checkProductionsLog(edu.umich.visualsoar.operatorwindow.OperatorNode on, java.util.Vector productions, java.util.List errors, java.io.FileWriter w)
public void generateProductions(edu.umich.visualsoar.operatorwindow.OperatorNode on, java.util.Vector productions, java.util.List generations, edu.umich.visualsoar.operatorwindow.OperatorNode current)
SoarProduction
,
SoarWorkingMemoryModel.checkGenerateProduction(SoarIdentifierVertex, SoarProduction, OperatorNode)
public void openRules()
public void openDataMap()
public edu.umich.visualsoar.datamap.SoarWorkingMemoryModel getDatamap()
SoarWorkingMemoryModel
public void delete()
public void checkChildrenAgainstDataMap()
java.lang.Exception
- unable to check productions due to parse errorcheckProductions(OperatorNode, Vector, java.util.List)
public void openHierarchy(java.io.File in_file) throws java.io.FileNotFoundException, java.io.IOException, java.lang.NumberFormatException
java.lang.Exception
- Invalid version number, must be version number 1-5
java.io.FileNotFoundException
java.io.IOException
java.lang.NumberFormatException
openVersionFour(FileReader, String)
private void openVersionOne(java.io.FileReader fr, java.lang.String parentPath) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
#readVersionOne(FileReader)
,
SoarWorkingMemoryReader.read(SoarWorkingMemoryModel, Reader, Reader)
private void openVersionTwo(java.io.FileReader fr, java.lang.String parentPath) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
#readVersionTwo(FileReader)
,
SoarWorkingMemoryReader.read(SoarWorkingMemoryModel, Reader, Reader)
private void openVersionThree(java.io.FileReader fr, java.lang.String parentPath) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
#readVersionThree(FileReader)
,
SoarWorkingMemoryReader.read(SoarWorkingMemoryModel, Reader, Reader)
private void openVersionFour(java.io.FileReader fr, java.lang.String parentPath) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
#readVersionFour(FileReader)
,
SoarWorkingMemoryReader.read(SoarWorkingMemoryModel, Reader, Reader)
private void openVersionFive(java.io.FileReader fr, java.lang.String parentPath) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
#readVersionOne(FileReader)
,
SoarWorkingMemoryReader.read(SoarWorkingMemoryModel, Reader, Reader)
private void restoreStateIds()
public java.util.Enumeration breadthFirstEnumeration()
public void breadthFirstTraversal(edu.umich.visualsoar.util.Visitor v)
public void saveProjectAs(java.lang.String newName, java.lang.String newPath)
newName
- the new name of the projectnewPath
- the new file path of the projectsaveHierarchy()
,
OperatorRootNode.renameAndBackup(OperatorWindow,String,String)
public void writeOutHierarchy5(java.io.File inFileName, java.io.File inDataMapName)
inFileName
- name of the file to be saved - .vsa fileinDataMapName
- name of the datamapfile - .dm file
java.lang.Exception
- i/o exceptionreduceWorkingMemory()
,
TreeFileWriter#write(FileWriter,DefaultTreeModel)
,
SoarWorkingMemoryModel#write(FileWriter)
,
SoarWorkingMemoryModel#writeComments(FileWriter)
public void writeOutHierarchy(java.io.File inFileName, java.io.File inDataMapName)
inFileName
- name of the file to be saved - .vsa fileinDataMapName
- name of the datamapfile - .dm file
java.lang.Exception
- i/o exceptionreduceWorkingMemory()
,
TreeFileWriter#write(FileWriter,DefaultTreeModel)
,
SoarWorkingMemoryModel#write(FileWriter)
,
SoarWorkingMemoryModel#writeComments(FileWriter)
public void saveHierarchy()
writeOutHierarchy(File,File)
public void closeHierarchy()
saveHierarchy()
private void reduceWorkingMemory()
SoarWorkingMemoryModel.reduce(java.util.List)
private javax.swing.tree.DefaultTreeModel defaultProject(java.lang.String projectName, java.io.File projectFile)
projectName
- name of the projectprojectFile
- name of project's .vsa file
java.lang.Exception
- io exceptionOperatorRootNode
,
FileOperatorNode
,
FolderNode
public void findInProject(java.lang.String stringToFind, boolean matchCase)
public void findInProjectAndOpenRule(java.lang.String stringToFind, boolean matchCase)
public void sendProductions(java.io.Writer w) throws java.io.IOException
java.io.IOException
private void readVersionOne(java.io.Reader r) throws java.io.IOException, java.io.FileNotFoundException, java.lang.NumberFormatException
r
- the Reader of the .vsa project file
java.io.IOException
java.io.FileNotFoundException
java.lang.NumberFormatException
makeNodeVersionOne(Reader)
private void readVersionFive(java.io.Reader r) throws java.io.IOException, java.io.FileNotFoundException, java.lang.NumberFormatException
r
- the Reader of the .vsa project file
java.io.IOException
java.io.FileNotFoundException
java.lang.NumberFormatException
makeNodeVersionFive(HashMap, java.util.List,Reader, SoarIdentifierVertex)
private void readVersionFour(java.io.Reader r) throws java.io.IOException, java.io.FileNotFoundException, java.lang.NumberFormatException
r
- the Reader of the .vsa project file
java.io.IOException
java.io.FileNotFoundException
java.lang.NumberFormatException
makeNodeVersionFour(HashMap,java.util.List, Reader)
private void readVersionThree(java.io.Reader r) throws java.io.IOException, java.io.FileNotFoundException, java.lang.NumberFormatException
r
- the Reader of the .vsa project file
java.io.IOException
java.io.FileNotFoundException
java.lang.NumberFormatException
makeNodeVersionThree(HashMap,java.util.List, Reader)
private void readVersionTwo(java.io.Reader r) throws java.io.IOException, java.io.FileNotFoundException, java.lang.NumberFormatException
r
- the Reader of the .vsa project file
java.io.IOException
java.io.FileNotFoundException
java.lang.NumberFormatException
makeNodeVersionTwo(HashMap,java.util.List, Reader)
private edu.umich.visualsoar.operatorwindow.OperatorNode makeNodeVersionFive(java.util.HashMap linkedToMap, java.util.List linkNodesToRestore, java.io.Reader r, edu.umich.visualsoar.graph.SoarIdentifierVertex parentDataMap) throws java.io.IOException, java.lang.NumberFormatException
linkedToMap
- hashmap used to keep track of linked nodes, not usedlinkNodesToRestore
- list of linked nodes needed to restore, not usedr
- .vsa file that is being read to open projectparentDataMap
- parent of created nodes datamap id
java.io.IOException
java.lang.NumberFormatException
OperatorNode
,
readVersionFive(Reader)
private edu.umich.visualsoar.operatorwindow.OperatorNode makeNodeVersionFour(java.util.HashMap linkedToMap, java.util.List linkNodesToRestore, java.io.Reader r) throws java.io.IOException, java.lang.NumberFormatException
linkedToMap
- hashmap used to keep track of linked nodes, not usedlinkNodesToRestore
- list of linked nodes needed to restore, not usedr
- .vsa file that is being read to open project
java.io.IOException
java.lang.NumberFormatException
OperatorNode
,
readVersionFour(Reader)
private edu.umich.visualsoar.operatorwindow.OperatorNode makeNodeVersionThree(java.util.HashMap linkedToMap, java.util.List linkNodesToRestore, java.io.Reader r) throws java.io.IOException, java.lang.NumberFormatException
linkedToMap
- hashmap used to keep track of linked nodes, not usedlinkNodesToRestore
- list of linked nodes needed to restore, not usedr
- .vsa file that is being read to open project
java.io.IOException
java.lang.NumberFormatException
OperatorNode
,
readVersionThree(Reader)
private edu.umich.visualsoar.operatorwindow.OperatorNode makeNodeVersionTwo(java.util.HashMap linkedToMap, java.util.List linkNodesToRestore, java.io.Reader r) throws java.io.IOException, java.lang.NumberFormatException
linkedToMap
- hashmap used to keep track of linked nodes, not usedlinkNodesToRestore
- list of linked nodes needed to restore, not usedr
- .vsa file that is being read to open project
java.io.IOException
java.lang.NumberFormatException
OperatorNode
,
readVersionTwo(Reader)
private edu.umich.visualsoar.operatorwindow.OperatorNode makeNodeVersionOne(java.io.Reader r) throws java.io.IOException, java.lang.NumberFormatException
r
- .vsa file that is being read to open project
java.io.IOException
java.lang.NumberFormatException
OperatorNode
,
readVersionOne(Reader)
private static boolean treePathSubset(javax.swing.tree.TreePath set, javax.swing.tree.TreePath subset)
private edu.umich.visualsoar.operatorwindow.OperatorNode getNodeForId(int id)
private void writeOutTopStateElabs(java.io.File fileToWriteTo, java.lang.String topStateName) throws java.io.IOException
fileToWriteTo
- the top-state.soar filetopStateName
- the name of the project/top state
java.io.IOException
private void writeOutAllElabs(java.io.File fileToWriteTo) throws java.io.IOException
fileToWriteTo
- the _all.soar file
java.io.IOException
|
Java 2 Platform v1.3 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |