Interface IUITree
public interface IUITree
{
// Methods
public Rectangle getAttachRect();
public IUIComponent getExpander();
public boolean hasChildren();
public boolean isExpanded();
public void setExpanded(boolean expanded,boolean notify);
public void setExpanded(boolean expanded);
public void setExpander(IUIComponent expander);
}
This interface defines methods associated with tree nodes. UITree implements IUITree.
public Rectangle getAttachRect();
Determines where the attaching line from the tree node's parent to the tree node will be drawn.
Return Value:
Returns the node's bounding rectangle.
public IUIComponent getExpander();
Retrieves the tree node's expand button, which indicates whether the node is expanded or collapsed.
Return Value:
Returns the component currently being used as the expand button.
public boolean hasChildren();
Determines whether the tree node has child items.
Return Value:
Returns true if the node has child items; otherwise, returns false.
public boolean isExpanded();
Determines whether the tree node is expanded.
Return Value:
Returns true if the node is expanded; otherwise, returns false.
public void setExpanded(boolean expanded,boolean notify);
Expands or collapses the tree node to show or hide the node's children.
Return Value:
No return value.
Parameter | Description |
expanded
| If true, the node will be expanded; otherwise, the node will be collapsed.
|
notify
| If true, the node will generate an action event and posts it to the Tree node's parent.
|
public void setExpanded(boolean expanded);
Expands or collapses the tree node to show or hide the node's children.
Return Value:
No return value.
Parameter | Description |
expanded
| If true, the node will be expanded; otherwise, the node will be collapsed.
|
public void setExpander(IUIComponent expander);
Sets the tree node's expand button to the specified component. The expand button indicates whether the node is expanded or collapsed.
Return Value:
No return value.
Parameter | Description |
expander
| The component to be used for the expand button.
|