com.bbn.openmap.omGraphics
Class OMArc

java.lang.Object
  extended by com.bbn.openmap.omGraphics.geom.BasicGeometry
      extended by com.bbn.openmap.omGraphics.OMGraphicAdapter
          extended by com.bbn.openmap.omGraphics.OMArc
All Implemented Interfaces:
OMGeometry, OMGraphic, OMGraphicConstants, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
OMCircle

public class OMArc
extends OMGraphicAdapter
implements OMGraphic

Graphic object that represents an arc.

NOTE:

See the RESTRICTIONS on Lat/Lon polygons/polylines which apply to arcs as well. Not following the guidelines listed may result in ambiguous/undefined shapes! Similar assumptions apply to the other vector graphics that we define: polys, rects, lines.

These assumptions are virtually the same as those on the more generic OMPoly graphic type.

See Also:
OMPoly, Serialized Form

Field Summary
protected  int arcType
          For Arcs, how the arc should be closed when rendered.
protected  java.awt.geom.Point2D center
          Center point.
protected  double extent
          The angular extent of the arc in decimal degrees.
protected  double height
          The pixel vertical diameter of the arc.
protected  int nverts
          Number of vertices to draw for lat/lon poly-arcs.
protected  double off_x
          Horizontal pixel offset.
protected  double off_y
          Vertical pixel offset.
protected  double radius
          Radius of arc in radians.
protected  double rotationAngle
          The angle by which the circle/ellipse is to be rotated, in radians
protected  double start
          The starting angle of the arc in decimal degrees.
protected  double width
          The pixel horizontal diameter of the arc.
protected  double x1
          Horizontal pixel location of the center.
protected  double y1
          Vertical pixel location of the center.
 
Fields inherited from class com.bbn.openmap.omGraphics.OMGraphicAdapter
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask
 
Fields inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
attributes, lineType, needToRegenerate, shape, visible
 
Fields inherited from interface com.bbn.openmap.omGraphics.OMGraphicConstants
ADD_GRAPHIC_MASK, APP_OBJECT, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INDEX, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, NO_ROTATE, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK, UPDATED
 
Constructor Summary
OMArc()
          The simplest constructor for an OMArc, and it expects that all fields will be filled in later.
OMArc(double latPoint, double lonPoint, double radius, double s, double e)
          Creates an OMArc with a Lat-lon center and a lat-lon axis.
OMArc(double latPoint, double lonPoint, double radius, Length units, double s, double e)
          Create an OMArc with a lat/lon center and a physical distance radius.
OMArc(double latPoint, double lonPoint, double radius, Length units, int nverts, double s, double e)
          Create an OMArc with a lat/lon center and a physical distance radius.
OMArc(double latPoint, double lonPoint, int w, int h, double s, double e)
          Create an OMArc, positioned with a lat-lon center and x-y axis.
OMArc(double latPoint, double lonPoint, int offset_x1, int offset_y1, int w, int h, double s, double e)
          Create a OMArc, positioned at a Lat-lon location, x-y offset, x-y axis.
OMArc(int x1, int y1, int w, int h, double s, double e)
          Create a OMArc, positioned with a x-y center with x-y axis.
OMArc(LatLonPoint center, double radius, Length units, int nverts, double s, double e)
          Create an OMArc with a lat/lon center and a physical distance radius.
 
Method Summary
 java.lang.Object clone()
          Generic return of SinkGraphic for subclasses that don't implement clone properly.
protected  java.awt.Shape createArcShape(double x, double y, double fwidth, double fheight)
          An internal method designed to fetch the Shape to be used for an XY or OFFSET OMArc.
 boolean generate(Projection proj)
          Prepare the arc for rendering.
 int getArcType()
          Get the ArcType.
 java.awt.geom.Point2D getCenter()
          Get the center Point.
protected  java.util.ArrayList<float[]> getCoordLists(GeoProj proj, LatLonPoint center, double radius, int nverts)
          An internal method designed to fetch the ArrayList for LATLON OMArcs.
 double getExtentAngle()
          Get the extent angle of the arc.
 int getHeight()
          Get the vertical pixel diameter of the arc.
 LatLonPoint getLatLon()
          Get the center LatLonPoint.
 int getNumVerts()
          Get the number of vertices of the lat/lon arc.
 int getOffX()
          Get the x offset from the center.
 int getOffY()
          Get the y position of the center.
 boolean getPolarCorrection()
          Get the polar-fill-correction-flag.
 java.awt.geom.GeneralPath getPolarShapeLine()
          Return the java.awt.Shape (GeneralPath) that reflects a arc that encompasses a pole.
 double getRadius()
          Get the radius.
 double getRotationAngle()
          Get the current rotation of the arc.
 double getStartAngle()
          Get the starting angle of the arc.
 int getWidth()
          Get the horizontal pixel diameter of the arc.
 int getX()
          Get the x position of the center.
 int getY()
          Get the y position of the center.
 void render(java.awt.Graphics g)
          Paint the arc.
 void restore(OMGeometry source)
          Takes the generic OMGraphic settings from another OMGraphic and pushes them to this one.
 void setArcType(int type)
          Set the ArcType, either Arc2D.OPEN (default), Arc2D.PIE or Arc2D.CHORD.
 void setCenter(LatLonPoint p)
          Set the latitude and longitude of the center point.
 void setExtent(double value)
          Set the angular extent of the arc.
 void setHeight(int value)
          Set the vertical pixel diameter of the arc.
 void setLatLon(double lat, double lon)
          Set the latitude and longitude of the center point.
 void setNeedToRegenerate(boolean value)
          Sets the regenerate flag for the graphic.
 void setNumVerts(int nverts)
          Set the number of vertices of the lat/lon arc.
 void setOffX(int value)
          Set the x offset from the center.
 void setOffY(int value)
          Set the y offset from the center.
 void setPolarCorrection(boolean value)
          Set the polar-fill-correction-flag.
 void setRadius(double radius)
          Set the radius.
 void setRadius(double radius, Length units)
          Set the radius with units.
 void setRotationAngle(double angle)
          Set the angle by which the arc is to rotated.
 void setStart(double value)
          Set the starting angle the arc.
 void setWidth(int value)
          Set the horizontal pixel diameter of the arc.
 void setX(int value)
          Set the x position of the center.
 void setY(int value)
          Set the y position of the center.
protected  boolean shouldCenterBeInShape()
          Helper function that helps the generate method figure out if the center point should be in the generate shape - if it's not, the code knows that there is a problem with the poles, and the polar correction code needs to be run.
 
Methods inherited from class com.bbn.openmap.omGraphics.OMGraphicAdapter
deselect, distance, getDeclutterType, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, initLabelingDuringGenerate, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, readStroke, readTextureMask, regenerate, renderLabel, renderShape, select, setDeclutterType, setEdgeMatchesFill, setFillColor, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setHasLabel, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill, writeStroke, writeTextureMask
 
Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setShape, setVisible
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bbn.openmap.omGraphics.OMGraphic
deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getFillColor, getFillPaint, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, select, setDeclutterType, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill
 
Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry
clearAttributes, contains, distance, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setShape, setVisible
 

Field Detail

x1

protected double x1
Horizontal pixel location of the center.


y1

protected double y1
Vertical pixel location of the center.


off_x

protected double off_x
Horizontal pixel offset.


off_y

protected double off_y
Vertical pixel offset.


center

protected java.awt.geom.Point2D center
Center point.


radius

protected double radius
Radius of arc in radians. For LATLON arc. Note that the methods for this class use Decimal Degrees, or ask for a Length object to use for units. The radius is converted to radians for internal use.


width

protected double width
The pixel horizontal diameter of the arc. For XY and OFFSET arcs.


height

protected double height
The pixel vertical diameter of the arc. For XY and OFFSET arcs.


start

protected double start
The starting angle of the arc in decimal degrees. This is defined in decimal degrees because the java.awt.geom.Arc object wants it in decimal degrees. 0 is North?


extent

protected double extent
The angular extent of the arc in decimal degrees.


arcType

protected int arcType
For Arcs, how the arc should be closed when rendered. Arc2D.OPEN is the default, Arc2D.PIE and Arc2D.CHORD are options.

See Also:
Arc2D

nverts

protected int nverts
Number of vertices to draw for lat/lon poly-arcs.


rotationAngle

protected double rotationAngle
The angle by which the circle/ellipse is to be rotated, in radians

Constructor Detail

OMArc

public OMArc()
The simplest constructor for an OMArc, and it expects that all fields will be filled in later. Rendertype is RENDERTYPE_UNKNOWN.


OMArc

public OMArc(double latPoint,
             double lonPoint,
             int w,
             int h,
             double s,
             double e)
Create an OMArc, positioned with a lat-lon center and x-y axis. Rendertype is RENDERTYPE_OFFSET.

Parameters:
latPoint - latitude of center point, decimal degrees
lonPoint - longitude of center point, decimal degrees
w - horizontal diameter of arc, pixels
h - vertical diameter of arc, pixels
s - starting angle of arc, decimal degrees
e - angular extent of arc, decimal degrees

OMArc

public OMArc(int x1,
             int y1,
             int w,
             int h,
             double s,
             double e)
Create a OMArc, positioned with a x-y center with x-y axis. Rendertype is RENDERTYPE_XY.

Parameters:
x1 - window position of center point from left of window, in pixels
y1 - window position of center point from top of window, in pixels
w - horizontal diameter of arc, pixels
h - vertical diameter of arc, pixels
s - starting angle of arc, decimal degrees
e - angular extent of arc, decimal degrees. For XY rendertype arcs, positive extents go in the counter-clockwise direction, matching the java.awt.geom.Arc2D convention.

OMArc

public OMArc(double latPoint,
             double lonPoint,
             int offset_x1,
             int offset_y1,
             int w,
             int h,
             double s,
             double e)
Create a OMArc, positioned at a Lat-lon location, x-y offset, x-y axis. Rendertype is RENDERTYPE_OFFSET.

Parameters:
latPoint - latitude of center of arc.
lonPoint - longitude of center of arc.
offset_x1 - # pixels to the right the center will be moved from lonPoint.
offset_y1 - # pixels down that the center will be moved from latPoint.
w - horizontal diameter of arc, pixels.
h - vertical diameter of arc, pixels.
s - starting angle of arc, decimal degrees.
e - angular extent of arc, decimal degrees. For Offset rendertype arcs, positive extents go in the counter-clockwise direction, matching the java.awt.geom.Arc2D convention.

OMArc

public OMArc(double latPoint,
             double lonPoint,
             double radius,
             double s,
             double e)
Creates an OMArc with a Lat-lon center and a lat-lon axis. Rendertype is RENDERTYPE_LATLON.

Parameters:
latPoint - latitude of center point, decimal degrees
lonPoint - longitude of center point, decimal degrees
radius - distance in decimal degrees (converted to radians internally).
s - starting angle of arc, decimal degrees
e - angular extent of arc, decimal degrees. For LATLON rendertype arcs, positive extents go in the clockwise direction, matching the OpenMap convention in coordinate space.

OMArc

public OMArc(double latPoint,
             double lonPoint,
             double radius,
             Length units,
             double s,
             double e)
Create an OMArc with a lat/lon center and a physical distance radius. Rendertype is RENDERTYPE_LATLON.

Parameters:
latPoint - latitude of center of arc in decimal degrees
lonPoint - longitude of center of arc in decimal degrees
radius - distance
units - com.bbn.openmap.proj.Length object.
s - starting angle of arc, decimal degrees.
e - angular extent of arc, decimal degrees. For LATLON rendertype arcs, positive extents go in the clockwise direction, matching the OpenMap convention in coordinate space.

OMArc

public OMArc(double latPoint,
             double lonPoint,
             double radius,
             Length units,
             int nverts,
             double s,
             double e)
Create an OMArc with a lat/lon center and a physical distance radius. Rendertype is RENDERTYPE_LATLON.

Parameters:
latPoint - latitude of center of arc in decimal degrees
lonPoint - longitude of center of arc in decimal degrees
radius - distance
units - com.bbn.openmap.proj.Length object specifying units.
nverts - number of vertices for the poly-arc (if < 3, value is generated internally)
s - starting angle of arc, decimal degrees.
e - angular extent of arc, decimal degrees. For LATLON rendertype arcs, positive extents go in the clockwise direction, matching the OpenMap convention in coordinate space.

OMArc

public OMArc(LatLonPoint center,
             double radius,
             Length units,
             int nverts,
             double s,
             double e)
Create an OMArc with a lat/lon center and a physical distance radius. Rendertype is RENDERTYPE_LATLON.

Parameters:
center - LatLon center of arc
radius - distance
units - com.bbn.openmap.proj.Length object specifying units for distance.
nverts - number of vertices for the poly-arc(if < 3, value is generated internally)
s - starting angle of arc, decimal degrees.
e - angular extent of arc, decimal degrees. For LATLON rendertype arcs, positive extents go in the clockwise direction, matching the OpenMap convention in coordinate space.
Method Detail

getX

public int getX()
Get the x position of the center. This is always meaningful only if the render type is RENDERTYPE_XY or RENDERTYPE_OFFSET, and meaningful after generation if the RENDERTYPE_LATLON.

Returns:
x position of center.

getY

public int getY()
Get the y position of the center. This is always meaningful only if the render type is RENDERTYPE_XY or RENDERTYPE_OFFSET, and meaningful after generation if the RENDERTYPE_LATLON.

Returns:
y position of center.

getOffX

public int getOffX()
Get the x offset from the center. This is meaningful only if the render type is RENDERTYPE_OFFSET.

Returns:
x offset from center.

getOffY

public int getOffY()
Get the y position of the center. This is meaningful only if the render type is RENDERTYPE_OFFSET.

Returns:
y offset from center.

getLatLon

public LatLonPoint getLatLon()
Get the center LatLonPoint. This is meaningful only if the rendertype is RENDERTYPE_LATLON or RENDERTYPE_OFFSET.

Returns:
LatLonPoint position of center.

getRadius

public double getRadius()
Get the radius. This is meaningful only if the render type is RENDERTYPE_LATLON.

Returns:
double radius in decimal degrees

getWidth

public int getWidth()
Get the horizontal pixel diameter of the arc. This is meaningful only if the render type is RENDERTYPE_XY or RENDERTYPE_OFFSET.

Returns:
the horizontal pixel diameter of the arc.

getHeight

public int getHeight()
Get the vertical pixel diameter of the arc. This is meaningful only if the render type is RENDERTYPE_XY or RENDERTYPE_OFFSET.

Returns:
the vertical pixel diameter of the arc.

getStartAngle

public double getStartAngle()
Get the starting angle of the arc.

Returns:
the starting angle of the arc in decimal degrees.

getExtentAngle

public double getExtentAngle()
Get the extent angle of the arc.

Returns:
the angular extent of the arc in decimal degrees. For LATLON rendertype arcs, positive extents go in the clockwise direction, matching the OpenMap convention in coordinate space. For XY and OFFSET rendertype arcs, positive extents go in the clockwise direction, matching the java.awt.geom.Arc2D convention.

getNumVerts

public int getNumVerts()
Get the number of vertices of the lat/lon arc. This will be meaningful only if the render type is RENDERTYPE_XY or RENDERTYPE_OFFSET and for LINETYPE_GREATARC or LINETYPE_RHUMB line types.

Returns:
int number of segment points

setX

public void setX(int value)
Set the x position of the center. This will be meaningful only if the render type is RENDERTYPE_XY.

Parameters:
value - the x position of center.

setY

public void setY(int value)
Set the y position of the center. This will be meaningful only if the render type is RENDERTYPE_XY.

Parameters:
value - the y position of center.

setOffX

public void setOffX(int value)
Set the x offset from the center. This will be meaningful only if the render type is RENDERTYPE_OFFSET.

Parameters:
value - the x position of center.

setOffY

public void setOffY(int value)
Set the y offset from the center. This will be meaningful only if the render type is RENDERTYPE_OFFSET.

Parameters:
value - the y position of center.

setLatLon

public void setLatLon(double lat,
                      double lon)
Set the latitude and longitude of the center point. This is meaningful only if the rendertype is RENDERTYPE_LATLON or RENDERTYPE_OFFSET.

Parameters:
lat - latitude in decimal degrees
lon - longitude in decimal degrees

setCenter

public void setCenter(LatLonPoint p)
Set the latitude and longitude of the center point. This is meaningful only if the rendertype is RENDERTYPE_LATLON or RENDERTYPE_OFFSET.

Parameters:
p - LatLonPoint of center.

getCenter

public java.awt.geom.Point2D getCenter()
Get the center Point.


setRadius

public void setRadius(double radius)
Set the radius. This is meaningful only if the render type is RENDERTYPE_LATLON. Note that while the radius is specified as decimal degrees, it only means the distance along the ground that that number of degrees represents at the equator, *NOT* a radius of a number of degrees around a certain location. There is a difference.

Parameters:
radius - float radius in decimal degrees

setRadius

public void setRadius(double radius,
                      Length units)
Set the radius with units. This is meaningful only if the render type is RENDERTYPE_LATLON.

Parameters:
radius - float radius
units - Length specifying unit type.

setWidth

public void setWidth(int value)
Set the horizontal pixel diameter of the arc. This is meaningful only if the render type is RENDERTYPE_XY or RENDERTYPE_OFFSET.

Parameters:
value - the horizontal pixel diameter of the arc.

setHeight

public void setHeight(int value)
Set the vertical pixel diameter of the arc. This is meaningful only if the render type is RENDERTYPE_XY or RENDERTYPE_OFFSET.

Parameters:
value - the vertical pixel diameter of the arc.

setStart

public void setStart(double value)
Set the starting angle the arc.

Parameters:
value - the starting angle of the arc in decimal degrees.

setExtent

public void setExtent(double value)
Set the angular extent of the arc.

Parameters:
value - the angular extent of the arc in decimal degrees. For LATLON rendertype arcs, positive extents go in the clockwise direction, matching the OpenMap convention in coordinate space. For XY and OFFSET rendertype arcs, positive extents go in the clockwise direction, matching the java.awt.geom.Arc2D convention.

setNumVerts

public void setNumVerts(int nverts)
Set the number of vertices of the lat/lon arc. This is meaningful only if the render type is RENDERTYPE_LATLON and for LINETYPE_GREATARC or LINETYPE_RHUMB line types. If < 1, this value is generated internally.

Parameters:
nverts - number of segment points

setArcType

public void setArcType(int type)
Set the ArcType, either Arc2D.OPEN (default), Arc2D.PIE or Arc2D.CHORD.

See Also:
Arc2D

getArcType

public int getArcType()
Get the ArcType.

See Also:
Arc2D

setRotationAngle

public void setRotationAngle(double angle)
Set the angle by which the arc is to rotated.

Parameters:
angle - the number of radians the arc is to be rotated. Measured clockwise from horizontal. Positive numbers move the positive x axis toward the positive y axis.

getRotationAngle

public double getRotationAngle()
Get the current rotation of the arc.

Returns:
the arc rotation.

setNeedToRegenerate

public void setNeedToRegenerate(boolean value)
Description copied from class: BasicGeometry
Sets the regenerate flag for the graphic. This flag is used to determine if extra work needs to be done to prepare the object for rendering. This also sets the shape to null;

Specified by:
setNeedToRegenerate in interface OMGeometry
Overrides:
setNeedToRegenerate in class BasicGeometry
Parameters:
value - boolean

getPolarCorrection

public boolean getPolarCorrection()
Get the polar-fill-correction-flag.

Returns:
boolean
See Also:
setPolarCorrection(boolean)

setPolarCorrection

public void setPolarCorrection(boolean value)
Set the polar-fill-correction-flag. We don't correctly render *filled* arcs/polygons which encompass a pole in Cylindrical projections. This method will toggle support for correcting this problem. You should only set this on arcs that encompass a pole and are drawn with a fill color. You do not need to set this if you're only drawing the arc outline.

Parameters:
value - boolean
See Also:
OMGraphic.setLinePaint(java.awt.Paint), OMGraphic.setFillPaint(java.awt.Paint)

shouldCenterBeInShape

protected boolean shouldCenterBeInShape()
Helper function that helps the generate method figure out if the center point should be in the generate shape - if it's not, the code knows that there is a problem with the poles, and the polar correction code needs to be run.


generate

public boolean generate(Projection proj)
Prepare the arc for rendering.

Specified by:
generate in interface OMGeometry
Specified by:
generate in class OMGraphicAdapter
Parameters:
proj - Projection
Returns:
true if generate was successful
See Also:
OMGraphicAdapter.regenerate(com.bbn.openmap.proj.Projection)

createArcShape

protected java.awt.Shape createArcShape(double x,
                                        double y,
                                        double fwidth,
                                        double fheight)
An internal method designed to fetch the Shape to be used for an XY or OFFSET OMArc. This method is smart enough to take the calculated position information and make a call to Arc2D.Double with start, extent and arcType information.


getCoordLists

protected java.util.ArrayList<float[]> getCoordLists(GeoProj proj,
                                                     LatLonPoint center,
                                                     double radius,
                                                     int nverts)
An internal method designed to fetch the ArrayList for LATLON OMArcs. This method is smart enough to take the calculated position information and make a call to Projection.forwardArc() with start, extent and arcType information.


getPolarShapeLine

public java.awt.geom.GeneralPath getPolarShapeLine()
Return the java.awt.Shape (GeneralPath) that reflects a arc that encompasses a pole. Used when the projection is Cylindrical.

Returns:
a GeneralPath object, or null if it's not needed (which is probably most of the time, if the arc doesn't include a pole or the projection isn't Cylindrical).

render

public void render(java.awt.Graphics g)
Paint the arc.

Specified by:
render in interface OMGeometry
Overrides:
render in class OMGraphicAdapter
Parameters:
g - Graphics context to render into

clone

public java.lang.Object clone()
Description copied from class: OMGraphicAdapter
Generic return of SinkGraphic for subclasses that don't implement clone properly.

Specified by:
clone in interface OMGraphic
Overrides:
clone in class OMGraphicAdapter
Returns:
Object cloned from this OMGraphic
See Also:
OMGraphic.clone()

restore

public void restore(OMGeometry source)
Description copied from class: OMGraphicAdapter
Takes the generic OMGraphic settings from another OMGraphic and pushes them to this one.

Specified by:
restore in interface OMGeometry
Overrides:
restore in class OMGraphicAdapter


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details