|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.svg.RoutePlotter
public class RoutePlotter
Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
$Revision: 1.2 $
| Field Summary | |
|---|---|
protected Circle |
circle
|
protected Circle |
circle2
|
protected SvgImageMap |
imageMap
|
protected java.util.ArrayList |
lines
|
protected Path |
route
|
protected java.util.ArrayList |
routeWaypoints
|
protected java.util.ArrayList |
waypointFlags
|
protected java.util.ArrayList |
waypoints
|
| Constructor Summary | |
|---|---|
RoutePlotter(SvgImageMap imageMap,
java.util.ArrayList waypoints)
Creates a new instance of RoutePlotter Used to plot a route on the svg map. |
|
| Method Summary | |
|---|---|
java.awt.geom.Rectangle2D.Double |
getRouteRect()
Returns the bounding rectangle of the currently drawn route. |
boolean |
plotRoute(int startWaypoint,
int destinationWaypoint)
Plots a route from the current location to the selected waypoint. |
void |
undoRoute()
Remove the currently drawn route from the svg image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SvgImageMap imageMap
protected java.util.ArrayList waypoints
protected java.util.ArrayList routeWaypoints
protected java.util.ArrayList waypointFlags
protected java.util.ArrayList lines
protected Path route
protected Circle circle
protected Circle circle2
| Constructor Detail |
|---|
public RoutePlotter(SvgImageMap imageMap,
java.util.ArrayList waypoints)
imageMap - the SvgImageMap instance that the routes will be plotted on.waypoints - an ArrayList of waypoints used to construct routes.| Method Detail |
|---|
public boolean plotRoute(int startWaypoint,
int destinationWaypoint)
startWaypoint - an int specifying the the index of the starting waypoint.destinationWaypoint - an int specifying the the index of the destination waypoint.
- Returns:
- a boolean stating whether a route can be plotted or not.
public void undoRoute()
public java.awt.geom.Rectangle2D.Double getRouteRect()
Rectangle2D.Double which bounds the current route.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||