|
||||||||||
| 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(Object[] listData)
Constructs a CheckBoxListModel from an array of objects and then applies setModel to it. |
|
CheckBoxList.CheckBoxListModel(Vector listData)
Constructs a CheckBoxListModel from a Vector and then applies setModel to it. |
|
| Method Summary | |
|---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list. |
void |
addElement(Object obj)
Adds the specified component to the end of this list. |
boolean |
contains(Object elem)
Tests whether the specified object is a component in this list. |
void |
copyInto(Object[] anArray)
Copies the components of this list into the specified array. |
Object |
elementAt(int index)
Returns the component at the specified index. |
Object |
firstElement()
Returns the first component of this list. |
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 |
Object |
getElementAt(int index)
Returns the component at the specified index. |
int |
indexOf(Object elem)
Searches for the first occurrence of elem. |
int |
indexOf(Object elem,
int index)
Searches for the first occurrence of elem, beginning the search at index. |
void |
insertElementAt(Object obj,
int index)
Inserts the specified object as a component in this list at the specified index. |
Object |
lastElement()
Returns the last component of the list. |
int |
lastIndexOf(Object elem)
Returns the index of the last occurrence of elem. |
int |
lastIndexOf(Object elem,
int index)
Searches backwards for elem, starting from the specified index, and returns an index to it. |
Object |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
removeElement(Object obj)
Removes the first (lowest-indexed) occurrence of the argument from this list. |
Object |
set(int index,
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(Object obj,
int index)
Sets the component at the specified index of this list to be the specified object. |
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(Object[] listData)
listData - the data to usepublic CheckBoxList.CheckBoxListModel(Vector listData)
| Method Detail |
|---|
public void add(int index,
Object element)
add in class DefaultListModelindex - index at which the specified element is to be insertedelement - element to be insertedpublic void addElement(Object obj)
addElement in class DefaultListModelobj - the component to be addedpublic boolean contains(Object elem)
contains in class DefaultListModelelem - the element to check
public void copyInto(Object[] anArray)
copyInto in class DefaultListModelanArray - the array into which the components get copied
IndexOutOfBoundsException - if the array is not big enoughpublic Object elementAt(int index)
elementAt in class DefaultListModelindex - an index into this list
ArrayIndexOutOfBoundsExceptionpublic Object firstElement()
firstElement in class DefaultListModelNoSuchElementExceptionpublic Object get(int index)
get in class DefaultListModelindex - of element to return
ArrayIndexOutOfBoundsExceptionpublic Object getElementAt(int index)
getElementAt in interface ListModelgetElementAt in class DefaultListModelindex - an index into this list
ArrayIndexOutOfBoundsExceptionpublic int indexOf(Object elem)
indexOf in class DefaultListModelelem - an object
public int indexOf(Object elem,
int index)
indexOf in class DefaultListModelelem - the desired componentindex - the index from which to begin searching
public void insertElementAt(Object obj,
int index)
insertElementAt in class DefaultListModelobj - the component to insertindex - where to insert the new component
ArrayIndexOutOfBoundsExceptionpublic Object lastElement()
lastElement in class DefaultListModelNoSuchElementExceptionpublic int lastIndexOf(Object elem)
lastIndexOf in class DefaultListModelelem - the desired component
public int lastIndexOf(Object elem,
int index)
lastIndexOf in class DefaultListModelelem - the desired componentindex - the index to start searching from
public Object remove(int index)
remove in class DefaultListModelindex - the index of the element to removed
ArrayIndexOutOfBoundsExceptionpublic boolean removeElement(Object obj)
removeElement in class DefaultListModelobj - the component to be removed
public Object set(int index,
Object element)
set in class DefaultListModelindex - index of element to replaceelement - element to be stored at the specified position
ArrayIndexOutOfBoundsException
public void setElementAt(Object obj,
int index)
setElementAt in class DefaultListModelobj - what the component is to be set toindex - the specified index
ArrayIndexOutOfBoundsExceptionpublic Object[] toArray()
toArray in class DefaultListModelpublic 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 | |||||||||