ucar.unidata.view.sounding
Class DataController

java.lang.Object
  extended by ucar.unidata.view.sounding.DataController
Direct Known Subclasses:
AerologicalController, WindController

public abstract class DataController
extends Object

Provides support for mediating interactions between a (mutable) sounding database and views of the database.

Version:
$Id: DataController.java,v 1.12 2005/05/13 18:33:27 jeffmc Exp $
Author:
Steven R. Emmerson

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

Constructor Detail

DataController

public DataController(ucar.unidata.view.sounding.DataModel database)
Constructs from a database.

Parameters:
database - The data model (i.e. database).
Method Detail

addDataDisplayables

protected void addDataDisplayables(int index0,
                                   int index1)
                            throws VisADException,
                                   RemoteException
Adds an interval of displayed data to the view.

Parameters:
index0 - The first index of the interval, inclusive.
index1 - The last index of the interval, inclusive.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

removeDataDisplayables

protected void removeDataDisplayables(int index0,
                                      int index1)
                               throws VisADException,
                                      RemoteException
Removes an interval of displayed data from the view.

Parameters:
index0 - One index of the interval, inclusive.
index1 - The other index of the interval, inclusive.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setVisibility

protected void setVisibility()
                      throws VisADException,
                             RemoteException
Sets the visiblity of the displayed data.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

selectedIndexChange

protected abstract void selectedIndexChange(int index)
                                     throws VisADException,
                                            RemoteException
Handles a change to the index of the selected sounding.

Parameters:
index - The index of the selected sounding. A value of -1 means that there is no selected sounding.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

addDataDisplayable

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

Parameters:
index - The index of the datum.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

removeAllDataDisplayables

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

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

removeDataDisplayable

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

Parameters:
index - The index of the displayed datum.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setVisibility

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

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.