Class ActionCheckListModel<T>

java.lang.Object
jaxx.runtime.swing.list.ActionCheckListModel<T>
All Implemented Interfaces:
javax.swing.ListModel, CheckListModel<T>
Direct Known Subclasses:
FilterableActionCheckListModel

public class ActionCheckListModel<T>
extends java.lang.Object
implements CheckListModel<T>
  • Field Details

    • listeners

      protected final java.util.List<javax.swing.event.ListDataListener> listeners
    • originalModel

      protected final CheckListModel<T> originalModel
    • actionCheckAll

      protected final CheckListAction<T> actionCheckAll
    • actionItems

      protected final java.util.List<CheckListAction<T>> actionItems
    • checks

      protected final java.util.Set<CheckListAction<T>> checks
  • Constructor Details

    • ActionCheckListModel

      public ActionCheckListModel​(CheckListModel<T> originalModel)
  • Method Details

    • getSize

      public int getSize()
      Specified by:
      getSize in interface javax.swing.ListModel<T>
    • getOriginalSize

      public int getOriginalSize()
      Description copied from interface: CheckListModel
      Returns the number of items before the filter was applied
      Specified by:
      getOriginalSize in interface CheckListModel<T>
      Returns:
    • getElementAt

      public java.lang.Object getElementAt​(int index)
      Specified by:
      getElementAt in interface javax.swing.ListModel<T>
    • addListDataListener

      public void addListDataListener​(javax.swing.event.ListDataListener l)
      Specified by:
      addListDataListener in interface javax.swing.ListModel<T>
    • removeListDataListener

      public void removeListDataListener​(javax.swing.event.ListDataListener l)
      Specified by:
      removeListDataListener in interface javax.swing.ListModel<T>
    • isCheckedIndex

      public boolean isCheckedIndex​(int index)
      Description copied from interface: CheckListModel
      Returns the check state of the element at specified position
      Specified by:
      isCheckedIndex in interface CheckListModel<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: CheckListModel
      Sets the check state of the element at specified position
      Specified by:
      setCheckedIndex in interface CheckListModel<T>
      Parameters:
      index - element index
    • getCheckedItems

      public java.util.Collection<T> getCheckedItems()
      Description copied from interface: CheckListModel
      Returns a collections of checked items
      Specified by:
      getCheckedItems in interface CheckListModel<T>
      Returns:
    • setCheckedItems

      public void setCheckedItems​(java.util.Collection<T> items)
      Description copied from interface: CheckListModel
      Sets checked items
      Specified by:
      setCheckedItems in interface CheckListModel<T>