|
||||||||||
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.OMAbstractLine com.bbn.openmap.omGraphics.OMPoly com.bbn.openmap.omGraphics.OMSpline com.bbn.openmap.omGraphics.labeled.LabeledOMSpline
public class LabeledOMSpline
LabeledOMSpline Copied from LabeledOMPoly, because both OMSpline and LabeledOMPoly inherits from OMPoly
Field Summary | |
---|---|
protected int |
index
|
protected OMText |
label
|
protected boolean |
locateAtCenter
|
protected java.awt.Point |
offset
|
Fields inherited from class com.bbn.openmap.omGraphics.OMPoly |
---|
coordMode, COORDMODE_ORIGIN, COORDMODE_PREVIOUS, doShapes, geometryClosed, isPolygon, lat, lon, rawllpts, units, xs, ys |
Fields inherited from class com.bbn.openmap.omGraphics.OMAbstractLine |
---|
arrowhead, nsegs, xpoints, ypoints |
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 | |
---|---|
LabeledOMSpline()
Default constructor. |
|
LabeledOMSpline(double[] llPoints,
int units,
int lType)
Create an LabeledOMSpline from a list of float lat/lon pairs. |
|
LabeledOMSpline(double[] llPoints,
int units,
int lType,
int nsegs)
Create an LabeledOMSpline from a list of float lat/lon pairs. |
|
LabeledOMSpline(float latPoint,
float lonPoint,
int[] xypoints,
int cMode)
Create an x/y LabeledOMSpline at an offset from lat/lon. |
|
LabeledOMSpline(float latPoint,
float lonPoint,
int[] xPoints,
int[] yPoints,
int cMode)
Create an x/y LabeledOMSpline at an offset from lat/lon. |
|
LabeledOMSpline(int[] xypoints)
Create an LabeledOMSpline from a list of xy pairs. |
|
LabeledOMSpline(int[] xPoints,
int[] yPoints)
Create an x/y LabeledOMSpline. |
Method Summary | |
---|---|
boolean |
generate(Projection proj)
Prepare the spline for rendering. |
java.awt.Point |
getCenter()
Get the calculated center where the label string is drawn. |
java.awt.Font |
getFont()
Get the Font for the label. |
int |
getIndex()
Get the index of the OMGraphic where the String will be rendered. |
int |
getJustify()
Get the justification setting for the label. |
protected OMText |
getLabel()
|
java.awt.Point |
getOffset()
Get the x, y pixel offsets set for the rendering of the point. |
double |
getRotationAngle()
Get the current rotation of the text. |
java.lang.String |
getText()
Get the String for the label. |
protected java.awt.Point |
getTextPoint(Projection proj)
|
boolean |
isLocateAtCenter()
Get whether the LabeledOMGraphic is placing the label String in the center of the OMGraphic. |
void |
render(java.awt.Graphics g)
Paint the poly. |
void |
setFont(java.awt.Font f)
Set the Font for the label. |
void |
setIndex(int index)
Set the index of the OMGraphic coordinates where the drawing point of the label should be attached. |
void |
setJustify(int just)
Set the justification setting for the label. |
void |
setLinePaint(java.awt.Paint paint)
Set the line paint for the polygon. |
void |
setLocateAtCenter(boolean set)
Tell the LabeledOMGraphic to calculate the location of the String that would put it in the middle of the OMGraphic. |
void |
setOffset(java.awt.Point p)
Set the x, y pixel offsets where the String should be rendered, from the location determined from the index point, or from the calculated center point. |
void |
setRotationAngle(double angle)
Set the angle by which the text is to rotated. |
void |
setText(java.lang.String label)
Set the String for the label. |
void |
setTextPaint(java.awt.Paint paint)
If not set to null, the text will be painted in a different color. |
Methods inherited from class com.bbn.openmap.omGraphics.OMPoly |
---|
checkPoints, createShape, distance, getCoordMode, getDoShapes, getIndexOfFirstNodeOfSegIntersect, getLat, getLatLonArray, getLatLonArrayCopy, getLon, getNumSegs, getRawllpts, getShape, getUnits, getXs, getYs, insertRadians, isGeometryClosed, isPolygon, main, restore, setCoordMode, setDoShapes, setFillPaint, setIsPolygon, setLat, setLocation, setLocation, setLocation, setLocation, setLocation, setLon, setNumSegs, setXs, setYs, shouldRenderFill |
Methods inherited from class com.bbn.openmap.omGraphics.OMAbstractLine |
---|
addArrowHead, addArrowHead, addArrowHead, addArrowHead, createArrowHeads, getArrowDirectionType, getArrowHead, getArrowLocation, getWingLength, getWingTip, hasArrowHead, restore, setArrowHead |
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, 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.OMGraphic |
---|
clone, deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getFillColor, getFillPaint, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, select, setDeclutterType, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setMatted, setMattingPaint, setRenderType, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge |
Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry |
---|
clearAttributes, contains, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible |
Field Detail |
---|
protected OMText label
protected java.awt.Point offset
protected boolean locateAtCenter
protected int index
Constructor Detail |
---|
public LabeledOMSpline()
public LabeledOMSpline(double[] llPoints, int units, int lType)
public LabeledOMSpline(double[] llPoints, int units, int lType, int nsegs)
public LabeledOMSpline(int[] xypoints)
public LabeledOMSpline(int[] xPoints, int[] yPoints)
public LabeledOMSpline(float latPoint, float lonPoint, int[] xypoints, int cMode)
public LabeledOMSpline(float latPoint, float lonPoint, int[] xPoints, int[] yPoints, int cMode)
Method Detail |
---|
public void setText(java.lang.String label)
setText
in interface LabeledOMGraphic
public java.lang.String getText()
getText
in interface LabeledOMGraphic
protected OMText getLabel()
public void setFont(java.awt.Font f)
setFont
in interface LabeledOMGraphic
public java.awt.Font getFont()
getFont
in interface LabeledOMGraphic
public void setJustify(int just)
setJustify
in interface LabeledOMGraphic
OMText.JUSTIFY_LEFT
,
OMText.JUSTIFY_CENTER
,
OMText.JUSTIFY_RIGHT
public int getJustify()
getJustify
in interface LabeledOMGraphic
OMText.JUSTIFY_LEFT
,
OMText.JUSTIFY_CENTER
,
OMText.JUSTIFY_RIGHT
public void setLocateAtCenter(boolean set)
setLocateAtCenter
in interface LabeledOMGraphic
public boolean isLocateAtCenter()
isLocateAtCenter
in interface LabeledOMGraphic
public java.awt.Point getCenter()
getCenter
in interface LabeledOMGraphic
public void setIndex(int index)
setIndex
in interface LabeledOMGraphic
public int getIndex()
getIndex
in interface LabeledOMGraphic
public void setOffset(java.awt.Point p)
setOffset
in interface LabeledOMGraphic
public java.awt.Point getOffset()
getOffset
in interface LabeledOMGraphic
public void setRotationAngle(double angle)
setRotationAngle
in interface LabeledOMGraphic
angle
- the number of radians the text is to be rotated.
Measured clockwise from horizontal. Positive numbers
move the positive x axis toward the positive y axis.public double getRotationAngle()
getRotationAngle
in interface LabeledOMGraphic
public void setLinePaint(java.awt.Paint paint)
setLinePaint
in interface OMGraphic
setLinePaint
in class OMGraphicAdapter
paint
- the real line Paintpublic void setTextPaint(java.awt.Paint paint)
paint
- the Paint object for the textprotected java.awt.Point getTextPoint(Projection proj)
public boolean generate(Projection proj)
OMSpline
generate
in interface OMGeometry
generate
in class OMSpline
proj
- Projection
OMGeometry.generate(Projection)
public void render(java.awt.Graphics g)
OMPoly
render
in interface OMGeometry
render
in class OMPoly
g
- java.awt.Graphics to paint the poly onto.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |