Class SourceButton

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

public class SourceButton extends PopupMenuButton
Button that allows to choose the imagery source used for slippy map background.
Since:
1390
See Also:
  • Field Details

  • Constructor Details

    • SourceButton

      public SourceButton(SlippyMapBBoxChooser slippyMapBBoxChooser, Collection<org.openstreetmap.gui.jmapviewer.interfaces.TileSource> sources, ButtonModel showDownloadAreaButtonModel)
      Constructs a new SourceButton.
      Parameters:
      slippyMapBBoxChooser - parent slippy map
      sources - list of imagery sources to display
      showDownloadAreaButtonModel - model for the "Show downloaded area" button
      Since:
      12955
  • Method Details

    • generatePopupMenu

      protected void generatePopupMenu()
    • setSourceDefault

      private void setSourceDefault()
    • setSources

      public final void setSources(Collection<org.openstreetmap.gui.jmapviewer.interfaces.TileSource> sources)
      Set the tile sources.
      Parameters:
      sources - The tile sources to display
      Since:
      6364
    • getSources

      public final Collection<org.openstreetmap.gui.jmapviewer.interfaces.TileSource> getSources()
      Get the tile sources.
      Returns:
      unmodifiable collection of tile sources
    • getCurrentSource

      public final org.openstreetmap.gui.jmapviewer.interfaces.TileSource getCurrentSource()
      Get the currently-selected tile source.
      Returns:
      currently-selected tile source
    • setCurrentMap

      public void setCurrentMap(org.openstreetmap.gui.jmapviewer.interfaces.TileSource tileSource)
      Changes the current imagery source used for slippy map background.
      Parameters:
      tileSource - the new imagery source to use