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
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=
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;
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 {
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;
//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));
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);
}
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;
}
execute(tool, e);
}
}
-
-
+
/**
* Handles various events coming from the view and toolbar controls.
*