uiDelegate.setComponentsEnabled(false);
    void save()    {        //TODO Add controls if annotated        AnnotationData data = model.getUserAnnotationData();        String text = uiDelegate.getAnnotationText().trim();        if (data == null) { //creation            Object ho = model.getHierarchyObject();            if (ho instanceof ImageData)                data = new AnnotationData(AnnotationData.IMAGE_ANNOTATION);            else if (ho instanceof DatasetData)                data = new AnnotationData(AnnotationData.DATASET_ANNOTATION);            data.setText(text);            model.editAnnotation(data, ClipBoard.CREATE_ANNOTATION);        } else { //update or delete            if (uiDelegate.isAnnotationDeleted()) {                model.editAnnotation(data, ClipBoard.DELETE_ANNOTATION);            } else {                data.setText(text);                model.editAnnotation(data, ClipBoard.UPDATE_ANNOTATION);            }        }    }