if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR); else setCursor(DEFAULT_CURSOR);
    private void handleMousePressed(Point p, int clickCount)    {        pressed = true;        dragging = true;        currentROI = null;        currentShape = null;        anchor = p;        Iterator i = listROI.iterator();        ROIShape roi;        Shape s;        if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR);        else setCursor(DEFAULT_CURSOR);        while (i.hasNext()) {            roi = (ROIShape) (i.next());            s = roi.getShape();            if (s.contains(p)) {                currentROI = roi;                currentShape = s;                Rectangle r = s.getBounds();                xControl = r.x;                yControl = r.y;                view.setIndexSelected(roi.getIndex());                if (clickCount == 2) {                    dragging = false;                    control.annotateROI(roi);                }            }        }    }