ucar.unidata.view.sounding
Class WindController

java.lang.Object
  extended by ucar.unidata.view.sounding.DataController
      extended by ucar.unidata.view.sounding.WindController

public class WindController
extends DataController

Provides support for mediating interactions between a (mutable) wind profile database and views of the wind-data in a wind-profile display.

Version:
$Id: WindController.java,v 1.11 2005/05/13 18:33:41 jeffmc Exp $
Author:
Steven R. Emmerson

Constructor Summary
WindController(ucar.unidata.view.sounding.WindDataModel database, WindProfileDisplay display)
          Constructs from an wind-profile database and wind-profile display.
 
Method Summary
protected  void addDataDisplayable(int index)
          Adds a given displayed datum to the view.
protected  void removeAllDataDisplayables()
          Removes all displayed data from the view.
protected  void removeDataDisplayable(int index)
          Removes a given displayed datum from the view.
protected  void selectedIndexChange(int index)
          Handles a change to the index of the selected wind-profile.
protected  void setVisibility(int index, boolean visible)
          Sets the visibility of a given displayed datum.
 
Methods inherited from class ucar.unidata.view.sounding.DataController
addDataDisplayables, removeDataDisplayables, setVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindController

public WindController(ucar.unidata.view.sounding.WindDataModel database,
                      WindProfileDisplay display)
Constructs from an wind-profile database and wind-profile display.

Parameters:
database - The wind-profile database.
display - The wind-profile display.
Method Detail

selectedIndexChange

protected void selectedIndexChange(int index)
                            throws VisADException,
                                   RemoteException
Handles a change to the index of the selected wind-profile.

Specified by:
selectedIndexChange in class DataController
Parameters:
index - The index of the selected wind-profile. A values of -1 means that there is no selected wind-profile.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

addDataDisplayable

protected void addDataDisplayable(int index)
                           throws VisADException,
                                  RemoteException
Adds a given displayed datum to the view.

Specified by:
addDataDisplayable in class DataController
Parameters:
index - The index of the displayed datum.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

removeAllDataDisplayables

protected void removeAllDataDisplayables()
                                  throws VisADException,
                                         RemoteException
Removes all displayed data from the view.

Specified by:
removeAllDataDisplayables in class DataController
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

removeDataDisplayable

protected void removeDataDisplayable(int index)
                              throws IndexOutOfBoundsException,
                                     VisADException,
                                     RemoteException
Removes a given displayed datum from the view.

Specified by:
removeDataDisplayable in class DataController
Parameters:
index - The index of the displayed datum.
Throws:
IndexOutOfBoundsException - The index is out of range.
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setVisibility

protected void setVisibility(int index,
                             boolean visible)
                      throws VisADException,
                             RemoteException
Sets the visibility of a given displayed datum.

Specified by:
setVisibility in class DataController
Parameters:
index - The index of the displayed datum.
visible - Whether or not the datum should be visible.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.