com.partnersoft.maps.ephemera
Class AbstractSnapshotEphemeron

java.lang.Object
  extended by com.partnersoft.maps.ephemera.AbstractSnapshotEphemeron
All Implemented Interfaces:
Ephemeron
Direct Known Subclasses:
MoveSnapshotEphemeron, RotateSnapshotEphemeron, ScaleSnapshotEphemeron

public abstract class AbstractSnapshotEphemeron
extends java.lang.Object
implements Ephemeron

Abstract SnapshotEphemeron handles drawing a snapshot. Allows extending classes to over-ride mangleSnapshot for any specific case.

Copyright 2007 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Field Summary
protected  MapViewFrame snapshot
           
 
Constructor Summary
AbstractSnapshotEphemeron(MapViewFrame snapshot)
          Creates a new SnapshotEphemeron (only called to create extending classes).
 
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 abstract  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
 

Field Detail

snapshot

protected MapViewFrame snapshot
Constructor Detail

AbstractSnapshotEphemeron

public AbstractSnapshotEphemeron(MapViewFrame snapshot)
Creates a new SnapshotEphemeron (only called to create extending classes).

Method Detail

mangleSnapshot

protected abstract void mangleSnapshot(DrawingSurface surface,
                                       MapViewFrame frame,
                                       XyPoint mousePosition)
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.


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