borland Packages  Class Hierarchy  jbcl.view Package  Index 

TreeEvent class

java.lang.Object
   +----java.util.EventObject
           +----borland.jbcl.util.DispatchableEvent
                   +----borland.jbcl.view.TreeEvent

About the TreeEvent class

Variables  Constructors  Properties  Methods  

Implements Serializable

The TreeEvent is the object created whenever a tree item event occurs.

The ID property specifies whether the event object was created in response to a NODE_COLLAPSED event or to a NODE_EXPANDED event. Based upon this id, the dispatch() method calls the appropriate method in the listening component, which is either nodeCollapsed() or nodeExpanded(). The location property indicates the node where the event occurred.


TreeEvent variables

Variables implemented in this class

Variables implemented in java.util.EventObject

TreeEvent constructors

TreeEvent properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in borland.jbcl.util.DispatchableEvent

Properties implemented in java.lang.Object

Properties implemented in java.util.EventObject

TreeEvent methods

Methods implemented in this class

Methods implemented in borland.jbcl.util.DispatchableEvent

Methods implemented in java.lang.Object


TreeEvent variables

NODE_COLLAPSED

  public static final int NODE_COLLAPSED = 1001

NODE_EXPANDED

  public static final int NODE_EXPANDED = 1000

TreeEvent constructors

TreeEvent(java.lang.Object, int, borland.jbcl.model.GraphLocation)

  public TreeEvent(java.lang.Object source, int id, borland.jbcl.model.GraphLocation node)
Constructs a TreeItemEvent object with properties defined in its parameters.

Parameters:

source
The component where the event occurred.
id
The event object identification. Valid values for this parameter are NODE_COLLAPSED and NODE_EXPANDED and are declared in this class.
node
The node of the tree where the event happened.

TreeEvent properties

ID

 public int getID()
Read-only property that returns the event type. Valid values for this property are NODE_EXPANDED and NODE_COLLAPSED.

location

 public GraphLocation getLocation()
Read-only property that returns the item where the event occurred.

TreeEvent methods

dispatch(java.util.EventListener)

  public void dispatch(java.util.EventListener listener)
Checks the id property and sends copies of the event object to registered model event listeners, calling the nodeCollapsed() or nodeExpanded() methods as appropriate.

Overrides: borland.jbcl.util.DispatchableEvent.dispatch(java.util.EventListener)

paramString()

  protected String paramString()
Appends TreeEvent parameters to the superclass paramString() method. The parameter string that is appended is:

"id=" + idStr + ",location=" + node

The value of idStr is one of the variables displayed as a string.

Overrides: borland.jbcl.util.DispatchableEvent.paramString()