com.partnersoft.maps.ephemera
Class ScaleSnapshotEphemeron

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

public class ScaleSnapshotEphemeron
extends AbstractSnapshotEphemeron

Handles scaling ephemera for a snapshot

Copyright 2007 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Field Summary
 
Fields inherited from class com.partnersoft.maps.ephemera.AbstractSnapshotEphemeron
snapshot
 
Constructor Summary
ScaleSnapshotEphemeron(MapViewFrame snapshot, java.lang.String cornerName)
          Creates a new ScaleSnapshotEphemeron for a snapshot represented by the passed MapViewFrame
 
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.
protected  void mangleSnapshot(DrawingSurface surface, MapViewFrame frame, XyPoint mousePosition)
          Changes internal snapshot before each draw.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaleSnapshotEphemeron

public ScaleSnapshotEphemeron(MapViewFrame snapshot,
                              java.lang.String cornerName)
Creates a new ScaleSnapshotEphemeron for a snapshot represented by the passed MapViewFrame

Parameters:
snapshot - - MapViewFrame representing snapshot
Method Detail

mangleSnapshot

protected void mangleSnapshot(DrawingSurface surface,
                              MapViewFrame frame,
                              XyPoint mousePosition)
Description copied from class: AbstractSnapshotEphemeron
Changes internal snapshot before each draw.

Handles specific ephemera changes. Allows rotating,scaling, and moving ephemera to share draw code. Does not need to reset the MapViewFrame's transform.

Specified by:
mangleSnapshot in class AbstractSnapshotEphemeron

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 AbstractSnapshotEphemeron