Selection selection = canvas.getSelection();
int action = curAction;
Location start = dragStart;
Location end = dragEnd;
HandleGesture gesture = null;
boolean drawHandles;
switch (action) {
case MOVE_ALL:
drawHandles = !dragEffective;
break;
case MOVE_HANDLE:
drawHandles = !dragEffective;
if (dragEffective) gesture = curGesture;
break;
default:
drawHandles = true;
}
CanvasObject moveHandleObj = null;
if (gesture != null) moveHandleObj = gesture.getHandle().getObject();
if (drawHandles) {
// unscale the coordinate system so that the stroke width isn't scaled
double zoom = 1.0;
Graphics gCopy = g.create();
if (gCopy instanceof Graphics2D) {