Class com.sun.java.swing.DefaultListModel
java.lang.Object
|
+--com.sun.java.swing.AbstractListModel
|
+--com.sun.java.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.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
getSize
public int getSize()
getElementAt
public java.lang.Object getElementAt(int index)
copyInto
public void copyInto(java.lang.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 java.util.Enumeration elements()
contains
public boolean contains(java.lang.Object elem)
indexOf
public int indexOf(java.lang.Object elem)
indexOf
public int indexOf(java.lang.Object elem,
int index)
lastIndexOf
public int lastIndexOf(java.lang.Object elem)
lastIndexOf
public int lastIndexOf(java.lang.Object elem,
int index)
elementAt
public java.lang.Object elementAt(int index)
firstElement
public java.lang.Object firstElement()
lastElement
public java.lang.Object lastElement()
setElementAt
public void setElementAt(java.lang.Object obj,
int index)
removeElementAt
public void removeElementAt(int index)
insertElementAt
public void insertElementAt(java.lang.Object obj,
int index)
addElement
public void addElement(java.lang.Object obj)
removeElement
public boolean removeElement(java.lang.Object obj)
removeAllElements
public void removeAllElements()
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
toArray
public java.lang.Object[] toArray()
get
public java.lang.Object get(int index)
set
public java.lang.Object set(int index,
java.lang.Object element)
add
public void add(int index,
java.lang.Object element)
remove
public java.lang.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 javadoc
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.