|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bbn.openmap.omGraphics.geom.BasicGeometry
com.bbn.openmap.omGraphics.OMGraphicAdapter
com.bbn.openmap.layer.mif.OMSubtraction
public class OMSubtraction
Defines a Region of a MIF file where when one region encloses another the enclosed region is subtracted from the enclosing region in order to create a hole Computationally this can be expensive to do on a complex layout like a streetmap of city
Field Summary |
---|
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 | |
---|---|
OMSubtraction(double[] lat,
double[] lon)
|
Method Summary | |
---|---|
float |
distance(double x,
double y)
Return the shortest distance from the line to an XY-point - not relevant to this class. |
boolean |
generate(Projection proj)
Prepare the graphic for rendering. |
void |
render(java.awt.Graphics g)
Paint the graphic. |
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, setNeedToRegenerate, 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, setNeedToRegenerate, setShape, setVisible |
Constructor Detail |
---|
public OMSubtraction(double[] lat, double[] lon)
Method Detail |
---|
public boolean generate(Projection proj)
OMGraphicAdapter
render()
! If a vector graphic has lat-lon components, then
we project these vertices into x-y space. For raster graphics we prepare
in a different fashion.
If the generate is unsuccessful, it's usually because of some oversight,
(for instance if proj
is null), and if debugging is enabled,
a message may be output to the controlling terminal.
generate
in interface OMGeometry
generate
in class OMGraphicAdapter
proj
- Projection
OMGraphicAdapter.regenerate(com.bbn.openmap.proj.Projection)
public void render(java.awt.Graphics g)
OMGraphicAdapter
paint()
function of java.awt.Components.
Note that if the graphic has not been generated, it will not be rendered.
This method used to be abstract, but with the conversion of OMGraphics to internally represent themselves as java.awt.Shape objects, it's a more generic method. If the OMGraphic hasn't been updated to use Shape objects, it should have its own render method.
render
in interface OMGeometry
render
in class OMGraphicAdapter
g
- Graphics2D context to render into.public 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |