Overview | Package | Class | Tree | Deprecated | Index | Help Java Platform
1.1.7
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

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

Fields inherited from class com.sun.java.swing.AbstractListModel
listenerList
 
Method Summary
void add(int index, java.lang.Object element)
           
void addElement(java.lang.Object obj)
           
int capacity()
           
void clear()
           
boolean contains(java.lang.Object elem)
           
void copyInto(java.lang.Object[] anArray)
           
java.lang.Object elementAt(int index)
           
java.util.Enumeration elements()
           
void ensureCapacity(int minCapacity)
           
java.lang.Object firstElement()
           
java.lang.Object get(int index)
           
java.lang.Object getElementAt(int index)
           
int getSize()
           
int indexOf(java.lang.Object elem)
           
int indexOf(java.lang.Object elem, int index)
           
void insertElementAt(java.lang.Object obj, int index)
           
boolean isEmpty()
           
java.lang.Object lastElement()
           
int lastIndexOf(java.lang.Object elem)
           
int lastIndexOf(java.lang.Object elem, int index)
           
void removeAllElements()
           
java.lang.Object remove(int index)
           
void removeElementAt(int index)
           
boolean removeElement(java.lang.Object obj)
           
void removeRange(int fromIndex, int toIndex)
           
java.lang.Object set(int index, java.lang.Object element)
           
void setElementAt(java.lang.Object obj, int index)
           
void setSize(int newSize)
           
int size()
           
java.lang.Object[] toArray()
           
java.lang.String toString()
           
void trimToSize()
           
 
Methods inherited from class com.sun.java.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Method Detail

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)

Overview | Package | Class | Tree | Deprecated | Index | Help Java Platform
1.1.7
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

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.