|
Java 2 Platform v1.3 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.tree.DefaultMutableTreeNode | +--edu.umich.visualsoar.operatorwindow.TreeNode | +--edu.umich.visualsoar.operatorwindow.OperatorNode | +--edu.umich.visualsoar.operatorwindow.FileNode
This is the file node for the operator window
Nested Class Summary |
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode |
|
Field Summary | |
protected java.lang.String |
fileAssociation
a string that is the path to the file which is associated with this file |
protected java.lang.String |
fullTransferFileName
|
protected edu.umich.visualsoar.ruleeditor.RuleEditor |
ruleEditor
a reference to the rule editor, null if there isn't one |
protected javax.swing.tree.TreePath |
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 | |
FileNode(java.lang.String inName,
int inId,
java.lang.String inFile)
|
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 |
void |
clearRuleEditor()
This resets the rule editor to null for this node |
void |
copyStructures(java.io.File folderToWriteTo)
|
void |
delete(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow)
Removes the selected file from the tree if it is allowed |
void |
exportDataMap(java.io.Writer w)
|
void |
exportDesc(java.io.Writer w)
Given a Writer this writes out a description of the operator node that can be read back later |
void |
exportFile(java.io.Writer w,
int id)
Given a Writer this writes out the rules as it is either in the file or the rule editor |
void |
exportType(java.io.Writer w)
|
java.lang.String |
getFileName()
Use this getter function to get the path to the rule file |
protected java.lang.String |
getFullPathName()
|
javax.swing.tree.TreePath |
getTransferTreePath()
|
void |
moveAssociations()
|
boolean |
needsToSourceChildren()
|
void |
notifyChildrenOfRename(java.lang.String oldFilePath,
java.lang.String newFilePath)
An ancestor has been renamed so we must update our file association |
void |
openRules(edu.umich.visualsoar.MainFrame pw)
This opens/shows a rule editor with this nodes associated file |
void |
openRules(edu.umich.visualsoar.MainFrame pw,
int line)
This opens/shows a rule editor with this nodes associated file and places the caret on the given line number |
java.util.Vector |
parseProductions()
This will parse the productions for a given file node if a rule editor is open for the file it just forwards the call to the open rule editor, else it opens the file and attempts to parse the productions |
void |
rename(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow,
java.lang.String newName)
The user wants to rename this node |
protected void |
renameFile(java.lang.String newFileName)
This is a helper function that renames the file for which this node is associated to it's new file name, and also notifies the rule editor if there is one of the change |
void |
setRuleEditor(edu.umich.visualsoar.ruleeditor.RuleEditor re)
|
void |
setTransferFullPath()
|
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 operator node that can be read back in later |
Methods inherited from class edu.umich.visualsoar.operatorwindow.OperatorNode |
addFileOperator, addImpasseOperator, addLink, addSuboperator, checkChildrenAgainstDataMap, export, getFolderName, getId, getStateIdVertex, getUniqueName, importFunc, isDragOk, isDropOk, move, notifyDeletionOfChild, notifyRenameOfAncestor, okayToCreate, okayToCreate, okayToCreateReplace, openDataMap, recursiveDelete, 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, isLeaf, 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 |
protected java.lang.String fileAssociation
protected edu.umich.visualsoar.ruleeditor.RuleEditor ruleEditor
protected java.lang.String fullTransferFileName
protected javax.swing.tree.TreePath transferTreePath
Constructor Detail |
public FileNode(java.lang.String inName, int inId, java.lang.String inFile)
Method Detail |
public java.lang.String getFileName()
getFileName
in class OperatorNode
public void addFile(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, java.lang.String newFileName) throws java.io.IOException
addFile
in class OperatorNode
newFileName
- the name of the new operator to add
java.io.IOException
public void setTransferFullPath()
public javax.swing.tree.TreePath getTransferTreePath()
public void moveAssociations()
protected void renameFile(java.lang.String newFileName)
newFileName
- a String that represents the new file pathpublic void clearRuleEditor()
clearRuleEditor
in class OperatorNode
public void setRuleEditor(edu.umich.visualsoar.ruleeditor.RuleEditor re)
public void notifyChildrenOfRename(java.lang.String oldFilePath, java.lang.String newFilePath)
oldFilePath
- the ancestor's old File pathnewFilePath
- the ancestor's new File pathpublic void rename(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow, java.lang.String newName) throws java.io.IOException
rename
in class OperatorNode
newName
- the new name that the user wants this node to be called
java.io.IOException
public void write(java.io.Writer w) throws java.io.IOException
write
in class TreeNode
w
- the writer
java.io.IOException
- if there is an error writing to the writerpublic void exportDesc(java.io.Writer w) throws java.io.IOException
exportDesc
in class OperatorNode
w
- where the description should be written to
java.io.IOException
- if there is an error writing to the writerpublic void exportType(java.io.Writer w) throws java.io.IOException
exportType
in class OperatorNode
java.io.IOException
public void exportFile(java.io.Writer w, int id) throws java.io.IOException
exportFile
in class OperatorNode
w
- where the file should be written to
java.io.IOException
- if there is an error writing to the writerpublic void showContextMenu(java.awt.Component c, int x, int y)
showContextMenu
in class OperatorNode
c
- the owner of the context menu, should be the OperatorWindowx
- the horizontal position on the screen where the context menu should
be displayedy
- the vertical position on the screen where the context menu should
be displayedpublic void delete(edu.umich.visualsoar.operatorwindow.OperatorWindow operatorWindow)
delete
in class OperatorNode
public java.util.Vector parseProductions() throws ParseException, java.io.IOException
parseProductions
in class OperatorNode
ParseException
java.io.IOException
public void openRules(edu.umich.visualsoar.MainFrame pw)
openRules
in class OperatorNode
pw
- the MainFramepublic void openRules(edu.umich.visualsoar.MainFrame pw, int line)
openRules
in class OperatorNode
pw
- the Project windowline
- the line number to place the caret onprotected java.lang.String getFullPathName()
getFullPathName
in class OperatorNode
public void exportDataMap(java.io.Writer w) throws java.io.IOException
exportDataMap
in class OperatorNode
java.io.IOException
public void copyStructures(java.io.File folderToWriteTo) throws java.io.IOException
copyStructures
in class OperatorNode
java.io.IOException
public void source(java.io.Writer w) throws java.io.IOException
source
in class OperatorNode
java.io.IOException
public boolean needsToSourceChildren()
public void sourceChildren() throws java.io.IOException
sourceChildren
in class OperatorNode
java.io.IOException
public void sourceRecursive() throws java.io.IOException
sourceRecursive
in class OperatorNode
java.io.IOException
|
Java 2 Platform v1.3 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |