Package ucar.unidata.view.sounding
Class SoundingObListModel
java.lang.Object
javax.swing.AbstractListModel
ucar.unidata.view.sounding.SoundingObListModel
- All Implemented Interfaces:
Serializable,ListModel
Provides support for adapting a list of sounding observations to the
ListModel interface.
- Version:
- $Id: SoundingObListModel.java,v 1.10 2005/05/13 18:33:38 jeffmc Exp $
- Author:
- Steven R. Emmerson
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSounding(SoundingOb sounding) Adds a sounding observation to the list.voidClears all sounding observations from the list.getElementAt(int index) Returns the sounding at the given index.intgetSize()Returns the number of soundings.voidremoveSounding(int index) Removes a sounding observation from the list.voidremoveSounding(SoundingOb sounding) Removes a sounding observation from the list.Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Constructor Details
-
SoundingObListModel
public SoundingObListModel()Constructs from nothing.
-
-
Method Details
-
addSounding
Adds a sounding observation to the list. Notifies ListDataListener-s.- Parameters:
sounding- The sounding observation to be added to the list.
-
removeSounding
Removes a sounding observation from the list. Notifies ListDataListener-s.- Parameters:
sounding- The sounding observation to be removed from the list.
-
removeSounding
public void removeSounding(int index) Removes a sounding observation from the list. Notifies ListDataListener-s.- Parameters:
index- The index of the sounding observation to be removed from the list.
-
clearSoundings
public void clearSoundings()Clears all sounding observations from the list. Notifies ListDataListener-s. -
getElementAt
Returns the sounding at the given index.- Parameters:
index- The index of the sounding.- Returns:
- The sounding at the given index. Will be
nullif there's no such sounding.
-
getSize
public int getSize()Returns the number of soundings.- Returns:
- The number of soundings.
-