public class OMRangeRings extends OMCircle
OMCircle
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected OMPoint |
centerPoint
The center point of the range rings.
|
static java.text.DecimalFormat |
DEFAULT_FORMAT
The default format.
|
static int |
DEFAULT_INTERVAL
By default, there are 3 inner rings, 4 total.
|
protected DrawingAttributes |
drawingAttributes
The DrawingAttributes object used to reflect the outer circle properties
to the inner circles.
|
protected boolean |
drawLabels |
protected java.text.NumberFormat |
form
Formatting for the labels with units.
|
protected int |
interval
The number of rings, or the unit interval, depending on whether
intervalUnits is null or not.
|
protected Length |
intervalUnits
The unit object specifying the interval meaning.
|
protected OMText[] |
labels
The labels for the circles.
|
protected OMCircle[] |
subCircles
The inner ring of circles.
|
arcType, center, extent, height, nverts, off_x, off_y, radius, rotationAngle, start, width, x1, y1
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask
APP_OBJECT_KEY, appObject, ATT_MAP_KEY, lineType, needToRegenerate, shape, visible
ADD_GRAPHIC_MASK, 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, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, 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 and Description |
---|
OMRangeRings()
Used for UndoEvents.
|
OMRangeRings(double latPoint,
double lonPoint,
double radius)
Creates an OMRangeRings with a Lat-lon center and a lat-lon axis.
|
OMRangeRings(double latPoint,
double lonPoint,
double radius,
Length units)
Create an OMRangeRings with a lat/lon center and a physical distance
radius.
|
OMRangeRings(double latPoint,
double lonPoint,
double radius,
Length units,
int nverts)
Create an OMRangeRings with a lat/lon center and a physical distance
radius.
|
OMRangeRings(LatLonPoint center,
double radius,
Length units,
int nverts)
Create an OMRangeRings with a lat/lon center and a physical distance
radius.
|
Modifier and Type | Method and Description |
---|---|
protected OMPoint |
createCenterPoint() |
OMCircle[] |
createCircles()
Take the interval and intervalUnits, and then create the proper inner
circles.
|
float |
distance(double x,
double y)
Return the shortest distance from the circle to an XY-point.
|
boolean |
generate(Projection proj)
Prepare the circles for rendering.
|
boolean |
getDrawLabels() |
java.text.NumberFormat |
getFormat()
Get the format used for the labeling of unit rings.
|
int |
getInterval()
Get the interval number.
|
Length |
getIntervalUnits()
Get the interval units.
|
void |
render(java.awt.Graphics g)
Paint the circles.
|
void |
restore(OMGeometry source)
Takes the generic OMGraphic settings from another OMGraphic and pushes
them to this one.
|
void |
setDrawLabels(boolean dl)
Flag for whether the rings should be labeled.
|
void |
setFormat(java.text.NumberFormat nf)
Set the format for the number labels.
|
void |
setInterval(int interval)
Set the interval.
|
void |
setInterval(int interval,
Length units)
Convenience method to set both at one time.
|
void |
setIntervalUnits(Length units)
Set the interval units.
|
void |
setRadius(float radius)
Set the radius.
|
void |
setRadius(float radius,
Length units)
Set the radius with units.
|
createArcShape, getCoordLists, hasLineTypeChoice, shouldCenterBeInShape
clone, createArcShape, getArcType, getCenter, getCoordLists, getExtentAngle, getHeight, getLatLon, getNumVerts, getOffX, getOffY, getPolarCorrection, getPolarShapeLine, getRadius, getRotationAngle, getStartAngle, getWidth, getX, getY, setArcType, setCenter, setExtent, setHeight, setLatLon, setNeedToRegenerate, setNumVerts, setOffX, setOffY, setPolarCorrection, setRadius, setRadius, setRotationAngle, setStart, setWidth, setX, setY
deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, initLabelingDuringGenerate, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, readStroke, regenerate, renderLabel, select, setDeclutterType, setEdgeMatchesFill, setFillColor, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setHasLabel, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShape, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill, writeStroke
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, checkAttributeMap, checkAttributeMap, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, fill, getAppObject, getAppObject, getAttribute, getAttributeMap, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setVisible
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getFillColor, getFillPaint, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, 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
clearAttributes, contains, distanceToEdge, draw, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setShape, setVisible
protected OMCircle[] subCircles
protected OMText[] labels
public static final int DEFAULT_INTERVAL
protected int interval
protected Length intervalUnits
protected DrawingAttributes drawingAttributes
protected OMPoint centerPoint
public static final java.text.DecimalFormat DEFAULT_FORMAT
protected java.text.NumberFormat form
protected boolean drawLabels
public OMRangeRings()
public OMRangeRings(double latPoint, double lonPoint, double radius)
latPoint
- latitude of center point, decimal degreeslonPoint
- longitude of center point, decimal degreesradius
- distance in decimal degrees (converted to radians
internally).public OMRangeRings(double latPoint, double lonPoint, double radius, Length units)
latPoint
- latitude of center of circle in decimal degreeslonPoint
- longitude of center of circle in decimal degreesradius
- distanceunits
- com.bbn.openmap.proj.Length object.public OMRangeRings(double latPoint, double lonPoint, double radius, Length units, int nverts)
latPoint
- latitude of center of circle in decimal degreeslonPoint
- longitude of center of circle in decimal degreesradius
- distanceunits
- com.bbn.openmap.proj.Length object specifying units.nverts
- number of vertices for the poly-circle (if < 3, value is
generated internally)public OMRangeRings(LatLonPoint center, double radius, Length units, int nverts)
center
- LatLon center of circleradius
- distanceunits
- com.bbn.openmap.proj.Length object specifying units for
distance.nverts
- number of vertices for the poly-circle(if < 3, value is
generated internally)protected OMPoint createCenterPoint()
public void setInterval(int interval)
public void setInterval(int interval, Length units)
public int getInterval()
public void setIntervalUnits(Length units)
public Length getIntervalUnits()
public void setDrawLabels(boolean dl)
public boolean getDrawLabels()
public void setFormat(java.text.NumberFormat nf)
public java.text.NumberFormat getFormat()
public void setRadius(float radius)
radius
- float radius in decimal degreespublic void setRadius(float radius, Length units)
radius
- float radiusunits
- Length specifying unit type.public OMCircle[] createCircles()
public boolean generate(Projection proj)
generate
in interface OMGeometry
generate
in class OMArc
proj
- ProjectionOMGraphicAdapter.regenerate(com.bbn.openmap.proj.Projection)
public void render(java.awt.Graphics g)
render
in interface OMGeometry
render
in class OMArc
g
- Graphics context to render intopublic float distance(double x, double y)
distance
in interface OMGeometry
distance
in class OMGraphicAdapter
x
- X coordinate of the point.y
- Y coordinate fo the point.public void restore(OMGeometry source)
OMGraphicAdapter
restore
in interface OMGeometry
restore
in class OMArc
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details