com.partnersoft.maps.ephemera
Class CollectionScaleEphemeron

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

public class CollectionScaleEphemeron
extends AbstractCollectionEphemeron

Handles Ephemeron for scaling a stationary collection of lines,points,and texts. Scaling is done from the passed centroid, and for each line.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Field Summary
 
Fields inherited from class com.partnersoft.maps.ephemera.AbstractCollectionEphemeron
allLines, allPoints, allText, app, mapset
 
Constructor Summary
CollectionScaleEphemeron(MapApp app, MapSet mapset, XyPoint origCentroid, XyPoint origMouse, double pixelBuffer)
          Creates a new empty CollectionScaleEphemeron.
 
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.AbstractCollectionEphemeron
addLine, addPoint, addText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionScaleEphemeron

public CollectionScaleEphemeron(MapApp app,
                                MapSet mapset,
                                XyPoint origCentroid,
                                XyPoint origMouse,
                                double pixelBuffer)
Creates a new empty CollectionScaleEphemeron. Distance between origCentroid and origMouse is compared to the current mouse and origCentroid each draw to determine the new scale.

Parameters:
app - - Valid app.
mapset - - Mapset containing styles to be drawn.
origCentroid - - Point to use to find scale.
origMouse - - Other point used to find scale.
pixelBuffer - - Distance in pixels that will be added to the origCentroid, Allows decreasing scales when origMouse and origCentroid are the same 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
Specified by:
draw in class AbstractCollectionEphemeron