public class TrackDetails
extends java.lang.Object
implements android.content.SharedPreferences.OnSharedPreferenceChangeListener
Modifier and Type | Class and Description |
---|---|
static class |
TrackDetails.Style
Enumeration desired styles, note must match Polyline BASIC_LINE_STYLE_*
|
Constructor and Description |
---|
TrackDetails(MapView mapView,
TrackPolyline track) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Cleans up the track.
|
boolean |
equals(java.lang.Object o) |
boolean |
equals(TrackDetails c) |
double |
getAvgSpeed()
Get the average speed
|
java.lang.String |
getAvgSpeedString(int units) |
static int |
getBasicStyle(java.lang.String lineStyle) |
static int |
getBasicStyle(TrackPolyline trackPolyline)
Get String basic style from the line's "linestyle"
|
int |
getColor() |
int |
getCount() |
double |
getDistanceDouble() |
static java.lang.String |
getDistanceString(double dist,
int units) |
java.lang.String |
getDistanceString(int units) |
GeoPointMetaData |
getEndPoint() |
double |
getGain()
Returns the gain summation
|
java.lang.String |
getGainString() |
double |
getLoss()
Returns the positive loss summation
|
java.lang.String |
getLossString() |
GeoPointMetaData |
getMaxAlt() |
java.lang.String |
getMaxAltString() |
double |
getMaxSlope() |
java.lang.String |
getMaxSlopeString() |
double |
getMaxSpeed()
Get the max speed
|
GeoPointMetaData |
getMaxSpeedLocation() |
java.lang.String |
getMaxSpeedString(int units) |
GeoPointMetaData |
getMinAlt() |
java.lang.String |
getMinAltString() |
TrackPolyline |
getPolyline() |
GeoPointMetaData |
getStartPoint() |
long |
getStartTime() |
int |
getStyle() |
static java.lang.String |
getStyleLabel(TrackPolyline trackPolyline)
Get String label from the line's getBasicLineStyle()
|
java.lang.String |
getSummary() |
long |
getTimeElapsedLong() |
static long |
getTimeElapsedLong(TrackPolyline p) |
java.lang.String |
getTitle() |
int |
getTrackDbId() |
java.lang.String |
getTrackUID() |
java.lang.String |
getUserCallsign() |
java.lang.String |
getUserUID() |
boolean |
getVisible() |
int |
hashCode() |
boolean |
hasPoints() |
boolean |
isCurrentTrack()
True if this is the most recent track stored locally for the UID that own's this track
|
void |
onSharedPreferenceChanged(android.content.SharedPreferences sharedPreferences,
java.lang.String key) |
void |
removePolyline()
Remove the track from the map including its start and end markers
The start/end markers are removed in the onItemRemoved callback
|
void |
setAvgSpeed(double d) |
static void |
setBasicStyle(TrackPolyline p,
java.lang.String lineStyle) |
void |
setColor(int color,
android.content.Context context) |
void |
setGain(double d) |
void |
setLoss(double d) |
void |
setMaxAlt(GeoPointMetaData d) |
void |
setMaxSlope(double d) |
void |
setMaxSpeed(double d,
GeoPointMetaData point) |
void |
setMinAlt(GeoPointMetaData d) |
void |
setPolyline(TrackPolyline polyline) |
void |
setStyle(java.lang.String style,
android.content.Context context) |
void |
setStyle(TrackDetails.Style style,
android.content.Context context) |
void |
setTitle(java.lang.String title,
android.content.Context context) |
void |
setVisible(boolean visible) |
void |
showPolyline(MapGroup group)
Show this track on the map including its start and end markers
The start/end markers are added in the onItemAdded callback
|
java.lang.String |
toString() |
public TrackDetails(MapView mapView, TrackPolyline track)
public void onSharedPreferenceChanged(android.content.SharedPreferences sharedPreferences, java.lang.String key)
onSharedPreferenceChanged
in interface android.content.SharedPreferences.OnSharedPreferenceChangeListener
public boolean isCurrentTrack()
public void dispose()
public java.lang.String getTitle()
public void setTitle(java.lang.String title, android.content.Context context)
public boolean getVisible()
public void setVisible(boolean visible)
public int getColor()
public void setColor(int color, android.content.Context context)
public static void setBasicStyle(TrackPolyline p, java.lang.String lineStyle)
public static java.lang.String getStyleLabel(TrackPolyline trackPolyline)
trackPolyline
- the track polylinepublic static int getBasicStyle(TrackPolyline trackPolyline)
trackPolyline
- public static int getBasicStyle(java.lang.String lineStyle)
public int getStyle()
public void setStyle(java.lang.String style, android.content.Context context)
public void setStyle(TrackDetails.Style style, android.content.Context context)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(TrackDetails c)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getSummary()
public int getTrackDbId()
public long getStartTime()
public long getTimeElapsedLong()
public static long getTimeElapsedLong(TrackPolyline p)
public GeoPointMetaData getStartPoint()
public GeoPointMetaData getEndPoint()
public double getDistanceDouble()
public static java.lang.String getDistanceString(double dist, int units)
public java.lang.String getDistanceString(int units)
public java.lang.String getTrackUID()
public java.lang.String getUserUID()
public java.lang.String getUserCallsign()
public java.lang.String toString()
toString
in class java.lang.Object
public TrackPolyline getPolyline()
public void setPolyline(TrackPolyline polyline)
public void showPolyline(MapGroup group)
group
- Map group to add the track topublic void removePolyline()
public int getCount()
public boolean hasPoints()
public void setMaxSlope(double d)
public double getMaxSlope()
public java.lang.String getMaxSlopeString()
public void setGain(double d)
public double getGain()
public java.lang.String getGainString()
public void setLoss(double d)
public double getLoss()
public java.lang.String getLossString()
public void setMinAlt(GeoPointMetaData d)
public GeoPointMetaData getMinAlt()
public java.lang.String getMinAltString()
public void setMaxAlt(GeoPointMetaData d)
public GeoPointMetaData getMaxAlt()
public java.lang.String getMaxAltString()
public void setMaxSpeed(double d, GeoPointMetaData point)
public double getMaxSpeed()
public GeoPointMetaData getMaxSpeedLocation()
public java.lang.String getMaxSpeedString(int units)
public void setAvgSpeed(double d)
public double getAvgSpeed()
public java.lang.String getAvgSpeedString(int units)