程序包 weka.gui

类 CheckBoxList

所有已实现的接口:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class CheckBoxList extends JList
An extended JList that contains CheckBoxes. If necessary a CheckBoxListItem wrapper is added around the displayed object in any of the Model methods, e.g., addElement. For methods returning objects the opposite takes place, the wrapper is removed and only the payload object is returned.
版本:
$Revision: 7059 $
作者:
fracpete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 构造器详细资料

    • CheckBoxList

      public CheckBoxList()
      initializes the list with an empty CheckBoxListModel
    • CheckBoxList

      public CheckBoxList(CheckBoxList.CheckBoxListModel model)
      initializes the list with the given CheckBoxListModel
      参数:
      model - the model to initialize with
  • 方法详细资料

    • setModel

      public void setModel(ListModel model)
      sets the model - must be an instance of CheckBoxListModel
      覆盖:
      setModel 在类中 JList
      参数:
      model - the model to use
      抛出:
      IllegalArgumentException - if the model is not an instance of CheckBoxListModel
      另请参阅:
    • setListData

      public void setListData(Object[] listData)
      Constructs a CheckBoxListModel from an array of objects and then applies setModel to it.
      覆盖:
      setListData 在类中 JList
      参数:
      listData - the data to use
    • setListData

      public void setListData(Vector listData)
      Constructs a CheckBoxListModel from a Vector and then applies setModel to it.
      覆盖:
      setListData 在类中 JList
    • getChecked

      public boolean getChecked(int index)
      returns the checked state of the element at the given index
      参数:
      index - the index of the element to return the checked state for
      返回:
      the checked state of the specifed element
    • setChecked

      public void setChecked(int index, boolean checked)
      sets the checked state of the element at the given index
      参数:
      index - the index of the element to set the checked state for
      checked - the new checked state
    • getCheckedIndices

      public int[] getCheckedIndices()
      returns an array with the indices of all checked items
      返回:
      the indices of all items that are currently checked