Class OpenStreetMapViewerPanel

  • All Implemented Interfaces:
    adams.gui.core.MenuBarProvider, adams.gui.sendto.SendToActionSupporter, ImageObserver, MenuContainer, Serializable, Accessible

    public class OpenStreetMapViewerPanel
    extends adams.gui.core.BasePanel
    implements adams.gui.core.MenuBarProvider, adams.gui.sendto.SendToActionSupporter
    Viewer for OpenStreetMap.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar.
      • m_LastCoordinates

        protected String m_LastCoordinates
        the last coordinates in use.
      • m_Properties

        protected adams.core.Properties m_Properties
        the properties.
      • m_GOEDialogSource

        protected adams.gui.goe.GenericObjectEditorDialog m_GOEDialogSource
        for selecting a different tile source provider.
      • m_GOEDialogLoader

        protected adams.gui.goe.GenericObjectEditorDialog m_GOEDialogLoader
        for selecting a different tile loader.
    • Constructor Detail

      • OpenStreetMapViewerPanel

        public OpenStreetMapViewerPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.gui.core.BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class adams.gui.core.BasePanel
      • finishInit

        protected void finishInit()
        finishes the initialization.
        Overrides:
        finishInit in class adams.gui.core.BasePanel
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface adams.gui.core.MenuBarProvider
        Returns:
        the menu bar
      • updateMenu

        protected void updateMenu()
        updates the enabled state of the menu items.
      • close

        public void close()
        closes the dialog/frame.
      • getSendToClasses

        public Class[] getSendToClasses()
        Returns the classes that the supporter generates.
        Specified by:
        getSendToClasses in interface adams.gui.sendto.SendToActionSupporter
        Returns:
        the classes
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface adams.gui.sendto.SendToActionSupporter
        Parameters:
        cls - the classes to retrieve an item for
        Returns:
        true if an object is available for sending
      • getSendToItem

        public Object getSendToItem​(Class[] cls)
        Returns the object to send.
        Specified by:
        getSendToItem in interface adams.gui.sendto.SendToActionSupporter
        Parameters:
        cls - the classes to retrieve the item for
        Returns:
        the item to send
      • setCenter

        public void setCenter​(String coords)
        Sets the center of the map.
        Parameters:
        coords - the coordinates in decimal notation ("lat [,] lon")
      • setCenter

        public void setCenter​(AbstractGPS coords)
        Sets the center of the map.
        Parameters:
        coords - the coordinates
      • getCenter

        public AbstractGPS getCenter()
        Returns the current center of the map.
        Returns:
        the center
      • selectTileSourceProvider

        public void selectTileSourceProvider()
        Allows the user to select a different TileSource provider.
      • selectTileLoaderProvider

        public void selectTileLoaderProvider()
        Allows the user to select a different TileLoader provider.
      • getProperties

        public adams.core.Properties getProperties()
        Returns the properties for this panel.
        Returns:
        the properties file for this panel