Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
More changes to UI. Done by Nikhil.
authorlingutln <lingutln@localhost>
Fri, 5 Apr 2013 19:41:59 +0000 (19:41 +0000)
committerlingutln <lingutln@localhost>
Fri, 5 Apr 2013 19:41:59 +0000 (19:41 +0000)
svn path=/; revision=460

Annotation/src/ie/dcu/apps/ist/labelling/OntologyTerm.java
Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java

index e79e5b998de9f08dba97a41f12dc8a6797981df7..76b22abac52991f045fdb209782aaf87cf3e9e2c 100644 (file)
@@ -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&#237;") + " {" + this.accessionId + "}";
+               return StringEscapeUtils.unescapeHtml4(this.name) + " {" + this.accessionId + "}";
        }
 
        public void setAccessionId(String accessionId) {
index 3dbe79409925fc50faf9eb5749a1323eb8014ac6..246f4b421a1e08132911ecfe242d84562ad0fb72 100644 (file)
@@ -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);