roi.setText("#"+j);
roi.setLabel("#"+j);
    public void erase()    {        erase = true;        if (eraseAll) listROIErase.removeAll(listROIErase);        eraseAll = false;        listROIErase.add(currentROI);        int index = currentROI.getIndex();        listROI.remove(currentROI);        Iterator i = listROI.iterator();        ROIShape roi;        int j;        while (i.hasNext()) {            roi = (ROIShape) i.next();            j = roi.getIndex();            if (j > index) {                j--;                roi.setIndex(j);                roi.setText("#"+j);            }        }        //Select the last ROI if any left.        int n = listROI.size()-1;        if (n >= 0) {            currentROI = (ROIShape) listROI.get(n);            currentShape = currentROI.getShape();            view.setIndexSelected(currentROI.getIndex());        } else {            currentROI = null;            currentShape = null;            view.erase();         }            }