public class DefaultLogicalArea extends GenericTreeNode implements LogicalArea
Constructor and Description |
---|
DefaultLogicalArea() |
DefaultLogicalArea(Area src) |
DefaultLogicalArea(Area src,
java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
void |
addArea(Area a) |
void |
appendChild(LogicalArea child)
Appends a new child area to the list of child areas of this area.
|
void |
appendChildren(java.util.List<LogicalArea> children)
Appends a list of child areas to the list of child areas of this area.
|
LogicalArea |
findArea(Area area)
Scans a logical area subtree rooted in this logical area for the given area.
|
int |
getAreaCount() |
java.util.List<Area> |
getAreas() |
Area |
getFirstArea() |
LogicalArea |
getChildArea(int index)
Obtains the n-th child area.
|
java.util.List<LogicalArea> |
getChildAreas()
Returns the list of all the child areas.
|
int |
getIndex(LogicalArea child)
Returns the index of the specified child in this node's child array.
|
Tag |
getMainTag() |
LogicalArea |
getNextSibling()
Obtains the next siblibg of this area.
|
LogicalArea |
getParentArea()
Obtains the parent area of this area.
|
LogicalArea |
getPreviousSibling()
Obtains the previous siblibg of this area.
|
java.lang.String |
getText() |
void |
insertChild(LogicalArea child,
int index)
Inserts a new child at the given position.
|
void |
removeChild(LogicalArea child)
Removes a child area from its parent.
|
void |
setMainTag(Tag mainTag) |
void |
setText(java.lang.String text) |
java.lang.String |
toString() |
add, addAttribute, getAttribute, getDepth, getChildAt, getChildCount, getChildren, getIndex, getLeafCount, getNextSiblingNode, getParent, getPreviousSiblingNode, getRoot, insert, isLeaf, isRoot, remove, remove, removeAllChildren
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttribute, getAttribute, getDepth, getChildCount, getLeafCount, isLeaf, removeAllChildren
public DefaultLogicalArea()
public DefaultLogicalArea(Area src)
public DefaultLogicalArea(Area src, java.lang.String text)
public void addArea(Area a)
addArea
in interface LogicalArea
public java.util.List<Area> getAreas()
getAreas
in interface LogicalArea
public Area getFirstArea()
getFirstArea
in interface LogicalArea
public int getAreaCount()
getAreaCount
in interface LogicalArea
public void setText(java.lang.String text)
setText
in interface LogicalArea
public java.lang.String getText()
getText
in interface LogicalArea
public void setMainTag(Tag mainTag)
setMainTag
in interface LogicalArea
public Tag getMainTag()
getMainTag
in interface LogicalArea
public java.lang.String toString()
toString
in class java.lang.Object
public LogicalArea getParentArea()
AreaTreeNode
getParentArea
in interface AreaTreeNode<LogicalArea>
null
when this is the root area.public LogicalArea getPreviousSibling()
AreaTreeNode
getPreviousSibling
in interface AreaTreeNode<LogicalArea>
null
when this is the first child.public LogicalArea getNextSibling()
AreaTreeNode
getNextSibling
in interface AreaTreeNode<LogicalArea>
null
when this is the last child.public LogicalArea getChildArea(int index) throws java.lang.ArrayIndexOutOfBoundsException
AreaTreeNode
getChildArea
in interface AreaTreeNode<LogicalArea>
index
- the child indexjava.lang.ArrayIndexOutOfBoundsException
public java.util.List<LogicalArea> getChildAreas()
AreaTreeNode
getChildAreas
in interface AreaTreeNode<LogicalArea>
public void appendChild(LogicalArea child)
AreaTreeNode
appendChild
in interface AreaTreeNode<LogicalArea>
child
- The new child to be appendedpublic void appendChildren(java.util.List<LogicalArea> children)
AreaTreeNode
appendChildren
in interface AreaTreeNode<LogicalArea>
children
- The list of new children to be appendedpublic void insertChild(LogicalArea child, int index)
AreaTreeNode
insertChild
in interface AreaTreeNode<LogicalArea>
child
- the child to be insertedindex
- the index of the new childpublic void removeChild(LogicalArea child)
AreaTreeNode
removeChild
in interface AreaTreeNode<LogicalArea>
child
- The new child to be appendedpublic int getIndex(LogicalArea child)
AreaTreeNode
getIndex
in interface AreaTreeNode<LogicalArea>
child
- the child node to searchpublic LogicalArea findArea(Area area)
LogicalArea
findArea
in interface LogicalArea
area
- the layout area to search fornull
when the given area
is not present in the given subtree