Class AudioMarker
java.lang.Object
org.openstreetmap.josm.gui.layer.markerlayer.Marker
org.openstreetmap.josm.gui.layer.markerlayer.ButtonMarker
org.openstreetmap.josm.gui.layer.markerlayer.AudioMarker
- All Implemented Interfaces:
ILatLon,IQuadBucketType,Destroyable,TemplateEngineDataProvider
Marker class with audio playback capability.
-
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.gui.layer.markerlayer.Marker
LABEL_PATTERN_AUTO, LABEL_PATTERN_DESC, LABEL_PATTERN_NAME, MARKER_FORMATTED_OFFSET, MARKER_OFFSET, offset, parentLayer, symbol, timeFields inherited from interface org.openstreetmap.josm.data.coor.ILatLon
MAX_SERVER_PRECISION -
Constructor Summary
ConstructorsConstructorDescriptionAudioMarker(LatLon ll, TemplateEngineDataProvider dataProvider, URL audioUrl, MarkerLayer parentLayer, double time, double offset) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the mouse is clicked in the marker's hotspot.voidadjustOffset(double adjustment) Convert Marker to WayPoint so it can be exported to a GPX file.protected Stringvoidplay()Starts playing the audio associated with the marker: used in response to pressing the marker as well as indirectlyvoidplay(double after) Starts playing the audio associated with the marker offset by the given amountstatic AudioMarkerReturns the marker played the most recently, if any.(package private) static voidForgets the marker played the most recently, if any.doubleurl()Methods inherited from class org.openstreetmap.josm.gui.layer.markerlayer.ButtonMarker
containsPoint, paintMethods inherited from class org.openstreetmap.josm.gui.layer.markerlayer.Marker
appendMarkerProducer, createMarkers, destroy, evaluateCondition, getBBox, getCoor, getTemplateKeys, getTemplateValue, getText, isErroneous, lat, lon, paintIcon, prependMarkerProducer, setCoor, setEastNorth, setErroneous, updateTextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.data.coor.ILatLon
bearing, distanceSq, distanceSq, equalsEpsilon, equalsEpsilon, getEastNorth, greatCircleDistance, interpolate, isLatLonKnown
-
Field Details
-
audioUrl
-
recentlyPlayedMarker
-
syncOffset
-
timeFromAudio
-
-
Constructor Details
-
AudioMarker
public AudioMarker(LatLon ll, TemplateEngineDataProvider dataProvider, URL audioUrl, MarkerLayer parentLayer, double time, double offset)
-
-
Method Details
-
actionPerformed
Description copied from class:MarkerCalled when the mouse is clicked in the marker's hotspot. Never called for markers which always return false from containsPoint.- Overrides:
actionPerformedin classMarker- Parameters:
ev- A dummy ActionEvent
-
recentlyPlayedMarker
Returns the marker played the most recently, if any.- Returns:
- the marker played the most recently, or
null
-
resetRecentlyPlayedMarker
Forgets the marker played the most recently, if any. -
url
-
play
Starts playing the audio associated with the marker offset by the given amount- Parameters:
after- : seconds after marker where playing should start
-
play
Starts playing the audio associated with the marker: used in response to pressing the marker as well as indirectly -
adjustOffset
-
syncOffset
-
getTextTemplateKey
- Overrides:
getTextTemplateKeyin classMarker
-
convertToWayPoint
Description copied from class:MarkerConvert Marker to WayPoint so it can be exported to a GPX file. Override in subclasses to add all necessary attributes.- Overrides:
convertToWayPointin classMarker- Returns:
- the corresponding WayPoint with all relevant attributes
-