com.partnersoft.maps.model
Class RoverBundleBuilder

java.lang.Object
  extended by com.partnersoft.maps.model.RoverBundleBuilder

public class RoverBundleBuilder
extends java.lang.Object

Stateful builder for bundled (generally in-memory) rover map data.

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Constructor Summary
RoverBundleBuilder()
           
 
Method Summary
 void circle(double x, double y, double radius)
          Draws a circle at the given center with the given radius.
 void data(java.util.Map values)
          Sets fields in the current map data item.
 void data(java.lang.String fieldName, java.lang.Object value)
          Sets a field in the current map data item.
 void endItem()
          Ends the current map data item.
 void endPolyline()
          Ends the current polyline.
 void line(double x1, double y1, double x2, double y2)
          Adds a line (same as adding a single-segment polyline).
 void point(double x, double y)
          Adds a point, with offsets and rotation set to zero.
 void point(double x, double y, int offsetX, int offsetY, double rotation)
          Adds a point with a set offset and rotation.
 void rectangle(double xMin, double yMin, double xMax, double yMax)
          Draws a rectangle with the given bounds.
 void setDataType(java.lang.String newName)
          Explicitly sets the current data type name.
 void setDataTypeTemplate(java.lang.String newTemplate)
          Sets the data type name template.
 void setDefaultAlignment(java.lang.String newAlignment)
          Sets the default alignment for text.
 void setDefaultOffset(int offsetX, int offsetY)
          Sets the default pixel offset for points and text.
 void setDefaultRotation(double rotation)
          Sets the default rotation for points and text.
 void setGraphicType(java.lang.String newName)
          Explicitly sets the current graphic type name.
 void setGraphicTypeTemplate(java.lang.String newTemplate)
          Sets the style name template.
 void startItem()
          Begins a new map data item.
 void startPolyline()
          Starts a polyline.
 void text(double x, double y, int offsetX, int offsetY, double rotation, java.lang.String alignment, java.lang.String text)
          Adds text with offset, rotation, and alignment.
 void vertex(double x, double y)
          Adds a vertex to the current polyline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoverBundleBuilder

public RoverBundleBuilder()
Method Detail

startItem

public void startItem()
Begins a new map data item.


endItem

public void endItem()
Ends the current map data item.


data

public void data(java.lang.String fieldName,
                 java.lang.Object value)
Sets a field in the current map data item.


data

public void data(java.util.Map values)
Sets fields in the current map data item. The input is a Map whose keys are field names and values are, well, the field values.


setGraphicType

public void setGraphicType(java.lang.String newName)
Explicitly sets the current graphic type name.


setGraphicTypeTemplate

public void setGraphicTypeTemplate(java.lang.String newTemplate)
Sets the style name template. This is used to determine the graphic type name from data. This is overridden by setGraphicType().


setDataType

public void setDataType(java.lang.String newName)
Explicitly sets the current data type name.


setDataTypeTemplate

public void setDataTypeTemplate(java.lang.String newTemplate)
Sets the data type name template. This is used to determine the data type name from data. This is overridden by setDataType().


setDefaultOffset

public void setDefaultOffset(int offsetX,
                             int offsetY)
Sets the default pixel offset for points and text. This is used whenever it isn't specified.


setDefaultRotation

public void setDefaultRotation(double rotation)
Sets the default rotation for points and text. This is used whenever it isn't specified.


setDefaultAlignment

public void setDefaultAlignment(java.lang.String newAlignment)
Sets the default alignment for text. This is used whenever it isn't specified.


startPolyline

public void startPolyline()
Starts a polyline.


endPolyline

public void endPolyline()
Ends the current polyline.


vertex

public void vertex(double x,
                   double y)
Adds a vertex to the current polyline.


line

public void line(double x1,
                 double y1,
                 double x2,
                 double y2)
Adds a line (same as adding a single-segment polyline).


point

public void point(double x,
                  double y)
Adds a point, with offsets and rotation set to zero.


point

public void point(double x,
                  double y,
                  int offsetX,
                  int offsetY,
                  double rotation)
Adds a point with a set offset and rotation.


text

public void text(double x,
                 double y,
                 int offsetX,
                 int offsetY,
                 double rotation,
                 java.lang.String alignment,
                 java.lang.String text)
Adds text with offset, rotation, and alignment.


circle

public void circle(double x,
                   double y,
                   double radius)
Draws a circle at the given center with the given radius.


rectangle

public void rectangle(double xMin,
                      double yMin,
                      double xMax,
                      double yMax)
Draws a rectangle with the given bounds.