Class AddePointDataChooser

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, IdvConstants
Direct Known Subclasses:
AddeGLMDataChooser, AddeLightningDataChooser, AddeRaobPointDataChooser, PointChooser

public class AddePointDataChooser extends AddeChooser
Selection widget for ADDE point data
Author:
MetApps Development Team
See Also:
  • Field Details

    • DATASET_NAME_KEY

      public static String DATASET_NAME_KEY
      Property for the dataset name key.
      See Also:
    • DATA_TYPE

      public static String DATA_TYPE
      Property for the data type.
    • dataTypes

      protected JComboBox dataTypes
      UI widget for selecting data types
    • stationModelBox

      protected JComboBox stationModelBox
      UI widget for selecting station models
    • levelBox

      protected JComboBox levelBox
      a selector for a particular level
    • LEVELS

      public static String LEVELS
      Property for the number of times
    • SELECTED_LEVEL

      public static String SELECTED_LEVEL
      Property for the time increment
    • relTimeIncBox

      protected JComboBox relTimeIncBox
      box for the relative time
  • Constructor Details

    • AddePointDataChooser

      public AddePointDataChooser(IdvChooserManager mgr, Element root)
      Create a chooser for Adde POINT data
      Parameters:
      mgr - The chooser manager
      root - The chooser.xml node
  • Method Details

    • doMakeContents

      protected JComponent doMakeContents()
      Make the contents for this chooser
      Overrides:
      doMakeContents in class ChooserPanel
      Returns:
      a panel with the UI
    • getDefaultDisplayType

      protected String getDefaultDisplayType()
      Get the default display type
      Overrides:
      getDefaultDisplayType in class IdvChooser
      Returns:
      the default control for automatic display
    • doLoadInThread

      public void doLoadInThread()
      Load in an ADDE point data set based on the PropertyChangeEvent.
      Overrides:
      doLoadInThread in class ChooserPanel
    • makeTimesPanel

      protected JPanel makeTimesPanel()
      Add the 00 invalid input: '&' 12Z checkbox to the component.
      Overrides:
      makeTimesPanel in class TimesChooser
      Returns:
      superclass component with extra stuff
    • getExtraRelativeTimeComponent

      protected JComponent getExtraRelativeTimeComponent()
      Get the extra time widget. Subclasses can add their own time widgets.
      Overrides:
      getExtraRelativeTimeComponent in class TimesChooser
      Returns:
      a widget that can be selected for more options
    • getRelTimeIncLabel

      public String getRelTimeIncLabel()
      _more_
      Returns:
      _more_
    • getSelectedStationModel

      public StationModel getSelectedStationModel()
      Get the selected station model.
      Returns:
      StationModel to use by default.
    • getDescriptor

      protected String getDescriptor()
      Return the currently selected descriptor form the combobox
      Returns:
      the currently selected descriptor
    • getGroup

      protected String getGroup()
      Return the currently selected group form the combobox
      Overrides:
      getGroup in class AddeChooser
      Returns:
      the currently selected group
    • getRequestUrl

      public String getRequestUrl()
      Get the request URL
      Returns:
      the request URL
    • getLevels

      public List getLevels()
      Get the list of possible levels for this chooser.
      Returns:
      list of levels;
    • getSelectedLevel

      public Object getSelectedLevel()
      Get the selected level
      Returns:
      the selected level
    • appendRequestSelectClause

      protected void appendRequestSelectClause(StringBuffer buf)
      Get the select clause for the adde request specific to this type of data.
      Parameters:
      buf - The buffer to append to
    • canDoLevels

      public boolean canDoLevels()
      Does this chooser support level selection
      Returns:
      true if levels are supported by this chooser
    • handleUpdate

      public void handleUpdate() throws Exception
      Update the widget with the latest data.
      Overrides:
      handleUpdate in class AddeChooser
      Throws:
      Exception - On badness
    • getTimesRequest

      protected String getTimesRequest()
      Get the request string for times particular to this chooser
      Returns:
      request string
    • getDataName

      public String getDataName()
      This allows derived classes to provide their own name for labeling, etc.
      Overrides:
      getDataName in class AddeChooser
      Returns:
      the dataset name
    • readTimes

      public void readTimes()
      Set the list of available times.
      Overrides:
      readTimes in class AddeChooser
    • getNumTimesToSelect

      protected int getNumTimesToSelect()
      Get the default number of times to select
      Overrides:
      getNumTimesToSelect in class TimesChooser
      Returns:
      1
    • haveTimeSelected

      protected boolean haveTimeSelected()
      Are there any times selected.
      Overrides:
      haveTimeSelected in class TimesChooser
      Returns:
      Any times selected.
    • getDayTimeSelectString

      protected String getDayTimeSelectString()
      Create the date time selection string for the "select" clause of the ADDE URL.
      Returns:
      the select day and time strings
    • getRelativeTimeId

      protected String getRelativeTimeId()
      Get the identifier for relative time. Subclasses can override.
      Returns:
      the identifier
    • getDatasetName

      public String getDatasetName()
      Get the name of the dataset.
      Returns:
      descriptive name of the dataset.
    • getDataType

      public String getDataType()
      Get the data type for this chooser
      Overrides:
      getDataType in class AddeChooser
      Returns:
      the type
    • getRelativeTimeIncrement

      public float getRelativeTimeIncrement()
      Get the increment between times for relative time requests
      Overrides:
      getRelativeTimeIncrement in class TimesChooser
      Returns:
      time increment (hours)
    • setRelativeTimeIncrement

      public void setRelativeTimeIncrement(float increment)
      Set the increment between times for relative time requests
      Parameters:
      increment - time increment (hours)
    • updateStatus

      protected void updateStatus()
      Update labels, enable widgets, etc.
      Overrides:
      updateStatus in class AddeChooser
    • enableWidgets

      protected void enableWidgets()
      Enable or disable the GUI widgets based on what has been selected.
      Overrides:
      enableWidgets in class AddeChooser
    • getDefaultDatasets

      protected TwoFacedObject[] getDefaultDatasets()
      Get an array of TwoFacedObject-s for the datasets. The two faces are the descriptive name and the actual group/descriptor
      Returns:
      the default data sets
    • getDefaultStationModel

      public String getDefaultStationModel()
      Get the default station model for this chooser.
      Returns:
      name of default station model
    • handleConnectionError

      protected void handleConnectionError(Exception excp)
      Show the given error to the user. If it was an Adde exception that was a bad server error then print out a nice message.
      Overrides:
      handleConnectionError in class AddeChooser
      Parameters:
      excp - The exception
    • getGroupType

      protected String getGroupType()
      Overridden to return AddeServer.TYPE_POINT for this chooser and its subclasses.
      Overrides:
      getGroupType in class AddeChooser
      Returns:
      AddeServer.TYPE_POINT