public class AudioMarker extends ButtonMarker
Modifier and Type | Field and Description |
---|---|
private java.net.URL |
audioUrl |
private static AudioMarker |
recentlyPlayedMarker |
double |
syncOffset |
boolean |
timeFromAudio |
LABEL_PATTERN_AUTO, LABEL_PATTERN_DESC, LABEL_PATTERN_NAME, MARKER_FORMATTED_OFFSET, MARKER_OFFSET, offset, parentLayer, symbol, time
Constructor and Description |
---|
AudioMarker(LatLon ll,
TemplateEngineDataProvider dataProvider,
java.net.URL audioUrl,
MarkerLayer parentLayer,
double time,
double offset) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
Called when the mouse is clicked in the marker's hotspot.
|
void |
adjustOffset(double adjustment) |
WayPoint |
convertToWayPoint()
Convert Marker to WayPoint so it can be exported to a GPX file.
|
protected java.lang.String |
getTextTemplateKey() |
void |
play()
Starts playing the audio associated with the marker: used in response to pressing
the marker as well as indirectly
|
void |
play(double after)
Starts playing the audio associated with the marker offset by the given amount
|
static AudioMarker |
recentlyPlayedMarker()
Returns the marker played the most recently, if any.
|
(package private) static void |
resetRecentlyPlayedMarker()
Forgets the marker played the most recently, if any.
|
double |
syncOffset() |
java.net.URL |
url() |
containsPoint, paint
appendMarkerProducer, createMarkers, evaluateCondition, getCoor, getTemplateKeys, getTemplateValue, getText, isErroneous, lat, lon, paintIcon, prependMarkerProducer, setCoor, setEastNorth, setErroneous, updateText
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEastNorth, isLatLonKnown
private final java.net.URL audioUrl
private static volatile AudioMarker recentlyPlayedMarker
public double syncOffset
public boolean timeFromAudio
public AudioMarker(LatLon ll, TemplateEngineDataProvider dataProvider, java.net.URL audioUrl, MarkerLayer parentLayer, double time, double offset)
public void actionPerformed(java.awt.event.ActionEvent ev)
Marker
actionPerformed
in class Marker
ev
- A dummy ActionEventpublic static AudioMarker recentlyPlayedMarker()
null
static void resetRecentlyPlayedMarker()
public java.net.URL url()
public void play(double after)
after
- : seconds after marker where playing should startpublic void play()
public void adjustOffset(double adjustment)
public double syncOffset()
protected java.lang.String getTextTemplateKey()
getTextTemplateKey
in class Marker
public WayPoint convertToWayPoint()
Marker
convertToWayPoint
in class Marker