|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.tree.DefaultMutableTreeNode | +--did.xml.DIDNode
File: DIDNode.java Version: 1.1 Description: This class extends the DefaultMutableTreeNode class and therefore fits nicely into the Swing MVC concept. Used in conjuction with the TreeModel and JTree (and the proper listeners) this class provides the basis for displaying and editing the DOM tree and underlying XML data. For every Node in the DOM (built from the XML data file) there is a corresponding DIDNode. Since the DOM can not be directly used in the Swing MVC architecture this parralleling of tree structures allows the application to use existing swing components (JTree, DefaultTreeModel, various TreeListeners) to view and manipulate DOM (XML) specific data. Modification Log: Date Name Comment xx-xx-xxxx XXX xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Field Summary | |
static java.lang.String |
CHARACTER
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
static java.lang.String |
DOCUMENT
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
static java.lang.String |
LINE
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
static java.lang.String |
OTHER
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
static java.lang.String |
PAGE
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
static java.lang.String |
VERTEX
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
static java.lang.String |
WORD
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
static java.lang.String |
ZONE
Contant(s) that denote the type of data this Node represents as it pertains to the application. |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren,
children,
EMPTY_ENUMERATION,
parent,
userObject |
Constructor Summary | |
DIDNode(org.w3c.dom.Node newNode,
DIDDefaultTreeModel newModel)
Method used to instantiate this class. |
Method Summary | |
static java.lang.String |
decodeString(java.lang.String uniStr)
Method used to convert the unicode values into unicode string |
void |
deleteDomNode()
Method used to remove the userObject from the TreeModels DOM Tree. |
java.lang.String |
getDataType()
Method used to deterime the type of data this node userObject contains as is pertains to this application. |
org.w3c.dom.Node |
getDomNode()
Method used to return the DOM node this node is mirroring. |
DIDDefaultTreeModel |
getModel()
Method used to return a reference to the TreeModel to which this Node belongs. |
java.lang.String |
getNodeName()
Method used to return the name of the DOM node in the userObject. |
int |
getNodeType()
Method used to return the type of Node the userOject represents. |
java.lang.String |
getNodeValue()
Method used to return the value of the DOM node in the userObject. |
DIDRoiIFC |
getRoi()
Method used to return a reference to the ROI which is representing this Node in the ImageCanvas. |
void |
setDomNode(org.w3c.dom.Node newNode)
Method used to set the userObject attribute to the DOM node this node is mirroring. |
void |
setModel(DIDDefaultTreeModel newModel)
Convenience method used to set a reference to the TreeModel to which this Node belongs. |
void |
setNodeValue(java.lang.String newValue)
Method used to set the value of the userObject(DOM Node). |
void |
setRoi(DIDRoiIFC newRoi)
Method used to set a reference to ROI which represents this node. |
java.lang.String |
toString()
Method used to return a Java String representation of this object. |
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 |
public static java.lang.String DOCUMENT
public static java.lang.String PAGE
public static java.lang.String ZONE
public static java.lang.String WORD
public static java.lang.String LINE
public static java.lang.String CHARACTER
public static java.lang.String VERTEX
public static java.lang.String OTHER
Constructor Detail |
public DIDNode(org.w3c.dom.Node newNode, DIDDefaultTreeModel newModel)
newNode
- New W3C Node object this node is to display.newModel
- TreeModel which this node is a part of.Method Detail |
public void setDomNode(org.w3c.dom.Node newNode)
newNode
- A W3C node to be place in the userObject attribute.public org.w3c.dom.Node getDomNode()
public java.lang.String getNodeName()
public java.lang.String getNodeValue()
public void setNodeValue(java.lang.String newValue)
newValue
- A String representing the new value of the DOM Node(userObject).public int getNodeType()
public java.lang.String getDataType()
#setDataType
,
PAGE
public java.lang.String toString()
public void setRoi(DIDRoiIFC newRoi)
newRoi
- New reference to an ROI.public DIDRoiIFC getRoi()
public DIDDefaultTreeModel getModel()
public void setModel(DIDDefaultTreeModel newModel)
newModel
- A DIDDefaultTreeModel object which refrences the TreeModel to which this
Node belongs.public void deleteDomNode()
public static java.lang.String decodeString(java.lang.String uniStr)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |