Class StationLocationMap

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class StationLocationMap extends JPanel
A navigated panel with 2 renderers - a map renderer and a station location renderer.
Author:
Don Murray
See Also:
  • Field Details

  • Constructor Details

    • StationLocationMap

      public StationLocationMap()
      Default constructor. Uses default label type and single station selection.
    • StationLocationMap

      public StationLocationMap(String template)
      Construct a new StationLocationMap using the specified label type. Use default station selection and map.
      Parameters:
      template - The String template to use for displaying station labels.
    • StationLocationMap

      public StationLocationMap(boolean multipleSelect)
      Construct a new StationLocationMap using the specified station selection type. Use default labeling and map.
      Parameters:
      multipleSelect - true to allow multiple station selections
    • StationLocationMap

      public StationLocationMap(boolean multipleSelect, String defaultMap)
      Construct a new StationLocationMap using the specified station selection type and map. Use default labeling.
      Parameters:
      multipleSelect - true to allow multiple station selections
      defaultMap - map to use
    • StationLocationMap

      public StationLocationMap(boolean multipleSelect, String defaultMap, String template)
      Construct a new StationLocationMap using the specified station selection type, map and template.
      Parameters:
      multipleSelect - true to allow multiple station selections
      defaultMap - map to use
      template - The String template to use for displaying station labels.
    • StationLocationMap

      public StationLocationMap(boolean multipleSelect, Renderer theMapRender)
      Create a StationLocationMap
      Parameters:
      multipleSelect - true if multiple selection is allowed
      theMapRender - the renderer for the map
    • StationLocationMap

      public StationLocationMap(boolean multipleSelect, Renderer theMapRender, String template)
      Create a StationLocationMap
      Parameters:
      multipleSelect - true if multiple selection is allowed
      theMapRender - the renderer for the map
      template - the template for the display of the data
  • Method Details

    • doPickPoint

      protected void doPickPoint(PickEvent e)
      Process the PickEvent.
      Parameters:
      e - PickEvent to process
    • isFocusable

      public boolean isFocusable()
      Get the isFocusTransverable property
      Overrides:
      isFocusable in class Component
      Returns:
      true if we can transverse focus
    • selectAll

      protected void selectAll()
      Select all visible stations.
    • isMultipleSelect

      public boolean isMultipleSelect()
      See if this map allows multiple station selection
      Returns:
      true if allows multiple selection.
    • getSelectedStations

      public List getSelectedStations()
      Get the list of selected stations.
      Returns:
      List of stations that have been selected.
    • getNavigatedPanel

      public NavigatedPanel getNavigatedPanel()
      Access to the navigated panel.
      Returns:
      navigated panel object
    • setMapRenderer

      public void setMapRenderer(Renderer r)
      Set the map renderer for this object
      Parameters:
      r - map renderer
    • getMapRender

      public Renderer getMapRender()
      Get the map renderer for this object
      Returns:
      Map renderer
    • getStationLocationRenderer

      public StationLocationRenderer getStationLocationRenderer()
      Access to the station location renderer
      Returns:
      station location renderer
    • setStationRenderer

      public void setStationRenderer(Renderer r)
      Set the station location renderer.
      Parameters:
      r - station location renderer
    • setSelectedStations

      public void setSelectedStations(List stns)
      Set the list of selected stations.
      Parameters:
      stns - List of stations to set selected.
    • setStations

      public void setStations(List stns)
      Set the list of stations to be displayed. Stations will be decluttered when they are displayed.
      Parameters:
      stns - list of stations
    • setStations

      public void setStations(List stns, boolean declutter)
      Set the list of stations to be displayed. Stations will be decluttered or not based on the value of declutter
      Parameters:
      stns - list of stations
      declutter - display will be decluttered if true, not if false
    • setStations

      public void setStations(List stns, List selectedStations, boolean declutter)
      Set the list of stations to be displayed. Stations will be decluttered or not based on the value of declutter
      Parameters:
      stns - list of stations
      selectedStations - already selected stations
      declutter - display will be decluttered if true, not if false
    • getStations

      public List getStations()
      Get the list of stations
      Returns:
      the list of stations
    • setDeclutter

      public void setDeclutter(boolean declut)
      Change the state of decluttering
      Parameters:
      declut - station display will be decluttered if true, not if false
    • clearStations

      public void clearStations()
      Convenience method to clear out the data in the station renderer
    • getDeclutter

      public boolean getDeclutter()
      Determine whether decluttering is on for this map.
      Returns:
      true if map is being decluttered.
    • setProjectionImpl

      public void setProjectionImpl(ucar.unidata.geoloc.ProjectionImpl p)
      Set the projection to use for this map.
      Parameters:
      p - projection to use
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a property change listener.
      Overrides:
      addPropertyChangeListener in class Container
      Parameters:
      listener - The property change listener.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a property change listener.
      Overrides:
      removePropertyChangeListener in class Component
      Parameters:
      listener - The property change listener.
    • addPropertyChangeListener

      public void addPropertyChangeListener(String name, PropertyChangeListener listener)
      Adds a property change listener for a named property.
      Overrides:
      addPropertyChangeListener in class Container
      Parameters:
      name - The name of the property.
      listener - The property change listener.
    • removePropertyChangeListener

      public void removePropertyChangeListener(String name, PropertyChangeListener listener)
      Removes a property change listener for a named property.
      Overrides:
      removePropertyChangeListener in class Component
      Parameters:
      name - The name of the property.
      listener - The property change listener.
    • redraw

      public void redraw()
      Redraw the graphics on the screen.
    • getMultipleSelect

      public boolean getMultipleSelect()
      See if this supports multiple station selection.
      Returns:
      true if this allows multiple station selection
    • main

      public static void main(String[] args)
      test with ucar.unidata.view.station.StationLocationMap
      Parameters:
      args -
    • getWasDoubleClick

      public boolean getWasDoubleClick()
      See if a double click happened.
      Returns:
      true if a double click happened