org.zkoss.zul.event
Class GroupsDataEvent

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

public class GroupsDataEvent
extends java.lang.Object

Defines an event that encapsulates changes to a list of groups.

Since:
3.5.0
Author:
tomyeh
See Also:
GroupsModel, GroupsDataListener

Field Summary
static int CONTENTS_CHANGED
          Identifies one or more changes in the contents of a particular group.
static int GROUPS_ADDED
          Identifies the addition of one or more contiguous items to the list.
static int GROUPS_CHANGED
          Identifies one or more changes in the groups contents.
static int GROUPS_REMOVED
          Identifies the removal of one or more contiguous items from the list.
static int GROUPS_RESET
          Identifies the Group is reset.
static int INTERVAL_ADDED
          Identifies the addition of one or more contiguous items to a particular group.
static int INTERVAL_REMOVED
          Identifies the removal of one or more contiguous items from a particular group.
static int MULTIPLE_CHANGED
          Identified the state of Selectable.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
GroupsDataEvent(GroupsModel model, int type, int groupIndex, int index0, int index1)
          Contructor.
 
Method Summary
 int getGroupIndex()
          Returns the index of the group.
 int getIndex0()
          Returns the lower index of the change range.
 int getIndex1()
          Returns the upper index of the change range.
 GroupsModel getModel()
          Returns the list model that fires this event.
 int getType()
          Returns the event type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTENTS_CHANGED

public static final int CONTENTS_CHANGED
Identifies one or more changes in the contents of a particular group. The indices (getIndex0() and getIndex1() ) are in the range of the particular group.

Note: getGroupIndex() must be non-negative.

See Also:
Constant Field Values

INTERVAL_ADDED

public static final int INTERVAL_ADDED
Identifies the addition of one or more contiguous items to a particular group. The indices (getIndex0() and getIndex1() ) are in the range of the particular group.

Note: getGroupIndex() must be non-negative.

See Also:
Constant Field Values

INTERVAL_REMOVED

public static final int INTERVAL_REMOVED
Identifies the removal of one or more contiguous items from a particular group. The indices (getIndex0() and getIndex1() ) are in the range of the particular group.

Note: getGroupIndex() must be non-negative.

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

GROUPS_CHANGED

public static final int GROUPS_CHANGED
Identifies one or more changes in the groups contents. The indices (getIndex0() and getIndex1() ) are the indices of groups. Note: getGroupIndex() is ignored.

See Also:
Constant Field Values

GROUPS_ADDED

public static final int GROUPS_ADDED
Identifies the addition of one or more contiguous items to the list. The indices (getIndex0() and getIndex1() ) are the indices of groups. Note: getGroupIndex() is ignored.

See Also:
Constant Field Values

GROUPS_REMOVED

public static final int GROUPS_REMOVED
Identifies the removal of one or more contiguous items from the list. The indices (getIndex0() and getIndex1() ) are the indices of groups. Note: getGroupIndex() is ignored.

See Also:
Constant Field Values

GROUPS_RESET

public static final int GROUPS_RESET
Identifies the Group is reset.

Since:
5.0.0
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 calling Selectable.getSelection(). Moreover, getIndex0() and getIndex1() are both meaningless.

Since:
6.0.0
See Also:
Constant Field Values

MULTIPLE_CHANGED

public static final int MULTIPLE_CHANGED
Identified the state of Selectable.isMultiple() is changed.

Since:
6.0.0
See Also:
Constant Field Values
Constructor Detail

GroupsDataEvent

public GroupsDataEvent(GroupsModel model,
                       int type,
                       int groupIndex,
                       int index0,
                       int index1)
Contructor.

Parameters:
type - one of CONTENTS_CHANGED, INTERVAL_ADDED, INTERVAL_REMOVED, GROUPS_CHANGED, GROUPS_ADDED, or GROUPS_REMOVED..
groupIndex - the index of the group being changed. It is used only if type is one of CONTENTS_CHANGED, INTERVAL_ADDED, or 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 GroupsModel getModel()
Returns the list model that fires this event.


getType

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


getGroupIndex

public int getGroupIndex()
Returns the index of the group. It is used only if getType() is one of CONTENTS_CHANGED, INTERVAL_ADDED, INTERVAL_REMOVED.


getIndex0

public int getIndex0()
Returns the lower index of the change range. For a single element/group, this value is the same as that returned by getIndex1().


getIndex1

public int getIndex1()
Returns the upper index of the change range. For a single element/group, this value is the same as that returned by getIndex0().


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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