STATE_DELETED, STATE_NEW, STATE_UNCHANGED, STATE_UPDATED
Constructor and Description |
---|
NodeTreeRep(boolean isLeft,
java.lang.String name)
Constructor when the associated XML node does not exists.
|
NodeTreeRep(boolean isLeft,
org.mdiutil.xml.tree.XMLNode node)
Constructor when the associated XML node exists.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(NodeTreeRep child)
Add a child wrapper to this element.
|
int |
countChildren()
Count the number of children.
|
NodeTreeRep |
getChild(int index)
Return the child wrapper of a specified index.
|
java.util.List<NodeTreeRep> |
getChildren()
Return the children wrappers for this element.
|
ComparedElement |
getComparedElement()
Return the associated compared element.
|
int |
getIndexInParent()
Return the index of this wrapper in its parent.
|
char |
getMovedState()
Return the wrapper associated element moved state.
|
org.mdiutil.xml.tree.XMLNode |
getNode()
Return the associated XML node (can be null)
|
XMLNodeKey |
getNodeKey()
Return the associated node key.
|
java.lang.String |
getNodeName()
Return the associated node name.
|
org.mdiutil.xml.tree.XMLNode |
getOtherNode()
Return the associated XML node on the other side (can be null)
|
NodeTreeRep |
getParent()
Return the parent wrapper.
|
NodeTreeRep |
getPreviousSibling()
Return the previous sibling.
|
char |
getState()
Return the wrapper associated element state.
|
javax.swing.tree.DefaultMutableTreeNode |
getTreeNode()
Return the associated tree node.
|
boolean |
hasChildren()
Return true if this wrapper has children.
|
boolean |
hasDifferentChildren()
Return true if the wrapper associated element has children which are different beteween left and right.
|
boolean |
hasXMLNode()
Return true if this wrapper is associated to a concrete XML node (which means that there is an XML node for the associated left or right tree).
|
boolean |
isFirstInParent()
Return true if this wrapper is the first in its parent.
|
boolean |
isLeft()
Return true if this is a left wrapper.
|
void |
setComparedElement(ComparedElement element)
Set the associated compared element.
|
void |
setTreeNode(javax.swing.tree.DefaultMutableTreeNode treeNode)
Set the associated tree node.
|
java.lang.String |
toString() |
public NodeTreeRep(boolean isLeft, org.mdiutil.xml.tree.XMLNode node)
isLeft
- true for a left node wrappernode
- the associated XML nodepublic NodeTreeRep(boolean isLeft, java.lang.String name)
isLeft
- true for a left node wrappername
- the associated node namepublic NodeTreeRep getParent()
public NodeTreeRep getPreviousSibling()
public int getIndexInParent()
public boolean isFirstInParent()
public boolean isLeft()
public void setComparedElement(ComparedElement element)
element
- the compared elementpublic ComparedElement getComparedElement()
public void addChild(NodeTreeRep child)
child
- the childpublic java.util.List<NodeTreeRep> getChildren()
public NodeTreeRep getChild(int index)
index
- the indexpublic int countChildren()
public boolean hasChildren()
public void setTreeNode(javax.swing.tree.DefaultMutableTreeNode treeNode)
treeNode
- the tree nodepublic javax.swing.tree.DefaultMutableTreeNode getTreeNode()
public java.lang.String getNodeName()
public boolean hasXMLNode()
public XMLNodeKey getNodeKey()
public java.lang.String toString()
toString
in class java.lang.Object
public org.mdiutil.xml.tree.XMLNode getNode()
public org.mdiutil.xml.tree.XMLNode getOtherNode()
public boolean hasDifferentChildren()
public char getState()
ComparedElement.getState()
,
NodeState
public char getMovedState()
ComparedElement.getMovedState()
,
NodeMoveState
Copyright © 2024 HervĂ© Girod. All Rights Reserved. Documentation and source under the BSD licence