Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Add TextLabels to some UI icons and removed unnecessary icons. From Nikhil.
authorlingutln <lingutln@localhost>
Tue, 2 Apr 2013 20:45:43 +0000 (20:45 +0000)
committerlingutln <lingutln@localhost>
Tue, 2 Apr 2013 20:45:43 +0000 (20:45 +0000)
svn path=/; revision=455

Annotation/resources/config/view.properties
Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java

index 7e24fbe038271722369952eaaaa867ab16f36941..a0cd0acd0c9eca62af3026f1a2877b8bb1f48107 100644 (file)
@@ -7,9 +7,12 @@ SegmentationView.Action.Background.image=file:resources/icons/background.png
 SegmentationView.Action.OperatingMode.text=Labeling Mode
 SegmentationView.Action.OperatingMode.tooltip=Labeling Mode
 SegmentationView.Action.OperatingMode.image=file:resources/icons/copy.png
-SegmentationView.Action.FormSegment.text=Form a segment from current view.
-SegmentationView.Action.FormSegment.tooltip=Form a segment from current view.
+SegmentationView.Action.FormSegment.text=Form segment
+SegmentationView.Action.FormSegment.tooltip=Form a segment from current view
 SegmentationView.Action.FormSegment.image=file:resources/icons/apply.png
+SegmentationView.Action.PredictSegments.text=Predict the segments in the image
+SegmentationView.Action.PredictSegments.tooltip=Predict the segments in the image
+SegmentationView.Action.PredictSegments.image=file:resources/icons/apply.png
 SegmentationView.Action.ZoomIn.text=Zoom In
 SegmentationView.Action.ZoomIn.tooltip=Zoom In
 SegmentationView.Action.ZoomIn.image=file:resources/icons/zoom-in.png
@@ -44,17 +47,17 @@ SegmentationView.Action.Apply.text=Segment@Ctrl+Shift+S
 SegmentationView.Action.Apply.tooltip=Apply new markup now
 SegmentationView.Action.Apply.image=file:resources/icons/run.png
 SegmentationView.Action.SetPainter.text=View :
-SegmentationView.Action.SetPainter.tooltip=Select how to view the image/segmentation.
+SegmentationView.Action.SetPainter.tooltip=Select how to view the image/segmentation
 SegmentationView.Action.SetPainter.image=
 SegmentationView.Action.SegmenterOptions.text=Configure Segmenter@Ctrl+Shift+C
 SegmentationView.Action.SegmenterOptions.tooltip=Configure the segmenter
 SegmentationView.Action.SegmenterOptions.image=file:resources/icons/preferences.png
 SegmentationView.Action.SetLabel.text=Annotate:
-SegmentationView.Action.SetLabel.tooltip=Annotate the segmented piece.
+SegmentationView.Action.SetLabel.tooltip=Annotate the segmented piece
 SegmentationView.Action.SetLabel.image=
 SegmentationView.Action.SetSpecies.text=Species Name:
-SegmentationView.Action.SetSpecies.tooltip=Type in your species of interest and click the 'Search' button.
+SegmentationView.Action.SetSpecies.tooltip=Type in your species of interest and click the 'Search' button
 SegmentationView.Action.SetSpecies.image=
 SegmentationView.Action.SetCurator.text=Curator Name:
-SegmentationView.Action.SetCurator.tooltip=Select the name of the curator.
+SegmentationView.Action.SetCurator.tooltip=Select the name of the curator
 SegmentationView.Action.SetCurator.image=
index 098ad11d90d3ccefffa882f0203b17200587cc23..b3ac8f837e07867b1cc213ad0f71df3a9bc7df32 100644 (file)
@@ -24,6 +24,7 @@ import java.util.logging.*;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.*;
+import org.eclipse.jface.action.Action;
 import org.eclipse.jface.operation.*;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.SWT;
@@ -103,31 +104,37 @@ public class SegmentationView extends Composite {
        
        
        public enum Tool {
-               Foreground,
-               Background,
-               OperatingMode,
-               FormSegment,
-               PredictSegments,
-               ZoomIn,
-               ZoomOut,
-               ZoomOriginal,
-               ZoomBestFit,
-               Repaint,
-               Undo,
-               Redo,
-               Clear,
-               SetBrushSize,
-               AutoApply,
-               Apply,
-               SetPainter,
-               SetLabel,
-               AssignButton,
-               SetSpecies,
-               SearchSpeciesButton,
-               SetCurator,
-               SegmenterOptions;
+               Foreground(true),
+               Background(true),
+               OperatingMode(true),
+               FormSegment(true),
+               PredictSegments(false),
+               ZoomIn(false),
+               ZoomOut(false),
+               ZoomOriginal(false),
+               ZoomBestFit(false),
+               Repaint(false),
+               Undo(false),
+               Redo(false),
+               Clear(false),
+               SetBrushSize(false),
+               AutoApply(false),
+               Apply(false),
+               SetPainter(false),
+               SetLabel(false),
+               AssignButton(false),
+               SetSpecies(false),
+               SearchSpeciesButton(false),
+               SetCurator(false),
+               SegmenterOptions(false);
                
                private ToolAction action;
+               private boolean isTextLabel;
+               
+               Tool(boolean isTextLabel) {
+                       this.isTextLabel = isTextLabel;
+               }
+               
        };
        
        public enum termDetailLabels {
@@ -135,8 +142,7 @@ public class SegmentationView extends Composite {
                accession_id("Accession ID"),
                aspect("Branch") /* a.k.a. "Aspect" */, 
                definition("Definition"), 
-               comment("Comment")/*, 
-               synonyms("Synonyms")*/;
+               comment("Comment");
                final String extendedLabel;
                termDetailLabels(String extendedLabel) {
                        this.extendedLabel = extendedLabel;
@@ -210,7 +216,7 @@ public class SegmentationView extends Composite {
                //m.add(getAction(Tool.Background));
                m.add(getAction(Tool.OperatingMode));
                m.add(getAction(Tool.FormSegment));
-               m.add(getAction(Tool.PredictSegments));
+               //m.add(getAction(Tool.PredictSegments));
                m.add(new Separator());
                m.add(getAction(Tool.ZoomIn));
                m.add(getAction(Tool.ZoomOut));
@@ -224,8 +230,8 @@ public class SegmentationView extends Composite {
                m.add(new Separator());
                m.add(getAction(Tool.SetBrushSize));
                m.add(new Separator());
-               m.add(getAction(Tool.AutoApply));
-               m.add(getAction(Tool.Apply));
+               //m.add(getAction(Tool.AutoApply));
+               //m.add(getAction(Tool.Apply));
                //m.add(getAction(Tool.SegmenterOptions));
                m.update(true);
        }
@@ -1328,7 +1334,11 @@ public class SegmentationView extends Composite {
                        super(SegmentationView.this.getText(tool), getType(tool));
                        this.tool = tool;
                        setToolTipText(SegmentationView.this.getToolTip(tool));
-                       setImageDescriptor(SegmentationView.this.getImage(tool));
+                       if(tool.isTextLabel) {
+                               setText(SegmentationView.this.getText(tool));
+                       } else {
+                               setImageDescriptor(SegmentationView.this.getImage(tool));
+                       }
                        tool.action = this;
                }
                
@@ -1336,8 +1346,7 @@ public class SegmentationView extends Composite {
                        execute(tool, e);
                }
        }
-       
-       
+
        /**
         * Handles various events coming from the view and toolbar controls.
         *