Class ObsDisplayControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener
Direct Known Subclasses:
ObsListControl, StationModelControl

public abstract class ObsDisplayControl extends DisplayControlImpl
A DisplayControl for station models
Version:
$Revision: 1.58 $
Author:
MetApps Development Team
  • Field Details

    • FIELD_ALL

      protected static final String FIELD_ALL
      Represents when we use all fields
      See Also:
    • format

      protected static DecimalFormat format
      decimal formatter
    • colString

      protected String colString
      column string
    • LABEL_LAT

      protected static String LABEL_LAT
      Label for latitude fields
    • LABEL_LON

      protected static String LABEL_LON
      Label for longitude fields
    • LABEL_ALT

      protected static String LABEL_ALT
      Label for altitude fields
    • LABEL_TIME

      protected static String LABEL_TIME
      Label for Time fields
    • colNames

      protected List colNames
      Holds the column names
  • Constructor Details

    • ObsDisplayControl

      public ObsDisplayControl()
      Default ctor
  • Method Details

    • doRemove

      public void doRemove() throws RemoteException, VisADException
      Remove this displayable
      Specified by:
      doRemove in interface DisplayControl
      Overrides:
      doRemove in class DisplayControlImpl
      Throws:
      VisADException - if a VisAD Failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • exportAsNetcdf

      public void exportAsNetcdf()
      export the point data as a netcdf file
    • getColValue

      protected Object getColValue(Data data, MathType type, boolean useFormatPref)
      Get the column value and add it to the html
      Parameters:
      data - data to search
      type - mathtype of the parameter for this column
      useFormatPref - use parameter readout preference for formatting
      Returns:
      String representation of the data
    • getColValue

      protected Object getColValue(Data data, MathType type, boolean useFormatPref, Unit displayUnit)
      Get the column value and add it to the html
      Parameters:
      data - data to search
      type - mathtype of the parameter for this column
      useFormatPref - use parameter readout preference for formatting
      displayUnit - The unit to use
      Returns:
      String representation of the data
    • getDisplayUnitName

      protected String getDisplayUnitName(Scalar data)
      Get the unit string for the specified Scalar
      Parameters:
      data - real/text value
      Returns:
      String representation of the unit or null
    • getDisplayUnit

      protected Unit getDisplayUnit(Scalar data)
      Get the display unit to use for the data
      Parameters:
      data - data
      Returns:
      display unit
    • applyPreferences

      public void applyPreferences()
      Apply the preferences. Used to pick up the date format changes.
      Specified by:
      applyPreferences in interface DisplayControl
      Overrides:
      applyPreferences in class DisplayControlImpl
    • doDeclutterTime

      protected FieldImpl doDeclutterTime(FieldImpl obs) throws VisADException, RemoteException
      Declutter in time.
      Parameters:
      obs - initial field of observations.
      Returns:
      a 'time' decluttered version of obs
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • timeDeclutterChanged

      protected void timeDeclutterChanged()
      Handle when the time declutering state has changed
    • getTimeDeclutterComps

      protected JComponent[] getTimeDeclutterComps()
      Make the gui panel for the time decluttering
      Returns:
      The time declutter panel
    • isIdParam

      protected boolean isIdParam(String name)
      A utility to determine if the given param name is the station id
      Parameters:
      name - The param name
      Returns:
      Is it a station id
    • getParamLabel

      protected String getParamLabel(String name)
      Get the label to show to the user for the given param name. This handles lat,lon,alt and time special.
      Parameters:
      name - The param name
      Returns:
      The label to use.
    • getFieldsToShow

      protected List getFieldsToShow(TupleType tt) throws VisADException, RemoteException
      Return a list of the names of the fields to use
      Parameters:
      tt - The types we get the names from
      Returns:
      List of field names to use
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • getIndicesToShow

      protected int[] getIndicesToShow(TupleType tt) throws VisADException, RemoteException
      Return an array of the indexes in the obs to use
      Parameters:
      tt - The type
      Returns:
      Indices to use
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • getIndex

      protected int getIndex(TupleType tType, String commaSeparatedNames)
      Get the index of the comma separated names of values in the tuple
      Parameters:
      tType - tuple type to search
      commaSeparatedNames - list of possible names (aliases)
      Returns:
      index in the tuple or -1 if not found
    • showFieldSelector

      public void showFieldSelector()
      Show the field selector window
    • doMakeShowRawSelector

      protected JPanel doMakeShowRawSelector()
      Make a selector for showing raw data
      Returns:
      a container for this selector
    • doMakeFieldSelector

      protected JPanel doMakeFieldSelector()
      Make the UI contents for this control.
      Returns:
      a container for this selector
    • fieldSelectorChanged

      protected void fieldSelectorChanged()
      Used to notify derived classes of when the field selector has changed
    • getTupleType

      protected TupleType getTupleType() throws RemoteException, VisADException
      Override this in derived classes to get the TupleType of the obs
      Returns:
      The tuple type
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • doMakeDataInstance

      protected DataInstance doMakeDataInstance(DataChoice dataChoice) throws RemoteException, VisADException

      Creates and returns the DataInstance corresponding to a DataChoice. Returns null if the DataInstance was somehow invalid.

      This method is invoked by the overridable method DisplayControlImpl.setData(DataChoice).

      Overrides:
      doMakeDataInstance in class DisplayControlImpl
      Parameters:
      dataChoice - The DataChoice from which to create a DataInstance.
      Returns:
      The created DataInstance or null.
      Throws:
      VisADException - if a VisAD Failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • setColString

      public void setColString(String value)
      Set the ColString property.
      Parameters:
      value - The new value for ColString
    • getColString

      public String getColString()
      Get the ColString property.
      Returns:
      The ColString
    • setShowDataRaw

      public void setShowDataRaw(boolean value)
      Set the ShowDataRaw property.
      Parameters:
      value - The new value for ShowDataRaw
    • getShowDataRaw

      public boolean getShowDataRaw()
      Get the ShowDataRaw property.
      Returns:
      The ShowDataRaw
    • setTimeDeclutterMinutes

      public void setTimeDeclutterMinutes(double value)
      Set the TimeDeclutterMinutes property.
      Parameters:
      value - The new value for TimeDeclutterMinutes
    • updateTimeDeclutterMinutes

      public void updateTimeDeclutterMinutes(double value)
      Update the TimeDeclutterMinutes property.
      Parameters:
      value - The new value for TimeDeclutterMinutes
    • getTimeDeclutterMinutes

      public double getTimeDeclutterMinutes()
      Get the TimeDeclutterMinutes property.
      Returns:
      The TimeDeclutterMinutes
    • setTimeDeclutterEnabled

      public void setTimeDeclutterEnabled(boolean value)
      Set the TimeDeclutterEnabled property.
      Parameters:
      value - The new value for TimeDeclutterEnabled
    • addDisplaySettings

      protected void addDisplaySettings(DisplaySettingsDialog dsd)
      Add properties to the display settings dialog
      Overrides:
      addDisplaySettings in class DisplayControlImpl
      Parameters:
      dsd - display settings dialog
    • getTimeDeclutterEnabled

      public boolean getTimeDeclutterEnabled()
      Get the TimeDeclutterEnabled property.
      Returns:
      The TimeDeclutterEnabled