Class java.awt.swing.DefaultListModel
java.lang.Object
|
+----java.awt.swing.AbstractListModel
|
+----java.awt.swing.DefaultListModel
- public class DefaultListModel
- extends AbstractListModel
This class implements the java.util.Vector API and notifies
the JListDataModel listeners when changes occur. Presently
it delegates to a Vector, in a future release it will be
a real Collection implementation.
Warning: serialized objects of this class will not be compatible with
future swing releases. The current serialization support is appropriate
for short term storage or RMI between Swing1.0 applications. It will
not be possible to load serialized Swing1.0 objects with future releases
of Swing. The JDK1.2 release of Swing will be the compatibility
baseline for the serialized form of Swing objects.
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getSize
public int getSize()
getElementAt
public Object getElementAt(int index)
copyInto
public void copyInto(Object[] anArray)
trimToSize
public void trimToSize()
ensureCapacity
public void ensureCapacity(int minCapacity)
setSize
public void setSize(int newSize)
capacity
public int capacity()
size
public int size()
isEmpty
public boolean isEmpty()
elements
public Enumeration elements()
contains
public boolean contains(Object elem)
indexOf
public int indexOf(Object elem)
indexOf
public int indexOf(Object elem,
int index)
lastIndexOf
public int lastIndexOf(Object elem)
lastIndexOf
public int lastIndexOf(Object elem,
int index)
elementAt
public Object elementAt(int index)
firstElement
public Object firstElement()
lastElement
public Object lastElement()
setElementAt
public void setElementAt(Object obj,
int index)
removeElementAt
public void removeElementAt(int index)
insertElementAt
public void insertElementAt(Object obj,
int index)
addElement
public void addElement(Object obj)
removeElement
public boolean removeElement(Object obj)
removeAllElements
public void removeAllElements()
toString
public String toString()
- Overrides:
- toString in class Object
toArray
public Object[] toArray()
get
public Object get(int index)
set
public Object set(int index,
Object element)
add
public void add(int index,
Object element)
remove
public Object remove(int index)
clear
public void clear()
removeRange
public void removeRange(int fromIndex,
int toIndex)
Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.