this.dragSelected(event);
}
protected void dragSelected(SelectEvent event)
{
ControlPoint point = (ControlPoint) event.getTopObject();
Position lastPosition = point.getPosition();
//int positionIndex = (Integer) point.getValue(GfrEditorObjShpSegWiseTool.CONTROL_TYPE_LOCATION_INDEX);
//-- done in a hurry, positions should not be an array list => coz only two positions in this case
/*int positionIndexPointNotChanged =-1;
if (positionIndex == 0)
positionIndexPointNotChanged = 1;
else if (positionIndex == 1)
positionIndexPointNotChanged = 0;
//-- end done in a hurry
*/
//Position posPointNotChanged = this.measureTool.getPositions().get(positionIndexPointNotChanged);
/*double dblDistance =
DmsOperation.s_getDistanceFromDeg(
posPointNotChanged.getLatitude().getDegrees(),
posPointNotChanged.getLongitude().getDegrees(),
point.getPosition().getLatitude().getDegrees(),
point.getPosition().getLongitude().getDegrees());*/
if (point.getValue(GfrEditorObjShpSegWiseTool.CONTROL_TYPE_LOCATION_INDEX) != null)
lastPosition = measureTool.getPositions().get((Integer) point.getValue(GfrEditorObjShpSegWiseTool.CONTROL_TYPE_LOCATION_INDEX));
//point = new ControlPoint(lastPosition, point.getAttributes(), point.getParent());
//event.consume();
// Delegate dragging computations to a dragger.
this.dragger.selected(event);
measureTool.moveControlPoint(point);
if (measureTool.isShowAnnotation())
measureTool.updateAnnotation(point.getPosition());
measureTool.firePropertyChange(GfrEditorObjShpSegWiseTool.EVENT_POSITION_REPLACE,
lastPosition, point.getPosition());
measureTool.getWwd().redraw();
}