public class Node extends Element
Modifier and Type | Field and Description |
---|---|
Node |
first
First child of this element.
|
Node |
next
The right sibling of this element.
|
Node |
previous
The left sibling of this element.
|
listeners, properties, prototype
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accept a visitor.
|
Object |
clone()
Returns a deep clone of the node.
|
Node |
getFirst()
Returns the first child.
|
Node |
getLast()
Returns the last child.
|
Node |
getNext()
Returns the right sibling.
|
Node |
getPrevious()
Returns the left sibling.
|
Node |
insert(Node node,
Node position)
Insert a child node.
|
Node |
move(Node child,
Node position)
Move a child node among siblings.
|
void |
remove()
Remove the node from the tree structure.
|
void |
setPrototype(Element prototype)
Sets the prototype of this element to the given argument.
|
acceptSafe, addListener, getColor, getCommandManager, getDocument, getLocalProperty, getParent, getProperties, getProperty, getPropertyValue, getPrototype, getPrototypeFromParent, getTemplate, getX, getY, hasFlag, importInto, isPropertyLocal, removeListener, setCommandManager, setProperties, setProperty, setPropertyFromPath
public Node previous
public Node next
public Node first
public Node(Element prototype)
prototype
- - The prototype of the nodepublic Node getPrevious()
public Node getNext()
public Node getFirst()
public Node getLast()
public void accept(Visitor visitor) throws Exception
Element
public Node insert(Node node, Node position)
node
- - The new nodeposition
- - The insert positionpublic Node move(Node child, Node position)
child
- - The child nodeposition
- - The positionpublic void remove()
public Object clone() throws CloneNotSupportedException
clone
in class Element
CloneNotSupportedException
- an object cannot be cloned.public void setPrototype(Element prototype)
setPrototype
in class Element
prototype
- - The property elementCopyright © 2014 Uppsala University and Aalborg University. All Rights Reserved.