Java 2 Platform
v1.3

edu.umich.visualsoar.operatorwindow
Class OperatorRootNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--edu.umich.visualsoar.operatorwindow.TreeNode
              |
              +--edu.umich.visualsoar.operatorwindow.OperatorNode
                    |
                    +--edu.umich.visualsoar.operatorwindow.FolderNode
                          |
                          +--edu.umich.visualsoar.operatorwindow.OperatorRootNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class OperatorRootNode
extends FolderNode
implements java.io.Serializable

This is the root node for the operator window

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
private  java.lang.String fullPathStart
          A that represents the file path to the datamap, must be intialized in the constructor
 
Fields inherited from class edu.umich.visualsoar.operatorwindow.FolderNode
folderName
 
Fields inherited from class edu.umich.visualsoar.operatorwindow.OperatorNode
addFileItem, addSuboperatorItem, checkChildrenAgainstDataMapItem, conflictImpasseItem, constraintImpasseItem, contextMenu, deleteItem, exportItem, id, impasseSubMenu, importItem, name, openDataMapItem, openRulesItem, renameItem, stateNoChangeImpasseItem, tieImpasseItem
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
OperatorRootNode(java.lang.String inName, int inId, java.lang.String inFolder)
           
OperatorRootNode(java.lang.String inName, int inId, java.lang.String inFullPathStart, java.lang.String inFolder)
          This constructs the normal OperatorRootNode object
 
Method Summary
 edu.umich.visualsoar.operatorwindow.OperatorNode addSuboperator(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm, java.lang.String newOperatorName)
          Adds a suboperator underneath this root node
 void exportDesc(java.io.Writer w)
           
 java.lang.String getDataMapFile()
           
protected  java.lang.String getFullPathName()
          This returns the path of the project so that children can determine the full path
 java.lang.String getFullPathStart()
           
 java.lang.String getProjectFile()
           
 edu.umich.visualsoar.graph.SoarIdentifierVertex getStateIdVertex()
          This returns the associated datamap entry for the root node which is going to be the top-state
 void importFunc(java.io.Reader r, edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm)
           
 void openDataMap(edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm, edu.umich.visualsoar.MainFrame pw)
          This opens/shows a dataMap with this nodes associated Data Map File
 void rename(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, java.lang.String newName, java.lang.String newPath)
           
 void renameAndBackup(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, java.lang.String newName, java.lang.String newPath)
           
 void setFullPath(java.lang.String s)
           
 void showContextMenu(java.awt.Component c, int x, int y)
          This adjusts the context menu so that only the valid commands are displayed
 void startSourcing()
           
 void write(java.io.Writer w)
          Given a Writer this writes out a description of the root node that can be read back in later
 
Methods inherited from class edu.umich.visualsoar.operatorwindow.FolderNode
addFileOperator, addImpasseOperator, copyStructures, delete, exportDataMap, exportFile, exportType, getFolderName, isDropOk, isLeaf, notifyDeletionOfChild, source, sourceChildren, sourceRecursive
 
Methods inherited from class edu.umich.visualsoar.operatorwindow.OperatorNode
addFile, addLink, checkChildrenAgainstDataMap, clearRuleEditor, export, getFileName, getId, getUniqueName, isDragOk, move, notifyRenameOfAncestor, okayToCreate, okayToCreate, okayToCreateReplace, openRules, openRules, parseProductions, recursiveDelete, rename, renameToDeleted, toString
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fullPathStart

private java.lang.String fullPathStart
A that represents the file path to the datamap, must be intialized in the constructor

Constructor Detail

OperatorRootNode

public OperatorRootNode(java.lang.String inName,
                        int inId,
                        java.lang.String inFullPathStart,
                        java.lang.String inFolder)
This constructs the normal OperatorRootNode object


OperatorRootNode

public OperatorRootNode(java.lang.String inName,
                        int inId,
                        java.lang.String inFolder)
Method Detail

write

public void write(java.io.Writer w)
           throws java.io.IOException
Given a Writer this writes out a description of the root node that can be read back in later

Overrides:
write in class FolderNode
Parameters:
w - the writer
Throws:
java.io.IOException - if there is an error writing to the writer

exportDesc

public void exportDesc(java.io.Writer w)
                throws java.io.IOException
Overrides:
exportDesc in class FolderNode
java.io.IOException

setFullPath

public void setFullPath(java.lang.String s)

getFullPathStart

public java.lang.String getFullPathStart()

addSuboperator

public edu.umich.visualsoar.operatorwindow.OperatorNode addSuboperator(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                                                                       edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm,
                                                                       java.lang.String newOperatorName)
                                                                throws java.io.IOException
Adds a suboperator underneath this root node

Overrides:
addSuboperator in class FolderNode
Parameters:
swmm - the Working Memory Model so that we can add corresponding entries to the datamap
newOperatorName - the name of the operator being added
java.io.IOException

getProjectFile

public java.lang.String getProjectFile()

getDataMapFile

public java.lang.String getDataMapFile()

getFullPathName

protected java.lang.String getFullPathName()
This returns the path of the project so that children can determine the full path

Overrides:
getFullPathName in class FolderNode
Returns:
the path of the project

showContextMenu

public void showContextMenu(java.awt.Component c,
                            int x,
                            int y)
This adjusts the context menu so that only the valid commands are displayed

Overrides:
showContextMenu in class FolderNode
Parameters:
c - the owner of the context menu, should be the OperatorWindow
x - the horizontal position on the screen where the context menu should be displayed
y - the vertical position on the screen where the context menu should be displayed

openDataMap

public void openDataMap(edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm,
                        edu.umich.visualsoar.MainFrame pw)
This opens/shows a dataMap with this nodes associated Data Map File

Overrides:
openDataMap in class OperatorNode
Parameters:
pw - the MainFrame

getStateIdVertex

public edu.umich.visualsoar.graph.SoarIdentifierVertex getStateIdVertex()
This returns the associated datamap entry for the root node which is going to be the top-state

Overrides:
getStateIdVertex in class OperatorNode

rename

public void rename(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                   java.lang.String newName,
                   java.lang.String newPath)
            throws java.io.IOException
java.io.IOException

importFunc

public void importFunc(java.io.Reader r,
                       edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                       edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm)
                throws java.io.IOException,
                       java.lang.NumberFormatException
Overrides:
importFunc in class FolderNode
java.io.IOException
java.lang.NumberFormatException

renameAndBackup

public void renameAndBackup(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                            java.lang.String newName,
                            java.lang.String newPath)

startSourcing

public void startSourcing()
                   throws java.io.IOException
java.io.IOException

Java 2 Platform
v1.3