Class MapWidget

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class MapWidget extends PanelWithFrame implements ActionListener
Widget for configuring maps. Maintains a CompositeDisplayable of MapLines and LatLonLines. The user can configure the visibility and color of a particular set of map or lat/lon lines. The increments between lat/lon lines can be configured as well. The widget is configured through a properties file. When the properties of the widget are set and the "Apply" button is selected, a PropertyChangeEvent is thrown with the CompositeDisplayable of all visible maps as the newValue.
See Also:
  • Field Details

  • Constructor Details

    • MapWidget

      public MapWidget(XmlResourceCollection mapResources, boolean standAlone)
      Construct the widget using the specified set of default and users xml
      Parameters:
      mapResources - Where the maps.xml are
      standAlone - Is this embedded in another window
  • Method Details

    • setCurrentState

      public void setCurrentState(String xml)
      Recreate the users xml from the given parameter and loadDefaults
      Parameters:
      xml - The string/xml representation of the map state
    • getCurrentState

      public String getCurrentState()
      Return the current state (as an XML string) of this MapWidget.
      Returns:
      The xml representation of the current state
    • doOk

      public void doOk()
      Apply the gui properties to the internal state. Remake the xml.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Handle OK, Apply, Reset and Cancel buttom commands
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - The action event
    • getMapPosition

      public double getMapPosition()
      Get the vertical map position value
      Returns:
      map position value
    • createMaps

      Get the map composite which is all the maps that are set to be visible.
      Returns:
      map composite
      Throws:
      RemoteException
      VisADException
    • getMapData

      public List getMapData()
      Return the list of MapData objects
      Returns:
      List of map data
    • getLatData

      public LatLonData getLatData()
      Return the latitude state
      Returns:
      The Lat. state
    • getLonData

      public LatLonData getLonData()
      The Longitude state
      Returns:
      The lon state