|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.omGraphics.geom.BasicGeometry com.bbn.openmap.omGraphics.OMGraphicAdapter com.bbn.openmap.omGraphics.OMArc com.bbn.openmap.omGraphics.OMCircle com.bbn.openmap.omGraphics.OMRangeRings
public class OMRangeRings
An object that manages a series of range circles. It is really an OMCircle that manages a set of inner circles and an OMPOint. The location of these inner circles depend on two new variables, the interval and intervalUnits. If the intervalUnits are null, then the interval represents the number of inner circles, not including the outer ring and the innermost point, that are spaced evenly between them. If the intervalUnits are not null, then the interval represents the number of intervalUnits where inner circles are placed. For example, if the intervalUnits is Length.MILE, and the interval is 5, then inner circles will be placed every 5 miles. If the intervalUnits is null, then there will be 5 inner circles drawn between the center point and the outer ring.
OMCircle
,
Serialized FormField Summary | |
---|---|
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. |
Fields inherited from class com.bbn.openmap.omGraphics.OMArc |
---|
arcType, center, extent, height, nverts, off_x, off_y, radius, rotationAngle, start, width, x1, y1 |
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 |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.bbn.openmap.omGraphics.OMCircle |
---|
createArcShape, getCoordLists, hasLineTypeChoice, shouldCenterBeInShape |
Methods inherited from class com.bbn.openmap.omGraphics.OMArc |
---|
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 |
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.OMGeometry |
---|
clearAttributes, contains, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setShape, setVisible |
Field Detail |
---|
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
Constructor Detail |
---|
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)Method Detail |
---|
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
- Projection
OMGraphicAdapter.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |