jbcl.view Package
java.lang.Object +----java.util.EventObject +----com.borland.jb.util.DispatchableEvent +----com.borland.jbcl.view.TreeEvent
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.
public static final int NODE_COLLAPSED = 1001
public static final int NODE_EXPANDED = 1000
public TreeEvent(Object source, int id, GraphLocation node)Constructs a
TreeItemEvent
object with properties defined in its parameters.
Parameters:
source
id
NODE_COLLAPSED
and NODE_EXPANDED
and are declared in this class.
node
public int getID()Read-only property that returns the event type. Valid values for this property are
NODE_EXPANDED
and NODE_COLLAPSED
.
public GraphLocation getLocation()Read-only property that returns the item where the event occurred.
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: com.borland.jb.util.DispatchableEvent.dispatch(java.util.EventListener)
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: com.borland.jb.util.DispatchableEvent.paramString()