Class StationRegionDateChooser

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public class StationRegionDateChooser
    extends NPController
    A Swing widget for THREDDS clients to choose a station and/or a region from navigatable map.

    Typically a user listens for property change events:

       stationRegionDateChooser.addPropertyChangeListener( new PropertyChangeListener() {
     public void propertyChange(java.beans.PropertyChangeEvent e) {
     if (e.getPropertyName().equals("Station")) {
     selectedStation = (Station) e.getNewValue();
     ...
     }
     else if (e.getPropertyName().equals("GeoRegion")) {
     geoRegion = (ProjectionRect) e.getNewValue();
     ...
     }
     }
     });
     
    See Also:
    Serialized Form
    • Constructor Detail

      • StationRegionDateChooser

        public StationRegionDateChooser()
        Default Contructor, allow both region and station selection.
      • StationRegionDateChooser

        public StationRegionDateChooser​(boolean stationSelect,
                                        boolean regionSelect,
                                        boolean dateSelect)
        Constructor
        Parameters:
        regionSelect - allow selecting a region
        stationSelect - allow selecting a station
        dateSelect - allow selecting a date range
    • Method Detail

      • addToolbarAction

        public void addToolbarAction​(AbstractAction act)
        Add an action to the toolbar.
        Parameters:
        act - add this action
      • setStations

        public void setStations​(List stns)
        Set the list of Stations.
        Parameters:
        stns - list of Station
      • setSelectedStation

        public void setSelectedStation​(String id)
        Looks for the station with given id. If found, makes it current. Redraws.
        Parameters:
        id - must match stationIF.getID().
      • getSelectedStation

        public Station getSelectedStation()
        Get currently selected station, or null if none.
        Returns:
        selected station
      • setDeclutter

        public void setDeclutter​(boolean declut)
        Change the state of decluttering
        Parameters:
        declut - if true, declutter
      • getDeclutter

        public boolean getDeclutter()
        Get the state of the declutter flag.
        Returns:
        the state of the declutter flag.
      • redraw

        protected void redraw()
        Redraw the graphics on the screen.
      • setGeoBounds

        public void setGeoBounds​(LatLonRect llbb)
      • setGeoSelection

        public void setGeoSelection​(LatLonRect llbb)
      • setGeoSelection

        public void setGeoSelection​(ProjectionRect bb)
      • getGeoSelectionLL

        public LatLonRect getGeoSelectionLL()
      • getGeoSelectionMode

        public boolean getGeoSelectionMode()
      • getDateRange

        public DateRange getDateRange()
      • setDateRange

        public void setDateRange​(DateRange range)
      • makeDialog

        public JDialog makeDialog​(RootPaneContainer parent,
                                  String title,
                                  boolean modal)
        Wrap this in a JDialog component.
        Parameters:
        parent - JFrame (application) or JApplet (applet) or null
        title - dialog window title
        modal - is modal
        Returns:
        the JDialog widget