public class Element
extends java.lang.Object
Constructor and Description |
---|
Element() |
Element(java.util.ArrayList<java.lang.Integer> elementparts) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(Element c)
adds a child to the list of children of the element
|
void |
addPart(int elementp)
adds a Elementpart to an Element
|
java.lang.String |
elementToString()
Converts Element into String, for debugging purposes
|
java.util.ArrayList<Element> |
getChildren()
returns all children of the element
|
Element[] |
getDirectChildren()
returns the direct left and right child of the element
|
java.util.ArrayList<java.lang.Integer> |
getElementparts() |
Element |
getParent()
returns the parent element
|
double |
getPositionX()
returns the x coordinate of the element
|
double |
getPositionY()
returns the y coordinate of the element
|
int |
getSize()
returns the number of leaf children that the element has, which is equal to the number of parts that the element content has
|
void |
setDirectChildren(Element[] dc)
sets the direct left an right child of the element
|
void |
setParent(Element p)
sets the parent element
|
void |
setPositionX(double pos)
sets the x coordinate of the element
|
void |
setPositionY(double pos)
sets the y coordinate of the element
|
public Element(java.util.ArrayList<java.lang.Integer> elementparts)
public Element()
public java.util.ArrayList<java.lang.Integer> getElementparts()
public void addPart(int elementp)
elementp
- public java.lang.String elementToString()
public int getSize()
public void setDirectChildren(Element[] dc)
dc
- direct left an right child of the elementpublic void addChild(Element c)
c
- child to be addedpublic Element[] getDirectChildren()
public java.util.ArrayList<Element> getChildren()
public void setParent(Element p)
p
- parent elementpublic Element getParent()
public void setPositionX(double pos)
pos
- x coordinate of the elementpublic void setPositionY(double pos)
pos
- y coordinate of the elementpublic double getPositionX()
public double getPositionY()