public class LNode extends Object
LTree
,
TreeLayout
Modifier and Type | Method and Description |
---|---|
LNode |
addChild(Object owner,
String text) |
LNode |
addChild(Object owner,
String text,
boolean visible)
Add new child to this node.
|
void |
collapse()
Collapse this node to hide all children.
|
void |
deleteFromTree(boolean deleteSubTree) |
void |
expand()
Expand this node to show all children.
|
LNode |
getAt(int i)
Get child of this node at specified index.
|
Color |
getBackgroundColor()
Get the color that will be used for background if drawBorder is true.
|
Color |
getBorderColor()
Get the color that will be used for borders if drawBorder is true.
|
Point2D.Double |
getBounds(int camIndex)
Get bounds of the node.
|
LNode[] |
getChildren() |
Object |
getClientProperty(Object key)
Get user object that was set for this key using method setClientProperty(Object key, Object value).
|
Color |
getEdgeColor() |
LNode |
getFirstChild() |
LNode |
getLastChild() |
LNode |
getNextSibling() |
Object |
getOwner()
Get user object that represent this node.
|
LNode |
getParentNode() |
LNode |
getPreviousSibling() |
Color |
getSelectedBackgroundColor() |
Color |
getSelectedBorderColor() |
Color |
getSelectedTextColor() |
String |
getText()
Get text of the node.
|
Color |
getTextColor()
Get the color that will be used for node's text.
|
LTree |
getTree() |
boolean |
hasChildren() |
boolean |
isExpanded() |
boolean |
isVisible() |
void |
removeChild(LNode child,
boolean deleteSubTree) |
void |
setBackgroundColor(Color backgroundColor)
Set the color that will be used for background if drawBorder is true.
|
void |
setBorderColor(Color borderColor)
Set the color that will be used for borders if drawBorder is true.
|
void |
setClientProperty(Object key,
Object value)
Set any key-value pair to the LNode instance.
|
void |
setEdgeColor(Color edgeColor) |
void |
setOwner(Object owner)
Set any user object that represent this node.
|
void |
setSelectedBackgroundColor(Color selectedBackgroundColor) |
void |
setSelectedBorderColor(Color selectedBorderColor) |
void |
setSelectedTextColor(Color selectedTextColor) |
void |
setText(String text)
Set text of the node.
|
void |
setTextColor(Color textColor)
Set the color that will be used for node's text.
|
void |
updateNode(int treeOrientation,
int camIndex)
This method can be called after the tree was laid out with layout algorithm
to update position of this node and all children.
|
public LTree getTree()
public String getText()
public void setText(String text)
text
- String for this node.public Color getBorderColor()
public void setBorderColor(Color borderColor)
borderColor
- new border color.public Color getBackgroundColor()
public void setBackgroundColor(Color backgroundColor)
backgroundColor
- new background color.public Color getTextColor()
public void setTextColor(Color textColor)
textColor
- new text color.public Color getSelectedBackgroundColor()
public void setSelectedBackgroundColor(Color selectedBackgroundColor)
public Color getSelectedTextColor()
public void setSelectedTextColor(Color selectedTextColor)
public Color getSelectedBorderColor()
public void setSelectedBorderColor(Color selectedBorderColor)
public Color getEdgeColor()
public void setEdgeColor(Color edgeColor)
public Point2D.Double getBounds(int camIndex)
camIndex
- Index of active camera.public Object getClientProperty(Object key)
key
- key to retrieve valuepublic void setClientProperty(Object key, Object value)
key
- key for the valuevalue
- any user objectpublic LNode getParentNode()
public LNode addChild(Object owner, String text, boolean visible)
owner
- Any user datatext
- Text representation of the node.visible
- Visibility of newly created node.public boolean hasChildren()
public LNode[] getChildren()
public LNode getFirstChild()
public LNode getLastChild()
public LNode getPreviousSibling()
public LNode getNextSibling()
public LNode getAt(int i)
i
- index of the desired child.public void removeChild(LNode child, boolean deleteSubTree)
public void deleteFromTree(boolean deleteSubTree)
public void updateNode(int treeOrientation, int camIndex)
treeOrientation
- One of the TreeOrientation constants.camIndex
- Index of active camera.public void expand()
public void collapse()
public boolean isExpanded()
public boolean isVisible()
public Object getOwner()
public void setOwner(Object owner)
owner
- user object.Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.