| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractListModel | +--com.gsoft.titration.client.StringListModel
A ListModel
for String
objects.
Field Summary | |
protected Vector | delegate Storage for the String data items. |
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
StringListModel() Constructs a empty StringListModel . |
Method Summary | |
void | add(int index, Object element) Inserts the given value into the list at the specified index. |
void | addElement(Object obj) Appends the value to the end of the list. |
int | capacity() Returns the current capacity of the Vector containing the list values. |
void | clear() Removes all values saved in the list. |
boolean | contains(Object elem) Returns true if the given element is one of the values in the list. |
void | copyInto(Object[] anArray) Copies the list values into the given array. |
Object | elementAt(int index) Gets the value at the specified list index. |
Enumeration | elements() Returns an Enumeration of all of the values in the list. |
void | ensureCapacity(int minCapacity) Ensures the Vector containing the list valueshas enough capacity for the specified number of elements. |
Vector | fetchItems() Grab a copy of the Vector containing all the items |
Object | firstElement() Returns the first value in the list. |
Object | get(int index) Gets a specific list value. |
Object | getElementAt(int index) Returns the String as the specified list position. |
String[] | getItems() Returns an array of the String items in the list. |
int | getSize() Returns the number of ( String ) items in the list. |
int | indexOf(Object elem) Determines the index of the the first occurance of the specified element. |
int | indexOf(Object elem, int index) Determines the index of the next occurance of the specified element, starting the search at the given index. |
void | insertElementAt(Object obj, int index) Inserts the a new value into the list at the specified index. |
boolean | isEmpty() Returns true if there are no list values present. |
Object | lastElement() Returns the last value in the list. |
int | lastIndexOf(Object elem) Determines the index of the last occurance of the specified element. |
int | lastIndexOf(Object elem, int index) Determines the index of the last occurance of the specified element, searching backwards starting at the given index. |
Object | remove(int index) Removes the value saved in the list at the specified index and returns it. |
void | removeAllElements() Removes all values from the list. |
boolean | removeElement(Object obj) Removes the specified value from the list. |
void | removeElementAt(int index) Removes the value saved in the list at the specified index. |
void | removeRange(int fromIndex, int toIndex) Removes a range of values from the list. |
Object | set(int index, Object element) Sets the list value at the specified index. |
void | setElementAt(Object obj, int index) Sets the value saved in the list at the specified index. |
void | setItems(String[] items) Sets the value of the list to the specified String items. |
void | setSize(int newSize) Sets the size Vector containing the list valuesto the specified size. |
int | size() Returns the current number of values in the Vector containing the list values. |
Object[] | toArray() Returns an array contains the list values. |
String | toString() Returns a String representation of the list. |
void | trimToSize() Shrinks the Vector containing the list values to theminimum required size. |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, removeListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners |
Methods inherited from class java.lang.Object |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize |
Field Detail |
protected Vector delegate
String
data items.Constructor Detail |
public StringListModel()
StringListModel
.Method Detail |
public void add(int index, Object element)
public void addElement(Object obj)
public int capacity()
Vector
containing the list values.public void clear()
public boolean contains(Object elem)
true
if the given element is one of the values in the list.public void copyInto(Object[] anArray)
public Object elementAt(int index)
public Enumeration elements()
Enumeration
of all of the values in the list.public void ensureCapacity(int minCapacity)
Vector
containing the list valuespublic Vector fetchItems()
public Object firstElement()
public Object get(int index)
public Object getElementAt(int index)
String
as the specified list position.public String[] getItems()
String
items in the list.public int getSize()
String
) items in the list.public int indexOf(Object elem)
public int indexOf(Object elem, int index)
public void insertElementAt(Object obj, int index)
public boolean isEmpty()
true
if there are no list values present.public Object lastElement()
public int lastIndexOf(Object elem)
public int lastIndexOf(Object elem, int index)
public Object remove(int index)
public void removeAllElements()
public boolean removeElement(Object obj)
public void removeElementAt(int index)
public void removeRange(int fromIndex, int toIndex)
public Object set(int index, Object element)
public void setElementAt(Object obj, int index)
public void setItems(String[] items)
String
items.public void setSize(int newSize)
Vector
containing the list valuespublic int size()
Vector
containing the list values.public Object[] toArray()
public String toString()
String
representation of the list.public void trimToSize()
Vector
containing the list values to the
| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |