com.partnersoft.maps.ephemera
Class RotatePointWithAngle

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

public class RotatePointWithAngle
extends java.lang.Object
implements Ephemeron

Rotational ephemeron, spinning an angle display as you move the mouse around an anchor point. With angle displayed as text on opposite side of mouse cursor from anchor.

Copyright 2007 Paul Reavis

Version:
$Id$
Author:
Rich Stepanski

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

RotatePointWithAngle

public RotatePointWithAngle(XyPoint anchor,
                            java.lang.String lineStyle,
                            java.lang.String textStyle)
Create a new RotatePointWithAngle object with the given anchor point. It will draw a rotation indicator as you move the mouse around the point using the given line style and write angle in given text style.

Parameters:
anchor - - vertex point
lineStyle - - line style to draw with
textStyle - - text style to write with

RotatePointWithAngle

public RotatePointWithAngle(XyPoint anchor)
Create a new RotatePointWithAngle object with the given anchor point. It will draw a rotation indicator as you move the mouse around the point using default 'rotation' style and write angle in default 'rotation' text style.

Parameters:
anchor - - vertex point
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