/** * Create and set the graphic within the state machine. The GraphicAttributes describe the type of * poly to create. */ public void createGraphic(GraphicAttributes ga) { init(); stateMachine.setUndefined(); int renderType = OMGraphic.RENDERTYPE_LATLON; int lineType = OMGraphic.LINETYPE_GREATCIRCLE; if (ga != null) { renderType = ga.getRenderType(); lineType = ga.getLineType(); } if (Debug.debugging("eomg")) { Debug.output("EditableOMDistance.createGraphic(): rendertype = " + renderType); } if (lineType == OMGraphic.LINETYPE_UNKNOWN) { lineType = OMGraphic.LINETYPE_GREATCIRCLE; ga.setLineType(OMGraphic.LINETYPE_GREATCIRCLE); } this.poly = (OMDistance) createGraphic(renderType, lineType); if (ga != null) { ga.setRenderType(poly.getRenderType()); ga.setTo(poly, true); } }