|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
javax.swing.DefaultListModel
weka.gui.CheckBoxList.CheckBoxListModel
public class CheckBoxList.CheckBoxListModel
A specialized model.
Constructor Summary | |
---|---|
CheckBoxList.CheckBoxListModel()
initializes the model with no data. |
|
CheckBoxList.CheckBoxListModel(java.lang.Object[] listData)
Constructs a CheckBoxListModel from an array of objects and then applies setModel to it. |
|
CheckBoxList.CheckBoxListModel(java.util.Vector listData)
Constructs a CheckBoxListModel from a Vector and then applies setModel to it. |
Method Summary | |
---|---|
void |
add(int index,
java.lang.Object element)
Inserts the specified element at the specified position in this list. |
void |
addElement(java.lang.Object obj)
Adds the specified component to the end of this list. |
boolean |
contains(java.lang.Object elem)
Tests whether the specified object is a component in this list. |
void |
copyInto(java.lang.Object[] anArray)
Copies the components of this list into the specified array. |
java.lang.Object |
elementAt(int index)
Returns the component at the specified index. |
java.lang.Object |
firstElement()
Returns the first component of this list. |
java.lang.Object |
get(int index)
Returns the element at the specified position in this list. |
boolean |
getChecked(int index)
returns the checked state of the element at the given index |
java.lang.Object |
getElementAt(int index)
Returns the component at the specified index. |
int |
indexOf(java.lang.Object elem)
Searches for the first occurrence of elem. |
int |
indexOf(java.lang.Object elem,
int index)
Searches for the first occurrence of elem, beginning the search at index. |
void |
insertElementAt(java.lang.Object obj,
int index)
Inserts the specified object as a component in this list at the specified index. |
java.lang.Object |
lastElement()
Returns the last component of the list. |
int |
lastIndexOf(java.lang.Object elem)
Returns the index of the last occurrence of elem. |
int |
lastIndexOf(java.lang.Object elem,
int index)
Searches backwards for elem, starting from the specified index, and returns an index to it. |
java.lang.Object |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
removeElement(java.lang.Object obj)
Removes the first (lowest-indexed) occurrence of the argument from this list. |
java.lang.Object |
set(int index,
java.lang.Object element)
Replaces the element at the specified position in this list with the specified element. |
void |
setChecked(int index,
boolean checked)
sets the checked state of the element at the given index |
void |
setElementAt(java.lang.Object obj,
int index)
Sets the component at the specified index of this list to be the specified object. |
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this list in the correct order. |
Methods inherited from class javax.swing.DefaultListModel |
---|
capacity, clear, elements, ensureCapacity, getSize, isEmpty, removeAllElements, removeElementAt, removeRange, setSize, size, toString, trimToSize |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CheckBoxList.CheckBoxListModel()
public CheckBoxList.CheckBoxListModel(java.lang.Object[] listData)
listData
- the data to usepublic CheckBoxList.CheckBoxListModel(java.util.Vector listData)
Method Detail |
---|
public void add(int index, java.lang.Object element)
add
in class javax.swing.DefaultListModel
index
- index at which the specified element is to be insertedelement
- element to be insertedpublic void addElement(java.lang.Object obj)
addElement
in class javax.swing.DefaultListModel
obj
- the component to be addedpublic boolean contains(java.lang.Object elem)
contains
in class javax.swing.DefaultListModel
elem
- the element to check
public void copyInto(java.lang.Object[] anArray)
copyInto
in class javax.swing.DefaultListModel
anArray
- the array into which the components get copied
java.lang.IndexOutOfBoundsException
- if the array is not big enoughpublic java.lang.Object elementAt(int index)
elementAt
in class javax.swing.DefaultListModel
index
- an index into this list
java.lang.ArrayIndexOutOfBoundsException
public java.lang.Object firstElement()
firstElement
in class javax.swing.DefaultListModel
NoSuchElementException
public java.lang.Object get(int index)
get
in class javax.swing.DefaultListModel
index
- of element to return
java.lang.ArrayIndexOutOfBoundsException
public java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
getElementAt
in class javax.swing.DefaultListModel
index
- an index into this list
java.lang.ArrayIndexOutOfBoundsException
public int indexOf(java.lang.Object elem)
indexOf
in class javax.swing.DefaultListModel
elem
- an object
public int indexOf(java.lang.Object elem, int index)
indexOf
in class javax.swing.DefaultListModel
elem
- the desired componentindex
- the index from which to begin searching
public void insertElementAt(java.lang.Object obj, int index)
insertElementAt
in class javax.swing.DefaultListModel
obj
- the component to insertindex
- where to insert the new component
java.lang.ArrayIndexOutOfBoundsException
public java.lang.Object lastElement()
lastElement
in class javax.swing.DefaultListModel
NoSuchElementException
public int lastIndexOf(java.lang.Object elem)
lastIndexOf
in class javax.swing.DefaultListModel
elem
- the desired component
public int lastIndexOf(java.lang.Object elem, int index)
lastIndexOf
in class javax.swing.DefaultListModel
elem
- the desired componentindex
- the index to start searching from
public java.lang.Object remove(int index)
remove
in class javax.swing.DefaultListModel
index
- the index of the element to removed
java.lang.ArrayIndexOutOfBoundsException
public boolean removeElement(java.lang.Object obj)
removeElement
in class javax.swing.DefaultListModel
obj
- the component to be removed
public java.lang.Object set(int index, java.lang.Object element)
set
in class javax.swing.DefaultListModel
index
- index of element to replaceelement
- element to be stored at the specified position
java.lang.ArrayIndexOutOfBoundsException
public void setElementAt(java.lang.Object obj, int index)
setElementAt
in class javax.swing.DefaultListModel
obj
- what the component is to be set toindex
- the specified index
java.lang.ArrayIndexOutOfBoundsException
public java.lang.Object[] toArray()
toArray
in class javax.swing.DefaultListModel
public boolean getChecked(int index)
index
- the index of the element to return the checked state for
public void setChecked(int index, boolean checked)
index
- the index of the element to set the checked state forchecked
- the new checked state
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |