public interface AreaTreeNode<T>
| Modifier and Type | Method and Description |
|---|---|
void |
appendChild(T child)
Appends a new child area to the list of child areas of this area.
|
int |
getDepth()
Obtains the depth of the tree rooted at this area.
|
T |
getChildArea(int index)
Obtains the n-th child area.
|
List<T> |
getChildAreas()
Returns the list of all the child areas.
|
int |
getChildCount()
Returns the number of child areas for this area.
|
int |
getIndex(T child)
Returns the index of the specified child in this node's child array.
|
T |
getNextSibling()
Obtains the next siblibg of this area.
|
T |
getParentArea()
Obtains the parent area of this area.
|
T |
getPreviousSibling()
Obtains the previous siblibg of this area.
|
void |
insertChild(T child,
int index)
Inserts a new child at the given position.
|
boolean |
isLeaf()
Checks whether this area is a leaf area
|
void |
removeChild(T child)
Removes a child area from its parent.
|
T getParentArea()
null when this is the root area.T getPreviousSibling()
null when this is the first child.T getNextSibling()
null when this is the last child.T getChildArea(int index) throws ArrayIndexOutOfBoundsException
index - the child indexArrayIndexOutOfBoundsExceptionint getChildCount()
List<T> getChildAreas()
void appendChild(T child)
child - The new child to be appendedvoid insertChild(T child, int index)
child - the child to be insertedindex - the index of the new childvoid removeChild(T child)
child - The new child to be appendedint getIndex(T child)
child - the child node to searchboolean isLeaf()
true when the area is a leaf area (it has no children)int getDepth()
Copyright © 2015. All rights reserved.