|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object View de.monarchy.guideme.view.FlatArrow
public class FlatArrow
This view represents an arrow indicating the direction the user has to turn to. The arrow is only displayed when a route has been set. It has two color indicators, one for the distance to the destination, one for the distance to the next route point. The first is the fill color of the arrow, the latter is the border color. The arrow reacts to both orientation and position changes and calculates the next route point autonomously.
Method Summary | |
---|---|
static FlatArrow |
getInstance(Context context)
Returns an instance of the FlatArrow. |
GeoCoordinate |
getLocation()
Returns the current location of the arrow. |
void |
onDraw(Canvas c)
|
void |
removeRoute()
Removes the route. |
void |
setLocation(GeoCoordinate location)
Sets the location and redraws. |
void |
setOrientation(float angle)
Sets a new oritentation. |
void |
setRoute(RoutePoint[] way)
Sets a new route to the arrow. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FlatArrow getInstance(Context context)
context
- application context
public void onDraw(Canvas c)
public GeoCoordinate getLocation()
public void setLocation(GeoCoordinate location)
location
- new locationpublic void setRoute(RoutePoint[] way)
way
- new routepublic void removeRoute()
public void setOrientation(float angle)
angle
- new orientation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |