org.zkoss.zul.event
Class TreeDataEvent

java.lang.Object
  extended by org.zkoss.zul.event.TreeDataEvent

public class TreeDataEvent
extends java.lang.Object

Defines an event that encapsulates changes to a tree.

Since:
ZK 3.0.0
Author:
Jeff Liu

Field Summary
static int CONTENTS_CHANGED
          Identifies changing contents of nodes.
static int INTERVAL_ADDED
          Identifies the addition of children to a node.
static int INTERVAL_REMOVED
          Identifies the removal of children to a node.
 
Constructor Summary
TreeDataEvent(TreeModel model, int type, java.lang.Object parent, int indexFrom, int indexTo)
          Contructor.
 
Method Summary
 int getIndexFrom()
          Return the lower index of the change range
 int getIndexTo()
          Return the upper index of the change range
 TreeModel getModel()
          Returns the tree model that fires this event.
 java.lang.Object getParent()
          Returns the parent node that one of its children being modified
 int getType()
          Returns the event type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENTS_CHANGED

public static final int CONTENTS_CHANGED
Identifies changing contents of nodes.

See Also:
Constant Field Values

INTERVAL_ADDED

public static final int INTERVAL_ADDED
Identifies the addition of children to a node.

See Also:
Constant Field Values

INTERVAL_REMOVED

public static final int INTERVAL_REMOVED
Identifies the removal of children to a node.

See Also:
Constant Field Values
Constructor Detail

TreeDataEvent

public TreeDataEvent(TreeModel model,
                     int type,
                     java.lang.Object parent,
                     int indexFrom,
                     int indexTo)
Contructor.

Parameters:
type - one of CONTENTS_CHANGED, INTERVAL_ADDED, or INTERVAL_REMOVED.
parent - - the parent node that its children being modified .
indexFrom - the lower index of the change range
indexTo - the upper index of the change range
Method Detail

getModel

public TreeModel getModel()
Returns the tree model that fires this event.


getType

public int getType()
Returns the event type. One of CONTENTS_CHANGED, INTERVAL_ADDED, or INTERVAL_REMOVED.


getParent

public java.lang.Object getParent()
Returns the parent node that one of its children being modified

Returns:
the parent node that one of its children being modified

getIndexFrom

public int getIndexFrom()
Return the lower index of the change range

Returns:
the lower index of the change range

getIndexTo

public int getIndexTo()
Return the upper index of the change range

Returns:
the upper index of the change range


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo