omb.setFillPaint(null);
omb.setSelectPaint(Color.blue);
omb.setRotationAngle(Math.PI / 2);
omList.add(omb);
OMPoint point = new OMPoint(42f, -72f, 14);
point.setFillPaint(Color.green);
point.setOval(true);
omList.add(point);
OMCircle circle = new OMCircle(40f, -70f, 50, 200);
circle.setRotationAngle(com.bbn.openmap.MoreMath.HALF_PI / 2f);
circle.putAttribute(OMGraphicConstants.LABEL,
new OMTextLabeler("Circle Label", OMText.JUSTIFY_CENTER));
omList.add(circle);
int[] llPointsx = new int[5];
int[] llPointsy = new int[5];
llPointsy[0] = 10;
llPointsx[0] = 170;
llPointsy[1] = 42;
llPointsx[1] = 273;
llPointsy[2] = 38;
llPointsx[2] = 374;
llPointsy[3] = 78;
llPointsx[3] = 468;
llPointsy[4] = 84;
llPointsx[4] = 369;
LabeledOMSpline spline = new LabeledOMSpline(40f, -72, llPointsx, llPointsy, OMPoly.COORDMODE_ORIGIN);
spline.setText("Testing");
spline.setLocateAtCenter(true);
// spline.setIndex(2);
omList.add(spline);
OMSpline spline2 = new OMSpline(llPointsx, llPointsy);
spline2.putAttribute(OMGraphicConstants.LABEL,
new OMTextLabeler("Spline Label"));
spline2.setLinePaint(Color.green);
omList.add(spline2);
float[] llPoints = { 55.0f, -10.0f, 50.0f, -5.0f, 45.0f, -7.0f, 43.0f,
-12.0f, 55.0f, -10.0f };
OMDecoratedSpline omds = new OMDecoratedSpline(llPoints, OMSpline.DECIMAL_DEGREES, OMSpline.LINETYPE_STRAIGHT);
ShapeDecorator sd = new ShapeDecorator();
sd.addDecoration(new LineShapeDecoration(5, com.bbn.openmap.omGraphics.OMColor.clear));
sd.addDecoration(new IceAreaShapeDecoration(7, 7, IceAreaShapeDecoration.RIGHT));
omds.setDecorator(sd);
omList.add(omds);
llPoints = new float[] { 56.0f, -11.0f, 51.0f, -6.0f, 46.0f, -8.0f,
44.0f, -13.0f, 56.0f, -11.0f };
omds = new OMDecoratedSpline(llPoints, OMSpline.DECIMAL_DEGREES, OMSpline.LINETYPE_STRAIGHT);
sd = new ShapeDecorator();
sd.addDecoration(new LineShapeDecoration(3, com.bbn.openmap.omGraphics.OMColor.clear));
sd.addDecoration(new CircleShapeDecoration(5, 5, Color.blue));
omds.setDecorator(sd);
omList.add(omds);
llPoints = new float[] { 57.0f, -12.0f, 52.0f, -7.0f, 47.0f, -9.0f,
45.0f, -14.0f, 57.0f, -12.0f };
omds = new OMDecoratedSpline(llPoints, OMSpline.DECIMAL_DEGREES, OMSpline.LINETYPE_STRAIGHT);
sd = new ShapeDecorator();
sd.addDecoration(new LineShapeDecoration(2, com.bbn.openmap.omGraphics.OMColor.clear));
sd.addDecoration(new CircleShapeDecoration(5, 5, Color.red));
sd.addDecoration(new LineShapeDecoration(2, com.bbn.openmap.omGraphics.OMColor.clear));
sd.addDecoration(new LineShapeDecoration(15, Color.red));
omds.setDecorator(sd);
omList.add(omds);
float[] llPoints2 = { 55.0f, -12.0f, 50.0f, -7.0f, 45.0f, -9.0f, 43.0f,
-14.0f };
OMHotSurfaceFront hf = new OMHotSurfaceFront(llPoints2, OMSpline.DECIMAL_DEGREES, OMSpline.LINETYPE_STRAIGHT);
omList.add(hf);
float[] llPoints3 = { 55.0f, -14.0f, 50.0f, -9.0f, 45.0f, -11.0f,
43.0f, -16.0f };
OMOcclusion oc = new OMOcclusion(llPoints3, OMSpline.DECIMAL_DEGREES, OMSpline.LINETYPE_STRAIGHT);
omList.add(oc);
// float[] llPoints4 = { 55.0f, -16.0f, 50.0f, -11.0f, 45.0f,
// -13.0f,
// 43.0f, -18.0f };
// OMSpline spline3 = new OMDecoratedSpline(llPoints4,
// OMSpline.DECIMAL_DEGREES, OMSpline.LINETYPE_STRAIGHT) {
// protected void initDecorations() {
//
// getDecorator().addDecoration(new TextShapeDecoration(" This
// one has a text ", new Font("arial", Font.PLAIN, 10),
// TextShapeDecoration.LEFT_TO_RIGHT
// + TextShapeDecoration.FOLLOW_POLY,
// TextShapeDecoration.CENTER));
// }
// };
// omList.add(spline3);
OMLine line = new OMLine(40f, -75f, 42f, -70f, OMGraphic.LINETYPE_GREATCIRCLE);
// line.addArrowHead(true);
line.addArrowHead(OMArrowHead.ARROWHEAD_DIRECTION_BOTH);
line.setStroke(new BasicStroke(2));
line.putAttribute(OMGraphicConstants.LABEL,
new OMTextLabeler("Line Label"));
omList.add(line);
OMGraphicList pointList = new OMGraphicList();
for (int i = 0; i < 100; i++) {
point = new OMPoint((float) (Math.random() * 89f), (float) (Math.random() * -179f), 3);
point.setSelectPaint(Color.yellow);
pointList.add(point);
}
omList.add(pointList);
OMEllipse ell = new OMEllipse(new LatLonPoint(60f, -110), 1000, 300, Length.NM, com.bbn.openmap.MoreMath.HALF_PI / 2.0);