Java 2 Platform
v1.3

edu.umich.visualsoar.operatorwindow
Class LinkNode

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

public class LinkNode
extends FileNode

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
(package private)  edu.umich.visualsoar.operatorwindow.SoarOperatorNode linkedToNode
           
(package private)  int linkedToNodeId
           
 
Fields inherited from class edu.umich.visualsoar.operatorwindow.FileNode
fileAssociation, fullTransferFileName, ruleEditor, transferTreePath
 
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
LinkNode(int inId, edu.umich.visualsoar.operatorwindow.SoarOperatorNode inHighLevelOperator)
           
LinkNode(java.lang.String inName, int inId, java.lang.String inFileName, int inLinkToNodeId)
           
 
Method Summary
 void addFile(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, java.lang.String newFileName)
          This is the function that gets called when you want to add a file 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)
          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
 java.util.Enumeration children()
           
 void delete(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow)
          Removes the selected file from the tree if it is allowed
 void exportDesc(java.io.Writer w)
          Given a Writer this writes out a description of the operator node that can be read back later
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 java.lang.String getFolderName()
          This is a getter method for the folder name if the node supports this operation it returns the true path if it doesn't this returns null
 edu.umich.visualsoar.operatorwindow.SoarOperatorNode getLinkToNode()
           
 boolean isLeaf()
           
 void restore(java.util.Map persistentIds)
           
 void showContextMenu(java.awt.Component c, int x, int y)
          This adjusts the context menu so that only the valid commands are displayed
 java.lang.String toString()
          just returns the name of the node
 void write(java.io.Writer w)
          Given a Writer this writes out a description of the operator node that can be read back in later
 
Methods inherited from class edu.umich.visualsoar.operatorwindow.FileNode
clearRuleEditor, copyStructures, exportDataMap, exportFile, exportType, getFileName, getFullPathName, getTransferTreePath, moveAssociations, needsToSourceChildren, notifyChildrenOfRename, openRules, openRules, parseProductions, rename, renameFile, setRuleEditor, setTransferFullPath, source, sourceChildren, sourceRecursive
 
Methods inherited from class edu.umich.visualsoar.operatorwindow.OperatorNode
addFileOperator, addImpasseOperator, addLink, checkChildrenAgainstDataMap, export, getId, getStateIdVertex, getUniqueName, importFunc, isDragOk, isDropOk, move, notifyDeletionOfChild, notifyRenameOfAncestor, okayToCreate, okayToCreate, okayToCreateReplace, openDataMap, recursiveDelete, renameToDeleted
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, clone, depthFirstEnumeration, getChildAfter, getChildBefore, 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

linkedToNode

edu.umich.visualsoar.operatorwindow.SoarOperatorNode linkedToNode

linkedToNodeId

int linkedToNodeId
Constructor Detail

LinkNode

public LinkNode(java.lang.String inName,
                int inId,
                java.lang.String inFileName,
                int inLinkToNodeId)

LinkNode

public LinkNode(int inId,
                edu.umich.visualsoar.operatorwindow.SoarOperatorNode inHighLevelOperator)
Method Detail

restore

public void restore(java.util.Map persistentIds)

getLinkToNode

public final edu.umich.visualsoar.operatorwindow.SoarOperatorNode getLinkToNode()

getFolderName

public java.lang.String getFolderName()
Description copied from class: OperatorNode
This is a getter method for the folder name if the node supports this operation it returns the true path if it doesn't this returns null

Overrides:
getFolderName in class OperatorNode
Returns:
null

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode
Overrides:
getChildAt in class javax.swing.tree.DefaultMutableTreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode
Overrides:
getChildCount in class javax.swing.tree.DefaultMutableTreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
Overrides:
getAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode
Overrides:
children in class javax.swing.tree.DefaultMutableTreeNode

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
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:
addSuboperator in class OperatorNode
Parameters:
newOperatorName - the name of the new operator to add
java.io.IOException

addFile

public void addFile(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
                    java.lang.String newFileName)
             throws java.io.IOException
Description copied from class: FileNode
This is the function that gets called when you want to add a file to this node

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

delete

public void delete(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow)
Description copied from class: FileNode
Removes the selected file from the tree if it is allowed

Overrides:
delete in class FileNode

toString

public java.lang.String toString()
Description copied from class: OperatorNode
just returns the name of the node

Overrides:
toString in class OperatorNode
Returns:
the name of the node

write

public void write(java.io.Writer w)
           throws java.io.IOException
Description copied from class: FileNode
Given a Writer this writes out a description of the operator node that can be read back in later

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

showContextMenu

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

Overrides:
showContextMenu in class FileNode
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

exportDesc

public void exportDesc(java.io.Writer w)
                throws java.io.IOException
Description copied from class: FileNode
Given a Writer this writes out a description of the operator node that can be read back later

Overrides:
exportDesc in class FileNode
Parameters:
w - where the description should be written to
Throws:
java.io.IOException - if there is an error writing to the writer

Java 2 Platform
v1.3