|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.gui.layer.markerlayer.Marker
org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker
public class PlayHeadMarker
Singleton marker class to track position of audio.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.layer.markerlayer.Marker |
---|
Marker.TemplateEntryProperty |
Field Summary | |
---|---|
private double |
animationInterval
|
private int |
dropTolerance
|
private boolean |
enabled
|
private LatLon |
oldCoor
|
private MapMode |
oldMode
|
private static PlayHeadMarker |
playHead
|
private javax.swing.Timer |
timer
|
private boolean |
wasPlaying
|
Fields inherited from class org.openstreetmap.josm.gui.layer.markerlayer.Marker |
---|
LABEL_PATTERN_AUTO, LABEL_PATTERN_DESC, LABEL_PATTERN_NAME, MARKER_FORMATTED_OFFSET, MARKER_OFFSET, markerProducers, offset, parentLayer, symbol, time |
Constructor Summary | |
---|---|
private |
PlayHeadMarker()
|
Method Summary | |
---|---|
void |
animate()
|
boolean |
containsPoint(java.awt.Point p)
Checks whether the marker display area contains the given point. |
static PlayHeadMarker |
create()
|
void |
drag(EastNorth en)
apply the new position resulting from a drag in progress |
private void |
endDrag(boolean reset)
reinstate the old map mode after switching temporarily to do a play head drag |
void |
paint(java.awt.Graphics g,
MapView mv)
|
void |
reposition(EastNorth en)
reposition the play head at the point on the track nearest position given, providing we are within reasonable distance from the track; otherwise reset to the original position. |
void |
startDrag()
called back from drag mode to say when we started dragging for real (at least a short distance) |
void |
synchronize(EastNorth en)
Synchronize the audio at the position where the play head was paused before dragging with the position on the track where it was dropped. |
void |
timerAction()
callback for moving play head marker according to audio player position |
Methods inherited from class org.openstreetmap.josm.gui.layer.markerlayer.Marker |
---|
actionPerformed, createMarker, evaluateCondition, getCoor, getEastNorth, getTemplateKeys, getTemplateValue, getText, getTextTemplate, paint, setCoor, setEastNorth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.swing.Timer timer
private double animationInterval
private static PlayHeadMarker playHead
private MapMode oldMode
private LatLon oldCoor
private boolean enabled
private boolean wasPlaying
private int dropTolerance
Constructor Detail |
---|
private PlayHeadMarker()
Method Detail |
---|
public static PlayHeadMarker create()
public boolean containsPoint(java.awt.Point p)
Marker
containsPoint
in class Marker
p
- The point to check
true
if the marker "hotspot" contains the point.public void startDrag()
private void endDrag(boolean reset)
public void drag(EastNorth en)
en
- the new position in map termspublic void reposition(EastNorth en)
en
- the position to start looking frompublic void synchronize(EastNorth en)
en
- : the EastNorth end point of the dragpublic void paint(java.awt.Graphics g, MapView mv)
public void animate()
public void timerAction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |