Package org.openstreetmap.josm.data.gpx
Interface IGpxTrack
-
- All Superinterfaces:
IWithAttributes
- All Known Implementing Classes:
GpxTrack
public interface IGpxTrack extends IWithAttributes
Gpx track. Implementations don't have to be immutable, but should always be thread safe.- Since:
- 15496
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IGpxTrack.GpxTrackChangeEvent
A track change event for the current track.static interface
IGpxTrack.GpxTrackChangeListener
A listener that listens to GPX track changes.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addListener(IGpxTrack.GpxTrackChangeListener l)
Add a listener that listens to changes in the GPX track.Bounds
getBounds()
Returns the track bounds.default java.awt.Color
getColor()
Gets the color of this track.java.util.Collection<IGpxTrackSegment>
getSegments()
Returns the track segments.double
length()
Returns the track length.default void
removeListener(IGpxTrack.GpxTrackChangeListener l)
Remove a listener that listens to changes in the GPX track.default void
setColor(java.awt.Color color)
Sets the color of this track.-
Methods inherited from interface org.openstreetmap.josm.data.gpx.IWithAttributes
get, getAttributes, getCollection, getExtensions, getString, hasExtensions, put
-
-
-
-
Method Detail
-
getSegments
java.util.Collection<IGpxTrackSegment> getSegments()
Returns the track segments.- Returns:
- the track segments
-
length
double length()
Returns the track length.- Returns:
- the track length
-
getColor
default java.awt.Color getColor()
Gets the color of this track.- Returns:
- The color,
null
if not set or not supported by the implementation. - Since:
- 15496
-
setColor
default void setColor(java.awt.Color color)
Sets the color of this track. Not necessarily supported by all implementations.- Parameters:
color
- color of this track- Since:
- 15496
-
addListener
default void addListener(IGpxTrack.GpxTrackChangeListener l)
Add a listener that listens to changes in the GPX track.- Parameters:
l
- The listener
-
removeListener
default void removeListener(IGpxTrack.GpxTrackChangeListener l)
Remove a listener that listens to changes in the GPX track.- Parameters:
l
- The listener
-
-