From b7a0b8f4dd431142cea2aa627de88d73161430a2 Mon Sep 17 00:00:00 2001 From: lingutln Date: Mon, 26 Dec 2011 22:45:33 +0000 Subject: [PATCH] Toggling between segmentation and labeling functionality. Done by Nikhil. svn path=/; revision=239 --- Annotation/.classpath | 22 +++++++++---------- .../apps/ist/controllers/AnnotationTool.java | 2 +- .../dcu/apps/ist/views/SegmentationView.java | 9 ++++---- .../ist/widgets/AnnotatedImageControl.java | 4 ++-- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Annotation/.classpath b/Annotation/.classpath index 8e0a039..22412b6 100644 --- a/Annotation/.classpath +++ b/Annotation/.classpath @@ -1,11 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/Annotation/src/ie/dcu/apps/ist/controllers/AnnotationTool.java b/Annotation/src/ie/dcu/apps/ist/controllers/AnnotationTool.java index e02fecf..96ae645 100644 --- a/Annotation/src/ie/dcu/apps/ist/controllers/AnnotationTool.java +++ b/Annotation/src/ie/dcu/apps/ist/controllers/AnnotationTool.java @@ -106,7 +106,7 @@ public class AnnotationTool extends MouseMotionAdapter { /** * @param type the annotation type to set */ - public void setType(AnnotationType type, boolean isLabelling) { + public void setType(AnnotationType type) { assert (type != null); this.type = type; } diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index c13f1a9..62e0ac0 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -351,8 +351,8 @@ public class SegmentationView extends Composite { } - public void setAnnotationType(AnnotationType type, boolean isLabelling) { - view.setAnnotationType(type, isLabelling); + public void setAnnotationType(AnnotationType type) { + view.setAnnotationType(type); } @@ -435,7 +435,6 @@ public class SegmentationView extends Composite { // Toggling between Segmentation and labelling Tool.Foreground.action.setEnabled(false); Tool.Background.action.setEnabled(false); - setAnnotationType(AnnotationType.Background, true); view.removeContextChangeListener(eventHandler); if(!(view.getTool() == null)) { @@ -733,10 +732,10 @@ public class SegmentationView extends Composite { private void execute(Tool a, Event e) { switch (a) { case Foreground: - setAnnotationType(AnnotationType.Foreground, false); + setAnnotationType(AnnotationType.Foreground); break; case Background: - setAnnotationType(AnnotationType.Background, false); + setAnnotationType(AnnotationType.Background); break; case OperatingMode: setLabellingMode(a.action.isChecked()); diff --git a/Annotation/src/ie/dcu/apps/ist/widgets/AnnotatedImageControl.java b/Annotation/src/ie/dcu/apps/ist/widgets/AnnotatedImageControl.java index f023313..ef1fd10 100644 --- a/Annotation/src/ie/dcu/apps/ist/widgets/AnnotatedImageControl.java +++ b/Annotation/src/ie/dcu/apps/ist/widgets/AnnotatedImageControl.java @@ -127,9 +127,9 @@ public class AnnotatedImageControl extends Composite { } - public void setAnnotationType(AnnotationType type, boolean isLabelling) { + public void setAnnotationType(AnnotationType type) { if (getTool() != null) { - getTool().setType(type, isLabelling); + getTool().setType(type); } } -- 2.34.1