Class GpxRouteLayer

All Implemented Interfaces:
Lockable, ProjectionChangeListener, DownloadFromServer, MapViewPaintable, SaveToFile, UploadToServer, Destroyable

A layer that displays GpxData.routes from a GPX file.
  • Field Details

  • Constructor Details

  • Method Details

    • isModified

      public boolean isModified()
      Description copied from class: AbstractModifiableLayer
      Determines if data managed by this layer has been modified.
      Specified by:
      isModified in class AbstractModifiableLayer
      Returns:
      true if data has been modified; false, otherwise
    • getIcon

      public Icon getIcon()
      Description copied from class: Layer
      Return a representative small image for this layer. The image must not be larger than 64 pixel in any dimension.
      Specified by:
      getIcon in class Layer
      Returns:
      layer icon
    • getToolTipText

      Description copied from class: Layer
      Returns a small tooltip hint about some statistics for this layer.
      Specified by:
      getToolTipText in class Layer
      Returns:
      A small tooltip hint about some statistics for this layer.
    • mergeFrom

      public void mergeFrom(Layer from)
      Description copied from class: Layer
      Merges the given layer into this layer. Throws if the layer types are incompatible.
      Specified by:
      mergeFrom in class Layer
      Parameters:
      from - The layer that get merged into this one. After the merge, the other layer is not usable anymore and passing to one others mergeFrom should be one of the last things to do with a layer.
    • isMergable

      public boolean isMergable(Layer other)
      Description copied from class: Layer
      Determines if the other layer can be merged into this layer.
      Specified by:
      isMergable in class Layer
      Parameters:
      other - The other layer that is tested to be mergable with this.
      Returns:
      Whether the other layer can be merged into this layer.
    • visitBoundingBox

      Description copied from class: Layer
      Visits the content bounds of this layer. The behavior of this method depends on the layer, but each implementation should attempt to cover the relevant content of the layer in this method.
      Specified by:
      visitBoundingBox in class Layer
      Parameters:
      v - The visitor that gets notified about the contents of this layer.
    • getInfoComponent

      Description copied from class: Layer
      Gets the layer information to display to the user. This is used if the user requests information about this layer. It should display a description of the layer content.
      Specified by:
      getInfoComponent in class Layer
      Returns:
      Either a String or a Component describing the layer.
    • getMenuEntries

      public Action[] getMenuEntries()
      Description copied from class: Layer
      Returns list of actions. Action can implement LayerAction interface when it needs to be represented by other menu component than JMenuItem or when it supports multiple layers. Actions that support multiple layers should also have correct equals implementation.

      Use Layer.SeparatorLayerAction.INSTANCE instead of new JSeparator

      Specified by:
      getMenuEntries in class Layer
      Returns:
      menu actions for this layer
    • paint

      public void paint(Graphics2D g, MapView mv, Bounds bbox)
      Description copied from interface: MapViewPaintable
      Paint the dataset using the engine set.
      Parameters:
      g - Graphics
      mv - The object that can translate GeoPoints to screen coordinates.
      bbox - Bounding box
    • createMapViewPainter

      Description copied from class: AbstractMapViewPaintable
      Creates a new LayerPainter.
      Overrides:
      createMapViewPainter in class AbstractMapViewPaintable
      Parameters:
      event - The event that triggered the creation.
      Returns:
      The painter.