|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractListModel com.alee.laf.list.WebListModel<CheckBoxCellData> com.alee.extended.list.CheckBoxListModel
public class CheckBoxListModel
Custom list model for checkbox list component. This class overrides a few default model methods to avoid casting to checkbox cell data object. There are also methods to add new elements and change/retrieve checkbox selection state.
Field Summary |
---|
Fields inherited from class com.alee.laf.list.WebListModel |
---|
delegate |
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
CheckBoxListModel()
Constructs checkbox list model. |
Method Summary | |
---|---|
void |
addCheckBoxElement(java.lang.Object userObject)
Adds new checkbox cell data with a specified user object into list model. |
void |
addCheckBoxElement(java.lang.Object userObject,
boolean selected)
Adds new checkbox cell data with a specified user object and checkbox selection state into list model. |
void |
addCheckBoxElementAt(int index,
java.lang.Object userObject)
Adds new checkbox cell data with a specified user object into list model at the specified index. |
void |
addCheckBoxElementAt(int index,
java.lang.Object userObject,
boolean selected)
Adds new checkbox cell data with a specified user object and checkbox selection state into list model at the specified index. |
java.util.List<java.lang.Object> |
getCheckedValues()
Returns list of values from checked cells. |
void |
invertCheckBoxSelection(int index)
Inverts checkbox selection at the specified cell index. |
boolean |
isCheckBoxSelected(int index)
Returns whether checkbox under the specified cell index is selected or not. |
boolean |
setCheckBoxSelected(int index,
boolean selected)
Sets whether checkbox at the specified cell index is selected or not and returns whether selection has changed or not. |
Methods inherited from class com.alee.laf.list.WebListModel |
---|
add, add, addElement, addElements, addElements, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getElements, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAllAfter, removeAllBefore, removeAllElements, removeElement, removeElementAt, removeElements, removeElements, removeRange, set, setElementAt, setElements, setSize, size, toArray, toString, trimToSize, update |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CheckBoxListModel()
Method Detail |
---|
public void addCheckBoxElement(java.lang.Object userObject)
userObject
- user objectpublic void addCheckBoxElement(java.lang.Object userObject, boolean selected)
userObject
- user objectselected
- whether checkbox selected or notpublic void addCheckBoxElementAt(int index, java.lang.Object userObject)
index
- new cell indexuserObject
- user objectpublic void addCheckBoxElementAt(int index, java.lang.Object userObject, boolean selected)
index
- new cell indexuserObject
- user objectselected
- whether checkbox selected or notpublic boolean isCheckBoxSelected(int index)
index
- cell index
public java.util.List<java.lang.Object> getCheckedValues()
public void invertCheckBoxSelection(int index)
index
- cell indexpublic boolean setCheckBoxSelected(int index, boolean selected)
index
- cell indexselected
- whether checkbox is selected or not
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |