Package jaxx.runtime.swing.list
Class CheckList<T>
java.lang.Object
jaxx.runtime.swing.list.CheckList<T>
- Type Parameters:
T- list item type
- Direct Known Subclasses:
FilterableCheckList
public class CheckList<T>
extends java.lang.Object
The decorator for JList which makes it work like check list
UI can be designed using JList and which can be later decorated to become a check list
- Author:
- Eugene Ryzhikov, Kevin Morin
-
Constructor Summary
Constructors Constructor Description CheckList()Wraps the standard JList and makes it work like check list -
Method Summary
Modifier and Type Method Description java.util.Collection<T>getCheckedItems()Returns a collection of checked items.javax.swing.JListgetList()CheckListModel<T>getModel()voidsetCheckedItems(java.util.Collection<T> elements)Resets checked elementsvoidsetData(java.util.Collection<T> data)Sets data to a check list.voidsetModel(CheckListModel<T> model)Sets the model for check list.voidtoggleIndex(int index)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CheckList
public CheckList()Wraps the standard JList and makes it work like check list
-
-
Method Details
-
getList
public javax.swing.JList getList() -
setData
Sets data to a check list. Simplification for setting new the model- Parameters:
data-
-
setModel
Sets the model for check list.- Parameters:
model-
-
getModel
-
getCheckedItems
Returns a collection of checked items.- Returns:
- collection of checked items. Empty collection if nothing is selected
-
setCheckedItems
Resets checked elements- Parameters:
elements-
-
toggleIndex
public void toggleIndex(int index)
-