Package org.openstreetmap.josm.gui.layer
Class GpxRouteLayer
java.lang.Object
org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable
org.openstreetmap.josm.gui.layer.Layer
org.openstreetmap.josm.gui.layer.AbstractModifiableLayer
org.openstreetmap.josm.gui.layer.GpxRouteLayer
- All Implemented Interfaces:
Lockable,ProjectionChangeListener,DownloadFromServer,MapViewPaintable,SaveToFile,UploadToServer,Destroyable
A layer that displays GpxData.routes from a GPX file.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.layer.Layer
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerActionNested classes/interfaces inherited from class org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable
AbstractMapViewPaintable.CompatibilityModeLayerPainterNested classes/interfaces inherited from interface org.openstreetmap.josm.gui.layer.MapViewPaintable
MapViewPaintable.LayerPainter, MapViewPaintable.MapViewEvent, MapViewPaintable.PaintableInvalidationEvent, MapViewPaintable.PaintableInvalidationListener -
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.gui.layer.AbstractModifiableLayer
IS_DIRTY_SYMBOL, REQUIRES_SAVE_TO_DISK_PROPFields inherited from class org.openstreetmap.josm.gui.layer.Layer
FILTER_STATE_PROP, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MapViewPaintable.LayerPainterCreates a new LayerPainter.getIcon()Return a representative small image for this layer.Gets the layer information to display to the user.Action[]Returns list of actions.Returns a small tooltip hint about some statistics for this layer.booleanisMergable(Layer other) Determines if the other layer can be merged into this layer.booleanDetermines if data managed by this layer has been modified.voidMerges the given layer into this layer.voidpaint(Graphics2D g, MapView mv, Bounds bbox) Paint the dataset using the engine set.voidVisits the content bounds of this layer.Methods inherited from class org.openstreetmap.josm.gui.layer.AbstractModifiableLayer
autosave, createUploadTask, getData, getUploadDialog, isDirty, isDownloadable, isLocked, isUploadable, isUploadDiscouraged, isUploadInProgress, lock, onPostSaveToFile, onPostUploadToServer, requiresSaveToFile, requiresUploadToServer, unlockMethods inherited from class org.openstreetmap.josm.gui.layer.Layer
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getChangesetSourceTag, getColor, getDefaultLayerPosition, getLabel, getName, getOpacity, getViewProjectionBounds, hasColor, hookUpMapView, isBackgroundLayer, isInfoResizable, isProjectionSupported, isRenamed, isSavable, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setColor, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible, toStringMethods inherited from class org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable
addInvalidationListener, attachToMapView, invalidate, removeInvalidationListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.gui.layer.SaveToFile
isSavable
-
Field Details
-
fromLayer
-
routes
-
-
Constructor Details
-
GpxRouteLayer
public GpxRouteLayer() -
GpxRouteLayer
-
-
Method Details
-
isModified
Description copied from class:AbstractModifiableLayerDetermines if data managed by this layer has been modified.- Specified by:
isModifiedin classAbstractModifiableLayer- Returns:
- true if data has been modified; false, otherwise
-
getIcon
Description copied from class:LayerReturn a representative small image for this layer. The image must not be larger than 64 pixel in any dimension. -
getToolTipText
Description copied from class:LayerReturns a small tooltip hint about some statistics for this layer.- Specified by:
getToolTipTextin classLayer- Returns:
- A small tooltip hint about some statistics for this layer.
-
mergeFrom
Description copied from class:LayerMerges the given layer into this layer. Throws if the layer types are incompatible. -
isMergable
Description copied from class:LayerDetermines if the other layer can be merged into this layer.- Specified by:
isMergablein classLayer- 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:LayerVisits 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:
visitBoundingBoxin classLayer- Parameters:
v- The visitor that gets notified about the contents of this layer.
-
getInfoComponent
Description copied from class:LayerGets 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:
getInfoComponentin classLayer- Returns:
- Either a String or a
Componentdescribing the layer.
-
getMenuEntries
Description copied from class:LayerReturns 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.INSTANCEinstead of new JSeparator- Specified by:
getMenuEntriesin classLayer- Returns:
- menu actions for this layer
-
paint
Description copied from interface:MapViewPaintablePaint the dataset using the engine set.- Parameters:
g- Graphicsmv- The object that can translate GeoPoints to screen coordinates.bbox- Bounding box
-
createMapViewPainter
Description copied from class:AbstractMapViewPaintableCreates a new LayerPainter.- Overrides:
createMapViewPainterin classAbstractMapViewPaintable- Parameters:
event- The event that triggered the creation.- Returns:
- The painter.
-