|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.view.sounding.DataModelImpl
public class DataModelImpl
Provides support for adapting a JList of sounding observations to the API-s of the sounding and wind data models. The conceptual model that this class presents is that of a set of soundings -- a subset of which are the SELECTED SOUNDINGS -- and of which at most one sounding is the SELECTED SOUNDING. The soundings that constitute the set may change -- as may the selected soundings and the selected sounding. Modifications to the soundings by users of this class will appear to actually modify the soundings in the set.
| Field Summary | |
|---|---|
static String |
SELECTED_INDEX
The name of the index-of-the-selected-thing property. |
static String |
SELECTED_INDEX
The name of the index-of-the-selected-thing property. |
| Constructor Summary | |
|---|---|
DataModelImpl(JList jList)
Constructs from a JList. |
|
| Method Summary | |
|---|---|
void |
addListDataListener(ListDataListener listener)
Adds a listener for changes to the underlying list of things. |
void |
addListSelectionListener(ListSelectionListener listener)
Adds a listener for changes to the selected things. |
void |
addPropertyChangeListener(String name,
PropertyChangeListener listener)
Adds a PropertyChangeListener for a named property. |
protected static FlatField |
ensureCartesianWindProfile(FlatField input)
Ensures that a wind profile is in cartesian coordinates. |
Field |
getDewPointProfile(int index)
Returns the dew-point profile at the given index. |
Tuple |
getMeanWind(int index)
Returns the mean-wind at the given index. |
protected MeanWindCell |
getMeanWindCell(int index)
Returns the mean-wind cell at the given index. |
DataReference |
getMeanWindRef(int index)
Returns the data reference for the mean-wind at the given index. |
protected RAOB |
getRAOB(int index)
Returns the RAOB at the given index. |
int |
getSelectedIndex()
Returns the index of the selected sounding. |
int |
getSize()
Returns the number of soundings. |
Field[] |
getSounding(int index)
Returns the aerological sounding data at the given index. |
Field |
getTemperatureProfile(int index)
Returns the temperature profile at the given index. |
Object[] |
getWindData(int index)
Returns the wind profile and mean-wind at the given index. |
Field |
getWindProfile(int index)
Returns the wind profile at the given index. |
boolean |
isSelectedIndex(int index)
Indicates if the given sounding is a member of the selected soundings. |
void |
removeListDataListener(ListDataListener listener)
Removes a listener for changes to the underlying list of things. |
void |
removeListSelectionListener(ListSelectionListener listener)
Removes a listener for changes to the selected things. |
void |
removePropertyChangeListener(String name,
PropertyChangeListener listener)
Removes a PropertyChangeListener for a named property. |
void |
restoreSelectedSoundings()
Restores the selected soundings to their original values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SELECTED_INDEX
public static final String SELECTED_INDEX
| Constructor Detail |
|---|
public DataModelImpl(JList jList)
jList - The underlying JList whose mutable data model
contains the sounding data and whose list
selection model determines the selected
soundings and selected sounding.| Method Detail |
|---|
public int getSize()
public boolean isSelectedIndex(int index)
index - The index of the sounding.
true if and only if the given
sounding is a member of the selected soundings.public int getSelectedIndex()
public void restoreSelectedSoundings()
throws VisADException,
RemoteException
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public Field[] getSounding(int index)
throws IndexOutOfBoundsException
index - The index of the sounding.
IndexOutOfBoundsException - The index is out of range.
public Field getTemperatureProfile(int index)
throws IndexOutOfBoundsException
index - The index of the temperature profile.
IndexOutOfBoundsException - The index is out of range.
public Field getDewPointProfile(int index)
throws IndexOutOfBoundsException
index - The index of the dew-point profile.
IndexOutOfBoundsException - The index is out of range.
public Object[] getWindData(int index)
throws IndexOutOfBoundsException,
VisADException,
RemoteException
index - The index of the sounding.
IndexOutOfBoundsException - The index is out of range.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public Field getWindProfile(int index)
throws IndexOutOfBoundsException,
VisADException,
RemoteException
index - The index of the wind profile.
IndexOutOfBoundsException - The index is out of range.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public Tuple getMeanWind(int index)
throws VisADException,
RemoteException
index - The index of the mean-wind.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public DataReference getMeanWindRef(int index)
throws VisADException,
RemoteException
index - The index of the mean-wind.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public void addPropertyChangeListener(String name,
PropertyChangeListener listener)
name - The name of the property.listener - The PropertyChangeListener to be added.
public void removePropertyChangeListener(String name,
PropertyChangeListener listener)
name - The name of the property.listener - The PropertyChangeListener to be removed.public void addListSelectionListener(ListSelectionListener listener)
listener - The listener for changes to the selected
things.public void removeListSelectionListener(ListSelectionListener listener)
listener - The listener for changes to the selected
things.public void addListDataListener(ListDataListener listener)
listener - The listener for changes to the underlying list
of things.public void removeListDataListener(ListDataListener listener)
listener - The listener for changes to the underlying list
of things.
protected RAOB getRAOB(int index)
throws IndexOutOfBoundsException
index - The index of the RAOB.
IndexOutOfBoundsException - The index is out of range.
protected static FlatField ensureCartesianWindProfile(FlatField input)
throws VisADException,
RemoteException
input - Wind profile in cartesian or polar coordinates.
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
protected MeanWindCell getMeanWindCell(int index)
throws VisADException,
RemoteException
index - The index of the mean-wind cell.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||