Package com.ms.ui Previous
Previous
Contents
Contents
Index
Index
Next
Next

Interface IUITree

Methods

public interface IUITree
{
  // Methods
  public Rectangle getAttachRect();
  public boolean hasChildren();

  public boolean getExpanded();
  public Component getExpander();
  public Component setExpander(Component expander);
  public void setExpanded(boolean expanded);

}

Defines an interface for classes that can be tree nodes. UITree implements this interface.


Methods


getAttachRect

public Rectangle getAttachRect();

Determines where the attaching line will be drawn from the tree node's parent to the tree node.

Return Value:

Returns the bounding rectangle that the attaching line should connect to.


getExpanded

public boolean getExpanded();

Determines whether the tree node is expanded.

Return Value:

Returns true if the node is expanded; otherwise, returns false.


getExpander

public Component getExpander();

Retrieves the tree node's expander component, which indicates whether the node is expanded or collapsed.

Return Value:

Returns the expander component associated with the tree control.


hasChildren

public boolean hasChildren();

Determines if the tree node has children.

Return Value:

Returns true if the node has child items; otherwise, returns false.


setExpanded

public void setExpanded(boolean expanded);

Expands or collapses the tree node to show or hide the node's children.

Return Value:

No return value.

ParameterDescription
expanded If true, the node is expanded; otherwise, the node is collapsed.


setExpander

public Component setExpander(Component expander);

Sets the tree node's expander to the specified component.

Return Value:

Returns the component previously used for the node's expander component.

ParameterDescription
expander The component to be used for the tree node's expander.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.