com.partnersoft.maps.ephemera
Class CentroidMoveEphemeron

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

public class CentroidMoveEphemeron
extends PolylineEphemeron

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Field Summary
protected  XyPoint centroid
           
protected  XyPolyline original
           
 
Fields inherited from class com.partnersoft.maps.ephemera.PolylineEphemeron
app, lineStyle, mapset, polyline
 
Constructor Summary
CentroidMoveEphemeron(MapApp app, MapSet mapset, XyPolyline polyline, java.lang.String lineStyle)
          Handles displaying the movement of a polyline without mangling.
CentroidMoveEphemeron(MapApp app, MapSet mapset, XyPolyline polyline, java.lang.String lineStyle, XyPoint anchor)
          Handles displaying the movement of a polyline without mangling.
 
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

original

protected XyPolyline original

centroid

protected XyPoint centroid
Constructor Detail

CentroidMoveEphemeron

public CentroidMoveEphemeron(MapApp app,
                             MapSet mapset,
                             XyPolyline polyline,
                             java.lang.String lineStyle)
Handles displaying the movement of a polyline without mangling. Uses the line's centroid as comparison point for the move.

Parameters:
app - - valid app
mapset - - mapset given lineStyle lives in
polyline - - polyline to draw
lineStyle - - lineStyle name

CentroidMoveEphemeron

public CentroidMoveEphemeron(MapApp app,
                             MapSet mapset,
                             XyPolyline polyline,
                             java.lang.String lineStyle,
                             XyPoint anchor)
Handles displaying the movement of a polyline without mangling. Uses the passed point as comparison point for the move.

Parameters:
app - - valid app
mapset - - mapset given lineStyle lives in
polyline - - polyline to draw
lineStyle - - lineStyle name
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