Class DownloadAlongPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class DownloadAlongPanel extends JPanel
Panel displayed in "Download along..." dialogs
Since:
6054
See Also:
  • Field Details

  • Constructor Details

    • DownloadAlongPanel

      public DownloadAlongPanel(String prefOsm, String prefGps, String prefDist, String prefArea, String prefNear)
      Constructs a new DownloadPanel.
      Parameters:
      prefOsm - Preference key determining if OSM data should be downloaded
      prefGps - Preference key determining if GPS data should be downloaded
      prefDist - Preference key determining maximum distance
      prefArea - Preference key determining maximum area
      prefNear - Preference key determining "near" parameter. Can be null
  • Method Details

    • getDistance

      public final double getDistance()
      Gets the maximum distance in meters
      Returns:
      The maximum distance, in meters
    • getArea

      public final double getArea()
      Gets the maximum area in squared kilometers
      Returns:
      The maximum distance, in squared kilometers
    • getNear

      public final int getNear()
      Gets the "download near" chosen value
      Returns:
      the "download near" chosen value (0: track only, 1: waypoints only, 2: both)
    • isDownloadOsmData

      public boolean isDownloadOsmData()
      Replies true if the user selected to download OSM data
      Returns:
      true if the user selected to download OSM data
    • isDownloadGpxData

      public boolean isDownloadGpxData()
      Replies true if the user selected to download GPX data
      Returns:
      true if the user selected to download GPX data
    • rememberSettings

      protected final void rememberSettings()
      Remembers the current settings in the download panel
    • addAndFireChangeListener

      protected final void addAndFireChangeListener(ChangeListener listener)
      Adds a change listener to comboboxes
      Parameters:
      listener - The listener that will be notified of each combobox change
    • showInDownloadDialog

      public int showInDownloadDialog(String title, String helpTopic)
      Show this panel in a new "Download along" help-aware dialog
      Parameters:
      title - The dialog title
      helpTopic - The dialog help topic
      Returns:
      The selected button index (0 for download, 1 for cancel, 2 for dialog closure)