com.partnersoft.maps.ephemera
Class CentroidPixelMoveEphemeron

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

public class CentroidPixelMoveEphemeron
extends PolylineEphemeron

Similar to CentroidMoveEphemeron, this class handles moving the passed polyline in it's entirety. However, this class treats the passed polyline as a set of pixel coordinates, not map space coordinates. Each coordinate is multipled by the current scale during draw and added to the mouse's current position.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Field Summary
protected  XyPolyline originalLine
           
 
Fields inherited from class com.partnersoft.maps.ephemera.PolylineEphemeron
app, lineStyle, mapset, polyline
 
Constructor Summary
CentroidPixelMoveEphemeron(MapApp app, MapSet mapset, XyPolyline polyline, java.lang.String lineStyle)
          Creates a new CentroidPixelMoveEphemeron.
 
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.PolylineEphemeron
getPolyline, setPolyline
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

originalLine

protected XyPolyline originalLine
Constructor Detail

CentroidPixelMoveEphemeron

public CentroidPixelMoveEphemeron(MapApp app,
                                  MapSet mapset,
                                  XyPolyline polyline,
                                  java.lang.String lineStyle)
Creates a new CentroidPixelMoveEphemeron.

Parameters:
app - - Valid app.
mapset - - Mapset containing styles to draw.
polyline - - Polyline in pixel coordinates.
lineStyle - - Style name to use.
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 PolylineEphemeron