undoErase.setActionCommand(""+UNDO_ERASE); undoErase.addActionListener(this);
    private void attachListeners()    {        JButton rectangle = view.getRectangle(), ellipse = view.getEllipse(),                erase = view.getErase(), analyze = view.getAnalyse(),                moveROI = view.getMoveROI(), sizeROI = view.getSizeROI(),                eraseAll = view.getEraseAll(), undoErase = view.getUndoErase();        rectangle.setActionCommand(""+RECTANGLE);        rectangle.addActionListener(this);        ellipse.setActionCommand(""+ELLIPSE);        ellipse.addActionListener(this);         erase.setActionCommand(""+ERASE);        erase.addActionListener(this);         eraseAll.setActionCommand(""+ERASE_ALL);        eraseAll.addActionListener(this);         moveROI.setActionCommand(""+MOVE_ROI);        moveROI.addActionListener(this);         sizeROI.setActionCommand(""+SIZE_ROI);        sizeROI.addActionListener(this);        analyze.setActionCommand(""+ANALYSE);        analyze.addActionListener(this);        undoErase.setActionCommand(""+UNDO_ERASE);        undoErase.addActionListener(this);                //ComboBox        JComboBox colorsBox = view.getColors(),                 channelsBox = view.getChannels();        colorsBox.addActionListener(this);        colorsBox.setActionCommand(""+COLOR);        channelsBox.addActionListener(this);        channelsBox.setActionCommand(""+CHANNEL);        //Box        JCheckBox drawOnOff = view.getDrawOnOff(),                     textOnOff = view.getTextOnOff(),                     annotationOnOff = view.getAnnotationOnOff();        drawOnOff.addActionListener(this);        drawOnOff.setActionCommand(""+DRAW_ON_OFF);        textOnOff.addActionListener(this);        textOnOff.setActionCommand(""+TEXT_ON_OFF);        annotationOnOff.addActionListener(this);        annotationOnOff.setActionCommand(""+ANNOTATION_ON_OFF);    }