|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zul.AbstractListModel<java.lang.Object>
org.zkoss.zul.impl.GroupsListModel<D,G,F>
public class GroupsListModel<D,G,F>
Encapsulates GroupsModel as an instance of ListModel
such that it is easier to handle by Listbox and
Group.
| Nested Class Summary | |
|---|---|
static class |
GroupsListModel.GroupDataInfo
The group information returned by getDataInfo(int). |
| Field Summary | |
|---|---|
protected GroupsModel<D,G,F> |
_model
|
| Fields inherited from class org.zkoss.zul.AbstractListModel |
|---|
_selection |
| Constructor Summary | |
|---|---|
protected |
GroupsListModel(GroupsModel<D,G,F> model)
|
| Method Summary | ||
|---|---|---|
void |
addSelection(java.lang.Object obj)
Deprecated. As of release 6.0.0, replaced with addToSelection(java.lang.Object). |
|
boolean |
addToSelection(java.lang.Object obj)
Add the specified object into selection. |
|
void |
clearSelection()
Change the selection to the empty set. |
|
java.lang.Object |
clone()
|
|
boolean |
equals(java.lang.Object o)
|
|
GroupingInfo |
getDataInfo(int index)
Returns the group info of given index |
|
java.lang.Object |
getElementAt(int index)
Returns the value at the specified index. |
|
int |
getGroupOffset(int groupIndex)
Returns the offset from 0 that a group in this ListModel. |
|
java.util.List<int[]> |
getGroupsInfos()
|
|
GroupsModel<D,G,F> |
getGroupsModel()
|
|
java.util.Set<java.lang.Object> |
getSelection()
Returns the current selection. |
|
int |
getSize()
Returns the length of the list. |
|
int |
hashCode()
|
|
boolean |
isMultiple()
Returns whether the current selection mode is multiple. |
|
boolean |
isSelected(java.lang.Object obj)
Returns whether an object is selected. |
|
boolean |
isSelectionEmpty()
Returns true if the selection is currently empty. |
|
boolean |
removeFromSelection(java.lang.Object obj)
Remove the specified object from selection. |
|
void |
removeSelection(java.lang.Object obj)
Deprecated. As of release 6.0.0, replaced with removeFromSelection(java.lang.Object). |
|
void |
setMultiple(boolean multiple)
Sets the selection mode to be multiple. |
|
void |
setSelection(java.util.Collection<?> selection)
Replace the current selection with the given set. |
|
static
|
toListModel(GroupsModel<D,G,F> model)
Returns the list model ( ListModel) representing the given
groups model. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class org.zkoss.zul.AbstractListModel |
|---|
addListDataListener, fireEvent, fireSelectionEvent, newEmptySelection, readSelection, removeAllSelection, removeListDataListener, retainAllSelection, writeSelection |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected GroupsModel<D,G,F> _model
| Constructor Detail |
|---|
protected GroupsListModel(GroupsModel<D,G,F> model)
| Method Detail |
|---|
public static <D,G,F> GroupsListModel<D,G,F> toListModel(GroupsModel<D,G,F> model)
ListModel) representing the given
groups model.
public java.util.List<int[]> getGroupsInfos()
public int getGroupOffset(int groupIndex)
For example, _gpofs[2] is the offset of group 2 (the third group) in this ListModel.
groupIndex - the group index
public GroupsModel<D,G,F> getGroupsModel()
public GroupingInfo getDataInfo(int index)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void addSelection(java.lang.Object obj)
addToSelection(java.lang.Object).
public void removeSelection(java.lang.Object obj)
removeFromSelection(java.lang.Object).
public java.lang.Object getElementAt(int index)
ListModel
public int getSize()
ListModel
public java.util.Set<java.lang.Object> getSelection()
AbstractListModel
getSelection in interface Selectable<java.lang.Object>getSelection in class AbstractListModel<java.lang.Object>public void setSelection(java.util.Collection<?> selection)
If this represents a change to the current selection then notify each ListDataListener, including UI.
setSelection in interface Selectable<java.lang.Object>setSelection in class AbstractListModel<java.lang.Object>public boolean isSelected(java.lang.Object obj)
isSelected in interface Selectable<java.lang.Object>isSelected in class AbstractListModel<java.lang.Object>public boolean isSelectionEmpty()
isSelectionEmpty in interface Selectable<java.lang.Object>isSelectionEmpty in class AbstractListModel<java.lang.Object>public boolean addToSelection(java.lang.Object obj)
If this represents a change to the current selection then notify each ListDataListener, including UI.
addToSelection in interface Selectable<java.lang.Object>addToSelection in class AbstractListModel<java.lang.Object>obj - the object to be as selection.
obj
is not part of the data, or was already selected.public boolean removeFromSelection(java.lang.Object obj)
If this represents a change to the current selection then notify each ListDataListener, including UI.
removeFromSelection in interface Selectable<java.lang.Object>removeFromSelection in class AbstractListModel<java.lang.Object>obj - the object to be remove from selection.
public void clearSelection()
If this represents a change to the current selection then notify each ListDataListener, including UI.
clearSelection in interface Selectable<java.lang.Object>clearSelection in class AbstractListModel<java.lang.Object>public boolean isMultiple()
isMultiple in interface Selectable<java.lang.Object>isMultiple in class AbstractListModel<java.lang.Object>Selectable.setMultiple(boolean)public void setMultiple(boolean multiple)
setMultiple in interface Selectable<java.lang.Object>setMultiple in class AbstractListModel<java.lang.Object>public java.lang.Object clone()
clone in class AbstractListModel<java.lang.Object>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||