From: lingutln Date: Tue, 2 Apr 2013 20:45:43 +0000 (+0000) Subject: Add TextLabels to some UI icons and removed unnecessary icons. From Nikhil. X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=e1788cca8879fe268722df3b4fa2b5b30310ade7;p=old-jaiswallab-svn%2F.git Add TextLabels to some UI icons and removed unnecessary icons. From Nikhil. svn path=/; revision=455 --- diff --git a/Annotation/resources/config/view.properties b/Annotation/resources/config/view.properties index 7e24fbe..a0cd0ac 100644 --- a/Annotation/resources/config/view.properties +++ b/Annotation/resources/config/view.properties @@ -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= diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index 098ad11..b3ac8f8 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -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. *