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.JList getList()  
    CheckListModel<T> getModel()  
    void setCheckedItems​(java.util.Collection<T> elements)
    Resets checked elements
    void setData​(java.util.Collection<T> data)
    Sets data to a check list.
    void setModel​(CheckListModel<T> model)
    Sets the model for check list.
    void toggleIndex​(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

      public void setData​(java.util.Collection<T> data)
      Sets data to a check list. Simplification for setting new the model
      Parameters:
      data -
    • setModel

      public void setModel​(CheckListModel<T> model)
      Sets the model for check list.
      Parameters:
      model -
    • getModel

      public CheckListModel<T> getModel()
    • getCheckedItems

      public java.util.Collection<T> getCheckedItems()
      Returns a collection of checked items.
      Returns:
      collection of checked items. Empty collection if nothing is selected
    • setCheckedItems

      public void setCheckedItems​(java.util.Collection<T> elements)
      Resets checked elements
      Parameters:
      elements -
    • toggleIndex

      public void toggleIndex​(int index)