Package jaxx.runtime.swing.list
Class ActionCheckListModel<T>
- java.lang.Object
-
- jaxx.runtime.swing.list.ActionCheckListModel<T>
-
- All Implemented Interfaces:
ListModel,CheckListModel<T>
- Direct Known Subclasses:
FilterableActionCheckListModel
public class ActionCheckListModel<T> extends Object implements CheckListModel<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected CheckListAction<T>actionCheckAllprotected List<CheckListAction<T>>actionItemsprotected Set<CheckListAction<T>>checksprotected List<ListDataListener>listenersprotected CheckListModel<T>originalModel
-
Constructor Summary
Constructors Constructor Description ActionCheckListModel(CheckListModel<T> originalModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListDataListener(ListDataListener l)Collection<T>getCheckedItems()Returns a collections of checked itemsObjectgetElementAt(int index)intgetOriginalSize()Returns the number of items before the filter was appliedintgetSize()booleanisCheckedIndex(int index)Returns the check state of the element at specified positionvoidremoveListDataListener(ListDataListener l)voidsetCheckedIndex(int index, boolean value)Sets the check state of the element at specified positionvoidsetCheckedItems(Collection<T> items)Sets checked items
-
-
-
Field Detail
-
listeners
protected final List<ListDataListener> listeners
-
originalModel
protected final CheckListModel<T> originalModel
-
actionCheckAll
protected final CheckListAction<T> actionCheckAll
-
actionItems
protected final List<CheckListAction<T>> actionItems
-
checks
protected final Set<CheckListAction<T>> checks
-
-
Constructor Detail
-
ActionCheckListModel
public ActionCheckListModel(CheckListModel<T> originalModel)
-
-
Method Detail
-
getOriginalSize
public int getOriginalSize()
Description copied from interface:CheckListModelReturns the number of items before the filter was applied- Specified by:
getOriginalSizein interfaceCheckListModel<T>- Returns:
-
getElementAt
public Object getElementAt(int index)
- Specified by:
getElementAtin interfaceListModel<T>
-
addListDataListener
public void addListDataListener(ListDataListener l)
- Specified by:
addListDataListenerin interfaceListModel<T>
-
removeListDataListener
public void removeListDataListener(ListDataListener l)
- Specified by:
removeListDataListenerin interfaceListModel<T>
-
isCheckedIndex
public boolean isCheckedIndex(int index)
Description copied from interface:CheckListModelReturns the check state of the element at specified position- Specified by:
isCheckedIndexin interfaceCheckListModel<T>- Parameters:
index- element index- Returns:
- true if element at specified position is checked
-
setCheckedIndex
public void setCheckedIndex(int index, boolean value)Description copied from interface:CheckListModelSets the check state of the element at specified position- Specified by:
setCheckedIndexin interfaceCheckListModel<T>- Parameters:
index- element index
-
getCheckedItems
public Collection<T> getCheckedItems()
Description copied from interface:CheckListModelReturns a collections of checked items- Specified by:
getCheckedItemsin interfaceCheckListModel<T>- Returns:
-
setCheckedItems
public void setCheckedItems(Collection<T> items)
Description copied from interface:CheckListModelSets checked items- Specified by:
setCheckedItemsin interfaceCheckListModel<T>
-
-