com.partnersoft.maps.ephemera
Class StretchFromPoint

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

public class StretchFromPoint
extends java.lang.Object
implements Ephemeron

Rubber-banding ephemeron, draws a line stretching between some anchor point and the current mouse position. Useful when adding or moving vertices of a polyline.

Copyright 2007 Paul Reavis

Version:
$Id: StretchFromPoint.java 1582 2008-10-29 15:02:37Z paul $
Author:
Paul Reavis

Constructor Summary
StretchFromPoint(XyPoint anchor)
          Create a new StretchFromPoint object with the given anchor point.
StretchFromPoint(XyPoint anchor, java.lang.String lineStyleName)
          Create a new StretchFromPoint object with the given anchor point.
 
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

StretchFromPoint

public StretchFromPoint(XyPoint anchor,
                        java.lang.String lineStyleName)
Create a new StretchFromPoint object with the given anchor point. It will draw a stretchy line between the anchor and the current mouse position.


StretchFromPoint

public StretchFromPoint(XyPoint anchor)
Create a new StretchFromPoint object with the given anchor point. It will draw a stretchy line between the anchor and the current mouse position.

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