com.partnersoft.maps.ephemera
Class StretchFromPointsWithDistance

java.lang.Object
  extended by com.partnersoft.maps.ephemera.StretchFromPointsWithDistance
All Implemented Interfaces:
Ephemeron

public class StretchFromPointsWithDistance
extends java.lang.Object
implements Ephemeron

Rubber-banding ephemeron, draws lines stretching between one or more anchor points and the current mouse position. The distance of each line is drawn on the opposite side of each anchor point from the mouse. Useful when moving a vertex inside a polyline or within a tree or mesh.

Copyright 2007 Paul Reavis

Version:
$Id$
Author:
Rich Stepanski

Constructor Summary
StretchFromPointsWithDistance(java.lang.String lineStyle, java.lang.String textStyle, java.util.Collection<XyPoint> anchors)
           
StretchFromPointsWithDistance(java.lang.String lineStyle, java.lang.String textStyle, XyPoint... anchors)
           
 
Method Summary
 void draw(DrawingSurface surface, MapViewFrame frame, XyPoint mousePosition)
          Draw appropriate graphics on the given surface with the given frame, mouse position, and any implementation-specific internal state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StretchFromPointsWithDistance

public StretchFromPointsWithDistance(java.lang.String lineStyle,
                                     java.lang.String textStyle,
                                     XyPoint... anchors)

StretchFromPointsWithDistance

public StretchFromPointsWithDistance(java.lang.String lineStyle,
                                     java.lang.String textStyle,
                                     java.util.Collection<XyPoint> anchors)
Method Detail

draw

public void draw(DrawingSurface surface,
                 MapViewFrame frame,
                 XyPoint mousePosition)
Description copied from interface: Ephemeron
Draw appropriate graphics on the given surface with the given frame, mouse position, and any implementation-specific internal state. The drawing surface is set up with the given frame, and is in map coordinates (not pixels).

Specified by:
draw in interface Ephemeron