public class TreeNode extends Object implements ITreeNode, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected ArrayList |
downChildren
Children that are one level down from this node.
|
static int |
NO_CTYPE
Constant representing no ctype.
|
protected ArrayList |
upChildren
Children that are one level up from this node.
|
| Constructor and Description |
|---|
TreeNode(String name,
String desc)
Creates a new
TreeNode instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addDownChild(ITreeNode child)
Add a child one level below this node.
|
void |
addDownChildren(ITreeNode[] children)
Add several children one level below this node.
|
void |
addRectangle(int x,
int y,
int cx,
int cy)
Set the rectangle of coordinates for the image map.
|
void |
addUpChild(ITreeNode child)
Add a child one level above this node.
|
void |
addUpChildren(ITreeNode[] children)
Add several children one level above this node.
|
void |
clear()
Describe
clear method here. |
boolean |
equals(Object o)
Determines whether two objects are equal.
|
String |
getDescription()
Get the description.
|
ITreeNode[] |
getDownChildren()
Get the children one level down from this node.
|
int |
getDownChildrenCount()
Return the number of children one level below this node.
|
String |
getName()
Get the name.
|
Rectangle[] |
getRectangles()
Get the rectangles of coordinates for the image map.
|
ITreeNode[] |
getUpChildren()
Get the children one level up from this node.
|
int |
getUpChildrenCount()
Return the number of children one level above this node.
|
boolean |
hasDownChildren()
Returns true if this node has children one level below.
|
int |
hashCode()
Returns the hashcode of this object.
|
boolean |
hasUpChildren()
Returns true if this node has children one level above.
|
boolean |
isSelected()
Returns true if the node is selected, false otherwise.
|
void |
replaceDownChildren(ITreeNode[] children)
Replace down children
|
void |
replaceUpChildren(ITreeNode[] children)
Replace up children
|
void |
reset()
Clears the internal state of the node.
|
void |
setDescription(String desc)
Set the description.
|
void |
setName(String name)
Set the name.
|
void |
setSelected(boolean selected)
Set whether or not this node is selected.
|
String |
toString() |
public static final int NO_CTYPE
protected ArrayList upChildren
protected ArrayList downChildren
public String getName()
public void setName(String name)
name - the name of the nodepublic String getDescription()
getDescription in interface ITreeNodepublic void setDescription(String desc)
desc - the description of the nodepublic Rectangle[] getRectangles()
getRectangles in interface ITreeNodepublic void addRectangle(int x,
int y,
int cx,
int cy)
addRectangle in interface ITreeNodex - top left corner horizontal positiony - top left corner horizontal positioncx - widthcy - heightpublic boolean isSelected()
isSelected in interface ITreeNodepublic void setSelected(boolean selected)
selected - true or falsepublic void addUpChild(ITreeNode child)
child - the child to addpublic void addUpChildren(ITreeNode[] children)
children - the children to addpublic ITreeNode[] getUpChildren()
getUpChildren in interface ITreeNodepublic int getUpChildrenCount()
public boolean hasUpChildren()
hasUpChildren in interface ITreeNodepublic void addDownChild(ITreeNode child)
child - the child to addpublic void addDownChildren(ITreeNode[] children)
children - the children to addpublic void replaceDownChildren(ITreeNode[] children)
children - the children to replacepublic void replaceUpChildren(ITreeNode[] children)
children - the children to replacepublic ITreeNode[] getDownChildren()
getDownChildren in interface ITreeNodepublic int getDownChildrenCount()
public boolean hasDownChildren()
hasDownChildren in interface ITreeNodepublic void clear()
clear method here.public void reset()
public boolean equals(Object o)
public int hashCode()
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.