Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.swing
Class AbstractListModel

    java.lang.Object
      |
      +--javax.swing.AbstractListModel

Direct Known Subclasses:
  BasicDirectoryModel, DefaultComboBoxModel, DefaultListModel, MetalFileChooserUI.DirectoryComboBoxModel, MetalFileChooserUI.FilterComboBoxModel

public abstract class AbstractListModel
extends java.lang.Object
implements ListModel, java.io.Serializable

The Abstract definition for the data model the provides a List with its contents.

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 applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
  Serialized Form

Field Summary
`protected EventListenerList` | `listenerList`

Constructor Summary
`AbstractListModel()`

Method Summary
`void` | `addListDataListener(ListDataListener l)` Add a listener to the list that's notified each time a change to the data model occurs.
`protected void` | `fireContentsChanged(java.lang.Object source, int index0, int index1)` AbstractListModel subclasses must call this method after one or more elements of the list change.
`protected void` | `fireIntervalAdded(java.lang.Object source, int index0, int index1)` AbstractListModel subclasses must call this method after one or more elements are added to the model.
`protected void` | `fireIntervalRemoved(java.lang.Object source, int index0, int index1)` AbstractListModel subclasses must call this method after one or more elements are removed from the model.
`void` | `removeListDataListener(ListDataListener l)` Remove a listener from the list that's notified each time a change to the data model occurs.

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

Field Detail

### listenerList

    protected EventListenerList listenerList

Constructor Detail

### AbstractListModel

    public AbstractListModel()

Method Detail

### addListDataListener

    public void addListDataListener(ListDataListener l)

  Add a listener to the list that's notified each time a change to the data model occurs.
  Specified by:
    addListDataListener in interface ListModel
  Parameters:
    `l` - the ListDataListener

### removeListDataListener

    public void removeListDataListener(ListDataListener l)

  Remove a listener from the list that's notified each time a change to the data model occurs.
  Specified by:
    removeListDataListener in interface ListModel
  Parameters:
    `l` - the ListDataListener

### fireContentsChanged

    protected void fireContentsChanged(java.lang.Object source,
                                       int index0,
                                       int index1)

  AbstractListModel subclasses must call this method after one or more elements of the list change. The changed elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1. Note that index0 need not be less than or equal to index1.
  Parameters:
    `source` - The ListModel that changed, typically "this".
    `index0` - One end of the new interval.
    `index1` - The other end of the new interval.
  See Also:
    `EventListenerList`, `DefaultListModel`

### fireIntervalAdded

    protected void fireIntervalAdded(java.lang.Object source,
                                     int index0,
                                     int index1)

  AbstractListModel subclasses must call this method after one or more elements are added to the model. The new elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1. Note that index0 need not be less than or equal to index1.
  Parameters:
    `source` - The ListModel that changed, typically "this".
    `index0` - One end of the new interval.
    `index1` - The other end of the new interval.
  See Also:
    `EventListenerList`, `DefaultListModel`

### fireIntervalRemoved

    protected void fireIntervalRemoved(java.lang.Object source,
                                       int index0,
                                       int index1)

  AbstractListModel subclasses must call this method after one or more elements are removed from the model. The new elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1. Note that index0 need not be less than or equal to index1.
  Parameters:
    `source` - The ListModel that changed, typically "this".
    `index0` - One end of the new interval.
    `index1` - The other end of the new interval.
  See Also:
    `EventListenerList`, `DefaultListModel`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
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.