Class AddePointDataChooser

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ucar.unidata.ui.ChooserPanel
ucar.unidata.idv.chooser.IdvChooser
ucar.unidata.idv.chooser.TimesChooser
ucar.unidata.idv.chooser.adde.AddeChooser
edu.wisc.ssec.mcidasv.chooser.adde.AddeChooser
edu.wisc.ssec.mcidasv.chooser.adde.AddePointDataChooser
All Implemented Interfaces:
Constants, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ucar.unidata.idv.IdvConstants
Direct Known Subclasses:
AddeLightningDataChooser, AddeProfilerDataChooser, AddeRaobChooser

public class AddePointDataChooser extends AddeChooser
Selection widget for ADDE point data
Version:
$Revision$ $Date$
See Also:
  • Field Details

  • Constructor Details

    • AddePointDataChooser

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

    • readFromServer

      protected void readFromServer()
      Do server connection stuff... override this with type-specific methods
      Overrides:
      readFromServer in class AddeChooser
    • readDescriptors

      protected void readDescriptors()
      Generate a list of image descriptors for the descriptor list.
      Overrides:
      readDescriptors in class AddeChooser
    • doLoadInThread

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

      public void getArchiveDay()
      Show the archive dialog. This method is not meant to be called but is public by reason of implementation (or insanity).
    • getSelectedStationModel

      public ucar.unidata.ui.symbol.StationModel getSelectedStationModel()
      Get the selected station model.
      Returns:
      StationModel to use: defined by defaultModels list in ctor
    • makeTimesPanel

      protected JPanel makeTimesPanel()
      Add the interval selector to the component.
      Overrides:
      makeTimesPanel in class ucar.unidata.idv.chooser.TimesChooser
      Returns:
      superclass component with extra stuff
    • getExtraTimeComponentRelative

      Get the extra time widget, but built in a different way. Designed to be put into a GroupLayout
      Returns:
      Extra time widget
    • getExtraRelativeTimeComponent

      Overridden in McIDAS-V to get a nicer set of interval combo box options.
      Overrides:
      getExtraRelativeTimeComponent in class ucar.unidata.idv.chooser.TimesChooser
      Returns:
      JPanel containing a label and the interval combo box.
    • getExtraTimeComponentAbsolute

      Get the time popup widget
      Returns:
      a widget for selecing the day
    • getRelBoxValue

      protected float getRelBoxValue()
      Get the value from the relative increment box
      Returns:
      the selected value or a default
    • getRelBoxString

      Get the string from the relative increment box
      Returns:
      the selected string or a default
    • getRequestUrl

      Get the request URL
      Returns:
      the request URL
    • appendRequestSelectClause

      Get the select clause for the ADDE request specific to this type of data.
      Parameters:
      buf - The buffer to append to
    • canReadTimes

      protected boolean canReadTimes()
      Check if we are ready to read times
      Returns:
      true if times can be read
    • enableWidgets

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

      public boolean timesOk()
      Do we have times selected. Either we are doing absolute times and there are some selected in the list. Or we are doing relative times and we have done a connect to the server
      Returns:
      Do we have times
    • isSynoptic

      protected boolean isSynoptic()
      Return true if selected descriptor is for SYNOPTIC data.
      Returns:
      true iff AddeChooser.getDescriptor() is "SYNOP".
    • isUpperAir

      protected boolean isUpperAir()
      Return true if selected descriptor is for upper air.
      Returns:
      true iff AddeChooser.getDescriptor() is "UPPERMAND".
    • isProfiler

      protected boolean isProfiler()
      Return true if selected descriptor is for profiler.
      Returns:
      true iff AddeChooser.getDescriptor() is "PROF".
    • handleUpdate

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

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

      private String getJulianDay()
      Get the current, or archive, if selected, Julian day as a String
      Returns:
      the julian day as a string (yyyyDDD)
    • getDataName

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

      public void doCancel()
      _more_
      Overrides:
      doCancel in class ucar.unidata.idv.chooser.IdvChooser
    • readTimes

      public void readTimes()
      Read the set of image times available for the current server/group/type This method is a wrapper, setting the wait cursor and wrapping the call to readTimesInner(); in a try/catch block
      Overrides:
      readTimes in class ucar.unidata.idv.chooser.adde.AddeChooser
    • readTimesInner

      protected void readTimesInner()
      Set the list of dates/times based on the image selection
    • handleConnectionError

      protected void handleConnectionError(Exception e)
      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:
      e - The exception
      See Also:
    • haveTimeSelected

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

      Create the date time selection string for the "select" clause of the ADDE URL.
      Returns:
      the select day and time strings
    • 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 ucar.unidata.idv.chooser.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
    • getDescriptorLabel

      Get the descriptor widget label.
      Overrides:
      getDescriptorLabel in class AddeChooser
      Returns:
      label for the descriptor widget
    • getGroupType

      protected String getGroupType()
      get the ADDE server group type to use
      Overrides:
      getGroupType in class ucar.unidata.idv.chooser.adde.AddeChooser
      Returns:
      group type
    • doMakeContents

      Make the UI for this selector.
      Overrides:
      doMakeContents in class AddeChooser
      Returns:
      The gui
    • doMakeContents

      public JComponent doMakeContents(boolean doesOverride)