Xoetrope

 Wiki : XRoutePlotter

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Carousel logo

XRoutePlotter

class com.xoetrope.svg.XRoutePlotter

A pop-up window which can be added to a component to display textual information.

1. Constructor


public XRoutePlotter( XSvgImageMap imageMap, ArrayList waypoints )

Constructor which takes a XSvgImageMap instance and an ArrayList of Waypoint objects and plots a route within the SVG image.

2. Methods


1. plotRoute

public boolean plotRoute( int startWaypoint, int destinationWaypoint )

Plots a route within the SVG image, if there is a route, from the start waypoint to the destination waypoint. The integer values specify the waypoint indexes within the ArrayList.

2. shortestPath

private ArrayList shortestPath( XWaypoint start, XWaypoint goal )

A shortest path algorithm which computes the shortest path from the start waypoint to the goal waypoint. This method is called by the plotRoute method to compute the shortest path between the two specified waypoints.

3. undoRoute

public void undoRoute()

Removes the currently plotted route from the SVG image.

4. getRouteRect

public Rectangle2D.Double getRouteRect()

Returns the bounding rect of the currently plotted route.

There are no comments on this page. [Add comment]

Page was generated in 0.6035 seconds