com.partnersoft.maps.ephemera
Class PointStyleEphemeron

java.lang.Object
  extended by com.partnersoft.maps.ephemera.PointStyleEphemeron
All Implemented Interfaces:
Ephemeron
Direct Known Subclasses:
PointStyleRotation, RelativePointStyleEphemeron

public class PointStyleEphemeron
extends java.lang.Object
implements Ephemeron

Ephemeron for displaying a point style at the mouse location. Copyright 2008 Paul Reavis

Version:
$Id$
Author:
Rich Stepanski

Field Summary
protected  boolean isPixels
           
protected  MapSet mapset
           
protected  int offsetX
           
protected  int offsetY
           
protected  java.lang.String pointStyle
           
protected  int rotation
           
protected  double snapGridSize
           
 
Constructor Summary
PointStyleEphemeron(MapSet mapset, java.lang.String pointStyle, int rotation)
          Draws pointstyle at mouse position with given rotation between 0-255.
PointStyleEphemeron(MapSet mapset, java.lang.String pointStyle, int rotation, int offsetX, int offsetY)
          Draws pointstyle at mouse position with given rotation between 0-255.
PointStyleEphemeron(MapSet mapset, java.lang.String pointStyle, int rotation, int offsetX, int offsetY, boolean isPixels)
          Draws pointstyle at mouse position with given rotation between 0-255.
 
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.
 void setSnapGridSize(double newSnapGridSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapset

protected MapSet mapset

pointStyle

protected java.lang.String pointStyle

rotation

protected int rotation

offsetX

protected int offsetX

offsetY

protected int offsetY

isPixels

protected boolean isPixels

snapGridSize

protected double snapGridSize
Constructor Detail

PointStyleEphemeron

public PointStyleEphemeron(MapSet mapset,
                           java.lang.String pointStyle,
                           int rotation,
                           int offsetX,
                           int offsetY)
Draws pointstyle at mouse position with given rotation between 0-255. Pointstyle must live in passed mapset.

Parameters:
mapset - - mapset containing pointstyle.
pointStyle - - name of pointstyle to draw.
rotation - - rotation between 0-255.
offsetX - - pixels to offset X.
offsetY - - pixels units to offset Y.

PointStyleEphemeron

public PointStyleEphemeron(MapSet mapset,
                           java.lang.String pointStyle,
                           int rotation,
                           int offsetX,
                           int offsetY,
                           boolean isPixels)
Draws pointstyle at mouse position with given rotation between 0-255. Pointstyle must live in passed mapset.

Parameters:
mapset - - mapset containing pointstyle.
pointStyle - - name of pointstyle to draw.
rotation - - rotation between 0-255.
offsetX - - units to offset X.
offsetY - - units to offset Y.
isPixels - - T/F to use offset as pixels. True being use as pixels.

PointStyleEphemeron

public PointStyleEphemeron(MapSet mapset,
                           java.lang.String pointStyle,
                           int rotation)
Draws pointstyle at mouse position with given rotation between 0-255. Pointstyle must live in passed mapset.

Parameters:
mapset - - mapset containing pointstyle.
pointStyle - - name of pointstyle to draw.
rotation - - rotation between 0-255.
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

setSnapGridSize

public void setSnapGridSize(double newSnapGridSize)