Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## charvax.swing
Class DefaultListModel

    java.lang.Object
      charvax.swing.AbstractListModel
          charvax.swing.DefaultListModel

All Implemented Interfaces:
  ListModel

public class DefaultListModel
extends AbstractListModel
implements ListModel

This class implements the Vector API. It actually delegates to an ArrayList.

Field Summary

Fields inherited from class charvax.swing.AbstractListModel
`_listeners`

Constructor Summary
`DefaultListModel()` Default constructor

Method Summary
`void` | `add(int index_, java.lang.Object elem_)` Inserts the specified object at the specified position in this list.
`void` | `addElement(java.lang.Object obj_)` Add the specified object to the end of the list.
`void` | `clear()` Clear the contents of the list.
`boolean` | `contains(java.lang.Object elem_)` Returns true if the specified element is in the list.
`java.lang.Object` | `getElementAt(int index_)` Returns the value at the specified index.
`int` | `getSize()` Returns the length of the list.
`int` | `indexOf(java.lang.Object elem_)` Returns the index of the first occurrence of the specified object.
`void` | `removeAllElements()` Removes all elements from this list and sets its size to zero.
`void` | `removeElementAt(int index_)` Deletes the component at the specified index.

Methods inherited from class charvax.swing.AbstractListModel
`addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, removeListDataListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface charvax.swing.ListModel
`addListDataListener, removeListDataListener`

Constructor Detail

### DefaultListModel

    public DefaultListModel()

  Default constructor

Method Detail

### getElementAt

    public java.lang.Object getElementAt(int index_)

  Returns the value at the specified index.

  Specified by:
    `getElementAt` in interface `ListModel`

### getSize

    public int getSize()

  Returns the length of the list.

  Specified by:
    `getSize` in interface `ListModel`

### clear

    public void clear()

  Clear the contents of the list.

### contains

    public boolean contains(java.lang.Object elem_)

  Returns true if the specified element is in the list.

### add

    public void add(int index_,
                    java.lang.Object elem_)

  Inserts the specified object at the specified position in this list.

### addElement

    public void addElement(java.lang.Object obj_)

  Add the specified object to the end of the list.

### removeElementAt

    public void removeElementAt(int index_)

  Deletes the component at the specified index.

### removeAllElements

    public void removeAllElements()

  Removes all elements from this list and sets its size to zero.

### indexOf

    public int indexOf(java.lang.Object elem_)

  Returns the index of the first occurrence of the specified object.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD