private void draw( Object parentGroup, GeometryIndex parentIndex, Point point, GraphicsContext graphics) { String groupName = baseName; if (parentIndex != null) { groupName += "." + editingService.getIndexService().format(parentIndex); } Composite vertexGroup = getOrCreateGroup(parentGroup, groupName + ".vertices"); addInivisibleShapeToGraphicsContext(graphics, vertexGroup); if (!point.isEmpty()) { GeometryIndex vertexIndex = editingService .getIndexService() .addChildren(parentIndex, GeometryIndexType.TYPE_VERTEX, 0); String identifier = baseName + "." + editingService.getIndexService().format(vertexIndex); addShapeToGraphicsContext( graphics, vertexGroup, identifier, point.getCoordinate(), findVertexStyle(vertexIndex)); graphics.setController(vertexGroup, identifier, createVertexController(vertexIndex)); } }
private void execute(Point point) { if (point.isEmpty()) { setCoordinate(point, coordinate); } }