From 5728d5e2b965c9c18aa393756aa9ad3f275db007 Mon Sep 17 00:00:00 2001 From: lingutln Date: Fri, 5 Apr 2013 19:41:59 +0000 Subject: [PATCH] More changes to UI. Done by Nikhil. svn path=/; revision=460 --- .../dcu/apps/ist/labelling/OntologyTerm.java | 3 +- .../dcu/apps/ist/views/SegmentationView.java | 30 +++++-------------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/Annotation/src/ie/dcu/apps/ist/labelling/OntologyTerm.java b/Annotation/src/ie/dcu/apps/ist/labelling/OntologyTerm.java index e79e5b9..76b22ab 100644 --- a/Annotation/src/ie/dcu/apps/ist/labelling/OntologyTerm.java +++ b/Annotation/src/ie/dcu/apps/ist/labelling/OntologyTerm.java @@ -40,8 +40,7 @@ public class OntologyTerm { } // returns an HTML-safe label formatted to include both name and accession id public String getFormattedTerm() { - //return StringEscapeUtils.unescapeHtml4(this.name) + " {" + this.accessionId + "}"; - return StringEscapeUtils.unescapeHtml4("cutí") + " {" + this.accessionId + "}"; + return StringEscapeUtils.unescapeHtml4(this.name) + " {" + this.accessionId + "}"; } public void setAccessionId(String accessionId) { diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index 3dbe794..246f4b4 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -695,7 +695,6 @@ public class SegmentationView extends Composite { } } - public Segmenter getSegmenter() { return segmenter; } @@ -707,67 +706,54 @@ public class SegmentationView extends Composite { view.setContext(ctx); } - public SegmentationContext getContext() { return view.getContext(); } - public void setAnnotationType(AnnotationType type) { view.setAnnotationType(type); } - public Canvas getCanvas() { return view.getCanvas(); } - public ImageControl getImageControl() { return view.getImageControl(); } - public void zoomIn() { view.zoomIn(); } - public void zoomOut() { view.zoomOut(); } - public void zoomOriginal() { view.zoomOriginal(); } - public void zoomBestFit() { view.zoomBestFit(); } - public void repaint() { view.repaint(); } - public void undo() { view.undo(); } - public void redo() { view.redo(); } - public void clear() { view.clear(); } - public void setBrushSize(int size) { view.setLineWidth(size); } @@ -1164,24 +1150,24 @@ public class SegmentationView extends Composite { Tool.ZoomBestFit.action.setEnabled(canZoomBestFit()); if(view.getContext() != null) { - comboLabel.setEnabled((view.getContext().getSegmentationMasks().size() > 0) && getLabelMode()); - Tool.AssignButton.action.setEnabled(false); - assign.setEnabled(false); - termDetailTable.setEnabled(false); - termSynonymTable.setEnabled(false); + // SegmentMasks are formed and is in labelmode and no halfdone annotations are conditions for enabling the comboLabel + comboLabel.setEnabled((view.getContext().getSegmentationMasks().size() > 0) && getLabelMode() && !(view.getContext().getAnnotations().canUndo())); + //assign.setEnabled(false); } else { comboLabel.setEnabled(false); } - assign.setEnabled(canZoomBestFit() & !(comboLabel.getText().isEmpty())); - Tool.SegmentMode.action.setChecked(!getLabelMode()); + assign.setEnabled(canZoomBestFit() & !(comboLabel.getText().isEmpty()) && comboLabel.isEnabled()); + termDetailTable.setEnabled(assign.isEnabled()); + termSynonymTable.setEnabled(assign.isEnabled()); + Tool.SegmentMode.action.setChecked(!getLabelMode()); Tool.LabelMode.action.setChecked(getLabelMode()); Tool.Clear.action.setEnabled(canClear()); Tool.AutoApply.action.setChecked(auto); Tool.SegmentMode.action.setEnabled(canZoomIn()); Tool.LabelMode.action.setEnabled(canZoomIn()); - Tool.FormSegment.action.setEnabled(CanLabel()); + Tool.FormSegment.action.setEnabled(CanLabel() && !(Tool.LabelMode.action.isChecked())); // Always enabled if view enabled Tool.SetBrushSize.action.setEnabled(true); -- 2.34.1