Java 2 Platform
v1.3

edu.umich.visualsoar.operatorwindow
Class FolderNode

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

public class FolderNode
extends OperatorNode
implements java.io.Serializable

This is the Folder node for the operator window

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
protected  java.lang.String folderName
          a string that is the path to the folder which is associated with this node
 
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
FolderNode(java.lang.String inName, int inId, java.lang.String inFolderName)
          This constructs a folder node for the Operator Window
 
Method Summary
 edu.umich.visualsoar.operatorwindow.OperatorNode addFileOperator(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm, java.lang.String newFileName)
          This is the function that gets called when you want to add a sub file operator to this node
 edu.umich.visualsoar.operatorwindow.OperatorNode addImpasseOperator(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm, java.lang.String newOperatorName)
          This is the function that gets called when you want to add a sub Impasse Operator to this node
 edu.umich.visualsoar.operatorwindow.OperatorNode addSuboperator(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm, java.lang.String newOperatorName)
          This is the function that gets called when you want to add a suboperator to this node
 void copyStructures(java.io.File folderToWriteTo)
           
 void delete(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow)
          If the node supports this operation it should be overloaded in the subclass if this function gets called it means that the node did not properly overload the function, so the user just told the program to do something that it cannot all this function does is print out an error message to that effect
 void exportDataMap(java.io.Writer w)
           
 void exportDesc(java.io.Writer w)
           
 void exportFile(java.io.Writer w, int id)
           
 void exportType(java.io.Writer w)
           
 java.lang.String getFolderName()
          Use this getter function to get the path to the folder
protected  java.lang.String getFullPathName()
          This returns the the full path from the parent
 void importFunc(java.io.Reader r, edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm)
           
 java.awt.datatransfer.DataFlavor isDropOk(int action, java.awt.datatransfer.DataFlavor[] dataFlavors)
           
 boolean isLeaf()
          this tells the JTree to always render this like it it has children
 void notifyDeletionOfChild(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, edu.umich.visualsoar.operatorwindow.OperatorNode child)
          Tell the parent that a node has been deleted a node should do when a child is deleted - nothing
 void showContextMenu(java.awt.Component c, int x, int y)
          This adjusts the context menu so that only the valid commands are displayed
 void source(java.io.Writer w)
           
 void sourceChildren()
           
 void sourceRecursive()
           
 void write(java.io.Writer w)
          Given a Writer this writes out a description of the folder node that can be read back in later
 
Methods inherited from class edu.umich.visualsoar.operatorwindow.OperatorNode
addFile, addLink, checkChildrenAgainstDataMap, clearRuleEditor, export, getFileName, getId, getStateIdVertex, getUniqueName, isDragOk, move, notifyRenameOfAncestor, okayToCreate, okayToCreate, okayToCreateReplace, openDataMap, 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

folderName

protected java.lang.String folderName
a string that is the path to the folder which is associated with this node

Constructor Detail

FolderNode

public FolderNode(java.lang.String inName,
                  int inId,
                  java.lang.String inFolderName)
This constructs a folder node for the Operator Window

Method Detail

getFolderName

public java.lang.String getFolderName()
Use this getter function to get the path to the folder

Overrides:
getFolderName in class OperatorNode
Returns:
the path to the folder

getFullPathName

protected java.lang.String getFullPathName()
This returns the the full path from the parent

Specified by:
getFullPathName in class OperatorNode

isLeaf

public boolean isLeaf()
this tells the JTree to always render this like it it has children

Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode
Returns:
false

addFileOperator

public edu.umich.visualsoar.operatorwindow.OperatorNode addFileOperator(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                                                                        edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm,
                                                                        java.lang.String newFileName)
                                                                 throws java.io.IOException
This is the function that gets called when you want to add a sub file operator to this node

Overrides:
addFileOperator in class OperatorNode
Parameters:
newFileName - the name of the new operator to add
java.io.IOException

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
This is the function that gets called when you want to add a suboperator to this node

Overrides:
addSuboperator in class OperatorNode
Parameters:
newOperatorName - the name of the new operator to add
java.io.IOException

addImpasseOperator

public edu.umich.visualsoar.operatorwindow.OperatorNode addImpasseOperator(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                                                                           edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm,
                                                                           java.lang.String newOperatorName)
                                                                    throws java.io.IOException
This is the function that gets called when you want to add a sub Impasse Operator to this node

Overrides:
addImpasseOperator in class OperatorNode
Parameters:
newOperatorName - the name of the new operator to add
java.io.IOException

notifyDeletionOfChild

public void notifyDeletionOfChild(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                                  edu.umich.visualsoar.operatorwindow.OperatorNode child)
Description copied from class: OperatorNode
Tell the parent that a node has been deleted a node should do when a child is deleted - nothing

Overrides:
notifyDeletionOfChild in class OperatorNode

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

Specified by:
showContextMenu in class OperatorNode
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

write

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

Specified by:
write in class TreeNode
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
Specified by:
exportDesc in class OperatorNode
java.io.IOException

exportFile

public void exportFile(java.io.Writer w,
                       int id)
                throws java.io.IOException
Specified by:
exportFile in class OperatorNode
java.io.IOException

exportDataMap

public void exportDataMap(java.io.Writer w)
                   throws java.io.IOException
Specified by:
exportDataMap in class OperatorNode
java.io.IOException

exportType

public void exportType(java.io.Writer w)
                throws java.io.IOException
Specified by:
exportType in class OperatorNode
java.io.IOException

delete

public void delete(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow)
Description copied from class: OperatorNode
If the node supports this operation it should be overloaded in the subclass if this function gets called it means that the node did not properly overload the function, so the user just told the program to do something that it cannot all this function does is print out an error message to that effect

Overrides:
delete in class OperatorNode

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 OperatorNode
java.io.IOException
java.lang.NumberFormatException

copyStructures

public void copyStructures(java.io.File folderToWriteTo)
                    throws java.io.IOException
Specified by:
copyStructures in class OperatorNode
java.io.IOException

isDropOk

public java.awt.datatransfer.DataFlavor isDropOk(int action,
                                                 java.awt.datatransfer.DataFlavor[] dataFlavors)
Overrides:
isDropOk in class OperatorNode

source

public void source(java.io.Writer w)
            throws java.io.IOException
Specified by:
source in class OperatorNode
java.io.IOException

sourceChildren

public void sourceChildren()
                    throws java.io.IOException
Specified by:
sourceChildren in class OperatorNode
java.io.IOException

sourceRecursive

public void sourceRecursive()
                     throws java.io.IOException
Specified by:
sourceRecursive in class OperatorNode
java.io.IOException

Java 2 Platform
v1.3