com.partnersoft.maps.ephemera
Class PointStyleRotation

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

public class PointStyleRotation
extends PointStyleEphemeron

Handles rotating a point style.

Copyright 2008 Paul Reavis

Author:
Rich Stepanski

Field Summary
protected  XyPoint anchor
           
protected  MapApp app
           
 
Fields inherited from class com.partnersoft.maps.ephemera.PointStyleEphemeron
isPixels, mapset, offsetX, offsetY, pointStyle, rotation, snapGridSize
 
Constructor Summary
PointStyleRotation(MapApp app, MapSet mapset, XyPoint anchor, java.lang.String pointStyle)
          Creates ephemeron that rotates passed pointstyle to match mouse.
 
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 com.partnersoft.maps.ephemera.PointStyleEphemeron
setSnapGridSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

anchor

protected XyPoint anchor

app

protected MapApp app
Constructor Detail

PointStyleRotation

public PointStyleRotation(MapApp app,
                          MapSet mapset,
                          XyPoint anchor,
                          java.lang.String pointStyle)
Creates ephemeron that rotates passed pointstyle to match mouse.

Parameters:
app - - Current MapApp, used to grab wheelmenu graphics.
mapset - - Mapset that passed pointstyle lives in.
anchor - - point to plant the point style (whats selected).
pointStyle - - name of pointstyle to draw.
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
Overrides:
draw in class PointStyleEphemeron