|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GroupsModel<D,H,F>
The interface defines a suitable data model for grouping Listbox
and Grid
.
H: the class representing a group header, F: the class representing a group footer, and D: the class representing each item of data (in a group).
If the data model is used with sortable listbox or grid,
the developer must also implement GroupsSortableModel
.
For more information, please refer to ZK Developer's Reference: Groups Model
GroupsSortableModel
,
ListModel
Method Summary | |
---|---|
void |
addGroupsDataListener(GroupsDataListener l)
Adds a listener to the groups that's notified each time a change to the data model occurs. |
boolean |
addOpenGroup(int groupIndex)
Opens the group at the specified index. |
D |
getChild(int groupIndex,
int index)
Returns the child value of the specified group at the specified index. |
int |
getChildCount(int groupIndex)
Returns the number of children of the specified group. |
H |
getGroup(int groupIndex)
Returns the group value at the specified index. |
int |
getGroupCount()
Returns the number of groups. |
F |
getGroupfoot(int groupIndex)
Returns the foot value of the specified group, or null if the specified group does not have any foot. |
boolean |
hasGroupfoot(int groupIndex)
Returns if the specified group has a foot value. |
boolean |
isGroupOpened(int groupIndex)
Whether the group is open at the specified index. |
void |
removeGroupsDataListener(GroupsDataListener l)
Removes a listener from the groups that's notified each time a change to the data model occurs. |
boolean |
removeOpenGroup(int groupIndex)
Closes the group at the specified index. |
Method Detail |
---|
H getGroup(int groupIndex)
Group
and Listgroup
.
groupIndex
- the index of the group.int getGroupCount()
D getChild(int groupIndex, int index)
groupIndex
- the index of the group.index
- the index of the element in the group.int getChildCount(int groupIndex)
Note: it does not include the groot foot (getGroupfoot(int)
).
groupIndex
- the index of the group.F getGroupfoot(int groupIndex)
Groupfoot
and Listgroupfoot
.
Note: it is ignored if hasGroupfoot(int)
returns false.
groupIndex
- the index of the group.boolean hasGroupfoot(int groupIndex)
groupIndex
- the index of the group.void addGroupsDataListener(GroupsDataListener l)
void removeGroupsDataListener(GroupsDataListener l)
boolean isGroupOpened(int groupIndex)
Group
and Listgroup
.
Default: true
groupIndex
- the index of the group.boolean addOpenGroup(int groupIndex)
groupIndex
- the index of the group.
boolean removeOpenGroup(int groupIndex)
groupIndex
- the index of the group.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |