|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
wt.clients.widgets.ListSelectorModel
This is the model for the listSelectorlist. This extends the AbstractListModel and provides features like setListData, add, remove, sorted data
Field Summary | |
protected Vector |
delegate
|
protected boolean |
listenersEnabled
|
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
ListSelectorModel()
Constructs a ListModel |
|
ListSelectorModel(Object[] list)
Constructs a ListModel and initializes its data |
Method Summary | |
void |
addElement(Object obj)
Adds the element into the list. |
int |
capacity()
Return the capacity of the vector |
void |
clear()
Removes all the elements |
boolean |
contains(Object elem)
Return true is the list already contains the element |
void |
copyInto(Object[] anArray)
Copy into an array |
Object |
elementAt(int index)
Return the element at the index |
Enumeration |
elements()
Enumeration of the elements in the list |
void |
ensureCapacity(int minCapacity)
Assign minimum capacity to the vector |
protected void |
fireContentsChanged(Object source,
int index0,
int index1)
Fire event when list contents are changed |
protected void |
fireIntervalAdded(Object source,
int index0,
int index1)
Fire event when an item is added to the list |
void |
fireIntervalRemoved(Object source,
int index0,
int index1)
fire event when an item is removed from the list |
Object |
firstElement()
Get the first element in the list |
Object |
get(int index)
Get the object at the index |
Vector |
getAllValues()
|
Object |
getElementAt(int index)
Return the element at the location |
protected boolean |
getListenersEnabled()
Return true if the listenersEnabled flag is enabled |
int |
getSize()
Get the size of the list |
int |
indexOf(Object elem)
Return the location of the element |
int |
indexOf(Object elem,
int index)
Return the locatin of the elment from a given index |
boolean |
isEmpty()
Return true if the list is empty |
Object |
lastElement()
Get the last element in the list |
int |
lastIndexOf(Object elem)
Return the last index of the element |
int |
lastIndexOf(Object elem,
int index)
|
Object |
remove(int index)
Remove the element at the given index |
void |
removeAllElements()
Remove all the elements in the list |
boolean |
removeElement(Object obj)
Remove element from the list |
void |
removeElementAt(int index)
Remove the element in the list at the index |
void |
removeRange(int fromIndex,
int toIndex)
Remove elements within a range |
void |
setListData(Object[] list)
Initialize the list with a set of data |
void |
setListData(Vector list)
Initialize the list with a set of data |
protected void |
setListenersEnabled(boolean enabled)
Set the listenersEnabled flag |
int |
size()
Return the size of the vector |
Object[] |
toArray()
toArray |
String |
toString()
toString |
void |
trimToSize()
Trim the vector to its size |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Vector delegate
protected boolean listenersEnabled
Constructor Detail |
public ListSelectorModel()
public ListSelectorModel(Object[] list)
list
- an array of objectsMethod Detail |
public void setListData(Vector list)
list
- a Vector of objectspublic void setListData(Object[] list)
list
- an array of Objectsprotected boolean getListenersEnabled()
protected void setListenersEnabled(boolean enabled)
enabled
- boolean that sets the listenersEnabled flagprotected void fireContentsChanged(Object source, int index0, int index1)
protected void fireIntervalAdded(Object source, int index0, int index1)
public void fireIntervalRemoved(Object source, int index0, int index1)
public int getSize()
public Object getElementAt(int index)
index
- the location in the list
public void copyInto(Object[] anArray)
anArray
- where the data is to be copied intopublic void trimToSize()
public void ensureCapacity(int minCapacity)
public int capacity()
public int size()
public boolean isEmpty()
public Enumeration elements()
public boolean contains(Object elem)
public int indexOf(Object elem)
public int indexOf(Object elem, int index)
public int lastIndexOf(Object elem)
public int lastIndexOf(Object elem, int index)
public Object elementAt(int index)
public Object firstElement()
public Object lastElement()
public void removeElementAt(int index)
index
- whose element is to be removedpublic void addElement(Object obj)
public boolean removeElement(Object obj)
public void removeAllElements()
public String toString()
public Object[] toArray()
public Object get(int index)
index
- whose element is to be returned
public Object remove(int index)
index
- from where the element is to be removed
public void clear()
public void removeRange(int fromIndex, int toIndex)
fromIndex
- toIndex
- public Vector getAllValues()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |