Package org.zkoss.zul.event
Class ListDataEvent
- java.lang.Object
-
- org.zkoss.zul.event.ListDataEvent
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ChildrenBindingListModelDataEvent
,ForEachListModelDataEvent
public class ListDataEvent extends java.lang.Object implements java.io.Serializable
Defines an event that encapsulates changes to a list. Note: Since 10.0.0, it should be serializable- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONTENTS_CHANGED
Identifies one or more changes in the lists contents.static int
DISABLE_CLIENT_UPDATE
Identified the state that Component's client update to be disabledstatic int
ENABLE_CLIENT_UPDATE
Identified the state that Component's client update to be enabledstatic int
INTERVAL_ADDED
Identifies the addition of one or more contiguous items to the list.static int
INTERVAL_REMOVED
Identifies the removal of one or more contiguous items from the list.static int
MULTIPLE_CHANGED
Identified the state ofSelectable.isMultiple()
is changed.static int
SELECTION_CHANGED
Identifies the selection of the lists has changed.static int
STRUCTURE_CHANGED
Identifies the structure of the lists has changed.
-
Constructor Summary
Constructors Constructor Description ListDataEvent(ListModel model, int type, int index0, int index1)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIndex0()
Returns the lower index of the change range.int
getIndex1()
Returns the upper index of the change range.ListModel
getModel()
Returns the list model that fires this event.int
getType()
Returns the event type.java.lang.String
toString()
-
-
-
Field Detail
-
CONTENTS_CHANGED
public static final int CONTENTS_CHANGED
Identifies one or more changes in the lists contents.- See Also:
- Constant Field Values
-
INTERVAL_ADDED
public static final int INTERVAL_ADDED
Identifies the addition of one or more contiguous items to the list.- See Also:
- Constant Field Values
-
INTERVAL_REMOVED
public static final int INTERVAL_REMOVED
Identifies the removal of one or more contiguous items from the list.- See Also:
- Constant Field Values
-
STRUCTURE_CHANGED
public static final int STRUCTURE_CHANGED
Identifies the structure of the lists has changed. @since 5.0.7- See Also:
- Constant Field Values
-
SELECTION_CHANGED
public static final int SELECTION_CHANGED
Identifies the selection of the lists has changed. Notice that the objects being selected can be found by callingSelectable.getSelection()
. Moreover,getIndex0()
andgetIndex1()
are both meaningless.- Since:
- 6.0.0
- See Also:
- Constant Field Values
-
MULTIPLE_CHANGED
public static final int MULTIPLE_CHANGED
Identified the state ofSelectable.isMultiple()
is changed.- Since:
- 6.0.0
- See Also:
- Constant Field Values
-
DISABLE_CLIENT_UPDATE
public static final int DISABLE_CLIENT_UPDATE
Identified the state that Component's client update to be disabled- Since:
- 8.0.0
- See Also:
- Constant Field Values
-
ENABLE_CLIENT_UPDATE
public static final int ENABLE_CLIENT_UPDATE
Identified the state that Component's client update to be enabled- Since:
- 8.0.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ListDataEvent
public ListDataEvent(ListModel model, int type, int index0, int index1)
Constructor.- Parameters:
type
- one ofCONTENTS_CHANGED
,INTERVAL_ADDED
,INTERVAL_REMOVED
.index0
- the lower index of the change range. For simple element, index0 is the same as index1. -1 means the first element (the same as 0).index1
- the upper index of the change range. -1 means the last element.
-
-
Method Detail
-
getModel
public ListModel getModel()
Returns the list model that fires this event.
-
getType
public int getType()
-
getIndex0
public int getIndex0()
Returns the lower index of the change range. For a single element, this value is the same as that returned bygetIndex1()
.
-
getIndex1
public int getIndex1()
Returns the upper index of the change range. For a single element, this value is the same as that returned bygetIndex0()
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-