com.partnersoft.maps.ephemera
Class AbstractCollectionEphemeron

java.lang.Object
  extended by com.partnersoft.maps.ephemera.AbstractCollectionEphemeron
All Implemented Interfaces:
Ephemeron
Direct Known Subclasses:
CollectionMoveEphemeron, CollectionRotateRevolveEphemeron, CollectionScaleEphemeron

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

This class stores lines, points, and text so they all can be drawn in a single ephemera draw. A list of namings is stored for each line,point,and text. Each naming contains a style name, XyGeometry (XyPoint or XyPolyline), and rotation/text where applicable (Points and Text).

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Field Summary
protected  java.util.List<Naming> allLines
           
protected  java.util.List<Naming> allPoints
           
protected  java.util.List<Naming> allText
           
protected  MapApp app
           
protected  MapSet mapset
           
 
Constructor Summary
AbstractCollectionEphemeron(MapApp app, MapSet mapset)
          Base class for manipulating lines, text, and points.
 
Method Summary
 Naming addLine(java.lang.String lineStyle, XyPolyline line)
          Adds a line to be drawn.
 Naming addPoint(java.lang.String pointStyle, XyPoint point, XyDirection rotation)
          Adds a point to be drawn.
 Naming addText(java.lang.String textStyle, XyPoint point, XyDirection rotation, java.lang.String text)
          Adds text to be drawn.
abstract  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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allLines

protected java.util.List<Naming> allLines

allPoints

protected java.util.List<Naming> allPoints

allText

protected java.util.List<Naming> allText

app

protected MapApp app

mapset

protected MapSet mapset
Constructor Detail

AbstractCollectionEphemeron

public AbstractCollectionEphemeron(MapApp app,
                                   MapSet mapset)
Base class for manipulating lines, text, and points. Instantiates all internal Namings.

Method Detail

addLine

public Naming addLine(java.lang.String lineStyle,
                      XyPolyline line)
Adds a line to be drawn. Returns naming storing this line.

Parameters:
lineStyle - - name of style to be drawn.
line - - XyPolyline to draw.
Returns:
Naming of line data.

addPoint

public Naming addPoint(java.lang.String pointStyle,
                       XyPoint point,
                       XyDirection rotation)
Adds a point to be drawn. Returns Naming storing this point.

Parameters:
pointStyle - - name of style to be drawn.
point - - XyPoint to draw.

addText

public Naming addText(java.lang.String textStyle,
                      XyPoint point,
                      XyDirection rotation,
                      java.lang.String text)
Adds text to be drawn. Returns Naming of text data.

Parameters:
textStyle - - name of style to be drawn.
point - - XyPoint to draw.
text - - String text to be drawn.
Returns:
Naming of text data.

draw

public abstract 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