Package org.zkoss.zul.event
Class TreeDataEvent
java.lang.Object
org.zkoss.zul.event.TreeDataEvent
Defines an event that encapsulates changes to a tree.
- Since:
- 3.0.0
- Author:
- Jeff Liu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIdentifies changing contents of nodes.static final intIdentified the state that Component's client update to be disabledstatic final intIdentified the state that Component's client update to be enabledstatic final intIdentifies the addition of children to a node.static final intIdentifies the removal of children to a node.static final intIdentified the state ofSelectable.isMultiple()is changed.static final intIdentifies the open status of the tree has changed.static final intIdentifies the selection of the tree has changed.static final intIdentifies the structure of the tree has changed.static final intIdentified the state of partial selection in a tristate checkbox is changed. -
Constructor Summary
ConstructorsConstructorDescriptionTreeDataEvent(TreeModel model, int type, int[] nodePath, int indexFrom, int indexTo) Constructor.TreeDataEvent(TreeModel model, int type, int[] nodePath, int indexFrom, int indexTo, int[] affectedPath) Constructor.TreeDataEvent(TreeModel model, int type, int[] nodePath, int indexFrom, int indexTo, int[][] affectedPaths) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint[]Return the path of removed nodeint[][]Return the paths of removed nodes, if any.intReturn the lower index of the change rangeintReturn the upper index of the change rangegetModel()Returns the tree model that fires this event.int[]getPath()Returns the path of the affected node.intgetType()Returns the event type.
-
Field Details
-
CONTENTS_CHANGED
public static final int CONTENTS_CHANGEDIdentifies changing contents of nodes.- See Also:
-
INTERVAL_ADDED
public static final int INTERVAL_ADDEDIdentifies the addition of children to a node.- See Also:
-
INTERVAL_REMOVED
public static final int INTERVAL_REMOVEDIdentifies the removal of children to a node.- See Also:
-
STRUCTURE_CHANGED
public static final int STRUCTURE_CHANGEDIdentifies the structure of the tree has changed. @since 5.0.6- See Also:
-
SELECTION_CHANGED
public static final int SELECTION_CHANGEDIdentifies the selection of the tree has changed. @since 6.0.0- See Also:
-
OPEN_CHANGED
public static final int OPEN_CHANGEDIdentifies the open status of the tree has changed. @since 6.0.0- See Also:
-
MULTIPLE_CHANGED
public static final int MULTIPLE_CHANGEDIdentified the state ofSelectable.isMultiple()is changed.- Since:
- 6.0.0
- See Also:
-
TRISTATE_CHANGED
public static final int TRISTATE_CHANGEDIdentified the state of partial selection in a tristate checkbox is changed.- Since:
- 10.0.0
- See Also:
-
DISABLE_CLIENT_UPDATE
public static final int DISABLE_CLIENT_UPDATEIdentified the state that Component's client update to be disabled- Since:
- 8.0.0
- See Also:
-
ENABLE_CLIENT_UPDATE
public static final int ENABLE_CLIENT_UPDATEIdentified the state that Component's client update to be enabled- Since:
- 8.0.0
- See Also:
-
-
Constructor Details
-
TreeDataEvent
Constructor.- Parameters:
type- one ofCONTENTS_CHANGED,INTERVAL_ADDED,INTERVAL_REMOVED,SELECTION_CHANGED,OPEN_CHANGED,STRUCTURE_CHANGEDorMULTIPLE_CHANGED.nodePath- the path of the affected node. IfCONTENTS_CHANGED,INTERVAL_ADDEDorINTERVAL_REMOVED, it is the parent node. IfSELECTION_CHANGEDorOPEN_CHANGED, it is the node being selected or opened. IfSTRUCTURE_CHANGEDorMULTIPLE_CHANGED, it is null.indexFrom- the lower index of the change rangeindexTo- the upper index of the change range
-
TreeDataEvent
public TreeDataEvent(TreeModel model, int type, int[] nodePath, int indexFrom, int indexTo, int[] affectedPath) Constructor.- Parameters:
type- one ofCONTENTS_CHANGED,INTERVAL_ADDED,INTERVAL_REMOVED,SELECTION_CHANGED,OPEN_CHANGED,STRUCTURE_CHANGEDorMULTIPLE_CHANGED.nodePath- the path of the affected node. IfCONTENTS_CHANGED,INTERVAL_ADDEDorINTERVAL_REMOVED, it is the parent node. IfSELECTION_CHANGEDorOPEN_CHANGED, it is the node being selected or opened. IfSTRUCTURE_CHANGEDorMULTIPLE_CHANGED, it is null.indexFrom- the lower index of the change rangeindexTo- the upper index of the change rangeaffectedPath- the path to be removed or added
-
TreeDataEvent
public TreeDataEvent(TreeModel model, int type, int[] nodePath, int indexFrom, int indexTo, int[][] affectedPaths) Constructor.- Parameters:
type- one ofCONTENTS_CHANGED,INTERVAL_ADDED,INTERVAL_REMOVED,SELECTION_CHANGED,OPEN_CHANGED,STRUCTURE_CHANGEDorMULTIPLE_CHANGED.nodePath- the path of the affected node. IfCONTENTS_CHANGED,INTERVAL_ADDEDorINTERVAL_REMOVED, it is the parent node. IfSELECTION_CHANGEDorOPEN_CHANGED, it is the node being selected or opened. IfSTRUCTURE_CHANGEDorMULTIPLE_CHANGED, it is null.indexFrom- the lower index of the change rangeindexTo- the upper index of the change rangeaffectedPaths- the paths to be removed or added- Since:
- 10.0.0
-
-
Method Details
-
getModel
Returns the tree model that fires this event. -
getType
public int getType() -
getPath
public int[] getPath()Returns the path of the affected node. IfCONTENTS_CHANGED,INTERVAL_ADDEDorINTERVAL_REMOVED, it is the parent node. IfSELECTION_CHANGEDorOPEN_CHANGED, it is the node being selected or opened. IfSTRUCTURE_CHANGEDorMULTIPLE_CHANGED, it is null.- 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
-
getAffectedPath
public int[] getAffectedPath()Return the path of removed node- Returns:
- the node that is removed
-
getAffectedPaths
public int[][] getAffectedPaths()Return the paths of removed nodes, if any.- Since:
- 10.0.0
-