public class MarkerLayer extends Layer implements JumpToMarkerActions.JumpToMarkerLayer
| Modifier and Type | Class and Description |
|---|---|
private class |
MarkerLayer.MoveAudio |
static class |
MarkerLayer.ShowHideMarkerText |
private class |
MarkerLayer.SynchronizeAudio |
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerActionAbstractMapViewPaintable.CompatibilityModeLayerPainterMapViewPaintable.LayerPainter, MapViewPaintable.MapViewEvent, MapViewPaintable.PaintableInvalidationEvent, MapViewPaintable.PaintableInvalidationListener| Modifier and Type | Field and Description |
|---|---|
private static ColorProperty |
COLOR_PROPERTY |
private Marker |
currentMarker |
java.util.List<Marker> |
data
A list of markers.
|
private static java.awt.Color |
DEFAULT_COLOR |
GpxLayer |
fromLayer |
private boolean |
mousePressed |
AudioMarker |
syncAudioMarker |
FILTER_STATE_PROP, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP| Constructor and Description |
|---|
MarkerLayer(GpxData indata,
java.lang.String name,
java.io.File associatedFile,
GpxLayer fromLayer)
Constructs a new
MarkerLayer. |
| Modifier and Type | Method and Description |
|---|---|
AudioMarker |
addAudioMarker(double time,
LatLon coor) |
MapViewPaintable.LayerPainter |
attachToMapView(MapViewPaintable.MapViewEvent event)
This method is called whenever this layer is added to a map view.
|
private static Marker |
getAdjacentMarker(Marker startMarker,
boolean next,
Layer layer) |
protected ColorProperty |
getBaseColorProperty()
Gets the color property that stores the default color for this layer.
|
static java.awt.Color |
getGenericColor() |
javax.swing.Icon |
getIcon()
Return a static icon.
|
java.lang.Object |
getInfoComponent() |
javax.swing.Action[] |
getMenuEntries()
Returns list of actions.
|
java.lang.String |
getToolTipText() |
boolean |
isMergable(Layer other) |
private boolean |
isTextOrIconShown()
Get state of text display.
|
void |
jumpToNextMarker() |
void |
jumpToPreviousMarker() |
void |
mergeFrom(Layer from)
Merges the given layer into this layer.
|
void |
paint(java.awt.Graphics2D g,
MapView mv,
Bounds box)
Paint the dataset using the engine set.
|
private static void |
playAdjacentMarker(Marker startMarker,
boolean next) |
static void |
playAudio() |
static void |
playNextMarker() |
static void |
playPreviousMarker() |
boolean |
synchronizeAudioMarkers(AudioMarker startMarker) |
void |
visitBoundingBox(BoundingXYVisitor v) |
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColorProperty, getDefaultLayerPosition, getName, getOpacity, getViewProjectionBounds, hookUpMapView, isBackgroundLayer, isChanged, isInfoResizable, isProjectionSupported, isRenamed, isSavable, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible, toStringaddInvalidationListener, createMapViewPainter, invalidate, removeInvalidationListenerprivate boolean mousePressed
private Marker currentMarker
public AudioMarker syncAudioMarker
private static final java.awt.Color DEFAULT_COLOR
private static final ColorProperty COLOR_PROPERTY
public MarkerLayer(GpxData indata, java.lang.String name, java.io.File associatedFile, GpxLayer fromLayer)
MarkerLayer.indata - The GPX data for this layername - The marker layer nameassociatedFile - The associated GPX filefromLayer - The associated GPX layerpublic MapViewPaintable.LayerPainter attachToMapView(MapViewPaintable.MapViewEvent event)
AbstractMapViewPaintable
You need to return a painter here.
The MapViewPaintable.LayerPainter.detachFromMapView(org.openstreetmap.josm.gui.layer.MapViewPaintable.MapViewEvent) method is called when the layer is removed
from that map view. You are free to reuse painters.
You should always call the super method. See AbstractMapViewPaintable.createMapViewPainter(org.openstreetmap.josm.gui.layer.MapViewPaintable.MapViewEvent) if you want to influence painter creation.
This replaces Layer.hookUpMapView() in the long run.
attachToMapView in class AbstractMapViewPaintableevent - the event.public javax.swing.Icon getIcon()
protected ColorProperty getBaseColorProperty()
LayergetBaseColorProperty in class Layernull if this layer is not colored.public static java.awt.Color getGenericColor()
public void paint(java.awt.Graphics2D g, MapView mv, Bounds box)
MapViewPaintablepaint in interface MapViewPaintableg - Graphicsmv - The object that can translate GeoPoints to screen coordinates.box - Bounding boxpublic java.lang.String getToolTipText()
getToolTipText in class Layerpublic void mergeFrom(Layer from)
Layerpublic boolean isMergable(Layer other)
isMergable in class Layerother - The other layer that is tested to be mergable with this.public void visitBoundingBox(BoundingXYVisitor v)
visitBoundingBox in class Layerpublic java.lang.Object getInfoComponent()
getInfoComponent in class Layerpublic javax.swing.Action[] getMenuEntries()
LayerLayer.SeparatorLayerAction.INSTANCE instead of new JSeparatorgetMenuEntries in class Layerpublic boolean synchronizeAudioMarkers(AudioMarker startMarker)
public AudioMarker addAudioMarker(double time, LatLon coor)
public void jumpToNextMarker()
jumpToNextMarker in interface JumpToMarkerActions.JumpToMarkerLayerpublic void jumpToPreviousMarker()
jumpToPreviousMarker in interface JumpToMarkerActions.JumpToMarkerLayerpublic static void playAudio()
public static void playNextMarker()
public static void playPreviousMarker()
private static Marker getAdjacentMarker(Marker startMarker, boolean next, Layer layer)
private static void playAdjacentMarker(Marker startMarker, boolean next)
private boolean isTextOrIconShown()
true if text should be shown, false otherwise.