public class TreeMapNode extends DefaultMutableTreeNode
You can also use a TreeMapNode in a JTree.
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject| Constructor and Description |
|---|
TreeMapNode(String label)
Constructor for a branch.
|
TreeMapNode(String label,
double weight,
Value value)
Constructor for a leaf.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(TreeMapNode newChild)
add a new child to the node.
|
TreeMapNode |
getActiveLeaf(int xParam,
int yParam)
get the active leaf.
null if the passed position is not in this tree. |
static int |
getBorder()
Get the max border between two nodes of the same level.
|
TreeMapNode |
getChild(int xParam,
int yParam)
get the first child which fits the position.
null if the passed position is not in this tree. |
List<TreeMapNode> |
getChildren()
get a List with the children.
|
double |
getDoubleValue()
get the double Value.
|
int |
getHeight()
get the height.
|
String |
getLabel()
get the label.
|
String |
getLabelValue()
get the label of the Value.
|
Value |
getValue()
get the Value.
|
double |
getWeight()
get the weight.
|
int |
getWidth()
get the width.
|
int |
getX()
get the x-coordinate.
|
int |
getY()
get the y-coordinate.
|
static void |
setBorder(int border)
Set the max border between two nodes of the same level.
|
void |
setDimension(int xParam,
int yParam,
int widthParam,
int heightParam)
set the position and the size.
|
void |
setHeight(int height)
set the height.
|
void |
setLabel(String label)
set the label.
|
void |
setPosition(int xParam,
int yParam)
set the position.
|
void |
setSize(int widthParam,
int heightParam)
set size.
|
void |
setValue(Value value)
set the Value.
|
void |
setWeight(double weight)
set the weight of the node and update the parents.
|
void |
setWidth(int width)
set the width.
|
void |
setX(int x)
set the x-coordinate.
|
void |
setY(int y)
set the y-coordinate.
|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toStringpublic TreeMapNode(String label)
label - label of the branch.public static int getBorder()
public static void setBorder(int border)
border - The border to set.public void add(TreeMapNode newChild)
newChild - new childpublic TreeMapNode getActiveLeaf(int xParam, int yParam)
xParam - x-coordinateyParam - y-coordinatepublic TreeMapNode getChild(int xParam, int yParam)
xParam - x-coordinateyParam - y-coordinatepublic List<TreeMapNode> getChildren()
public int getHeight()
public String getLabel()
public String getLabelValue()
public Value getValue()
public double getDoubleValue()
public double getWeight()
public int getWidth()
public int getX()
public int getY()
public void setDimension(int xParam,
int yParam,
int widthParam,
int heightParam)
xParam - x-coordinateyParam - y-coordinatewidthParam - the new widthheightParam - the new heightpublic void setHeight(int height)
height - la nouvelle valeur de heightpublic void setLabel(String label)
label - the new labelpublic void setPosition(int xParam,
int yParam)
xParam - x-coordinateyParam - y-coordinatepublic void setSize(int widthParam,
int heightParam)
widthParam - the new widthheightParam - the new heightpublic void setValue(Value value)
value - the new Valuepublic void setWeight(double weight)
weight - the new weightpublic void setWidth(int width)
width - la nouvelle valeur de widthpublic void setX(int x)
x - the new x-coordinatepublic void setY(int y)
y - the new y-coordinateCopyright © 2005–2019 Appendium - Portfolio Financing Platform. All rights reserved.