Class SoundingObListModel

java.lang.Object
javax.swing.AbstractListModel
ucar.unidata.view.sounding.SoundingObListModel
All Implemented Interfaces:
Serializable, ListModel

public class SoundingObListModel extends AbstractListModel
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:
  • Constructor Details

    • SoundingObListModel

      public SoundingObListModel()
      Constructs from nothing.
  • Method Details

    • addSounding

      public void addSounding(SoundingOb sounding)
      Adds a sounding observation to the list. Notifies ListDataListener-s.
      Parameters:
      sounding - The sounding observation to be added to the list.
    • removeSounding

      public void removeSounding(SoundingOb sounding)
      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

      public Object getElementAt(int index)
      Returns the sounding at the given index.
      Parameters:
      index - The index of the sounding.
      Returns:
      The sounding at the given index. Will be null if there's no such sounding.
    • getSize

      public int getSize()
      Returns the number of soundings.
      Returns:
      The number of soundings.