From 3c492dc8bd18be5053c531310226181d25e37c6a Mon Sep 17 00:00:00 2001 From: lingutln Date: Wed, 1 Feb 2012 23:47:37 +0000 Subject: [PATCH] Added two fields and alignments to the right panel. Done by Nikhil. svn path=/; revision=292 --- .../dcu/apps/ist/views/SegmentationView.java | 59 +++++++---------- Annotation/src/ie/dcu/swt/SwtUtils.java | 63 ++++++++++++++++++- 2 files changed, 86 insertions(+), 36 deletions(-) diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index d803e34..2f5ce6f 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -12,7 +12,6 @@ import ie.dcu.segment.options.SegmenterOptionDialog; import ie.dcu.segment.painters.SegmentationPainter; import ie.dcu.swt.*; import ie.dcu.swt.event.*; -import ie.dcu.swt.layout.LayoutFactory; import java.lang.reflect.InvocationTargetException; import java.net.*; @@ -20,7 +19,6 @@ import java.util.ArrayList; import java.util.Properties; import java.util.logging.*; -import org.apache.commons.lang3.StringEscapeUtils; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.*; import org.eclipse.jface.operation.*; @@ -49,8 +47,6 @@ public class SegmentationView extends Composite { // tool bars private final ToolBar mainToolbar, viewSelectionToolbar, termLookupBar; - private ToolBar termDetailToolbar; - // Composite for Term details private Composite termDetailComposite; @@ -77,10 +73,12 @@ public class SegmentationView extends Composite { // Combo box housing the selectable views private Combo combo; - public static Combo comboLabel,curatorCombo; + public static Combo comboLabel,curatorCombo,dummyCombo; private static Button assign; + private static Text collectionText; + // Current segmentation tool private Segmenter segmenter; @@ -116,7 +114,8 @@ public class SegmentationView extends Composite { SetLabel, AssignButton, SetCurator, - SegmenterOptions; + SegmenterOptions, + CollectionId; private ToolAction action; }; @@ -139,7 +138,7 @@ public class SegmentationView extends Composite { viewSelectionToolbar = new ToolBar(this, SWT.RIGHT | SWT.FLAT); termLookupBar = new ToolBar(this, SWT.RIGHT | SWT.FLAT); view = new AnnotatedImageControl(this, SWT.BORDER); - termDetailComposite = new Composite(this, SWT.BORDER | SWT.RIGHT | SWT.FLAT); + termDetailComposite = new Composite(this, SWT.BORDER); brushControl = new BrushControl(getShell(), SWT.BORDER); eventHandler = new EventHandler(); @@ -309,14 +308,11 @@ public class SegmentationView extends Composite { * Set initial properties of the Term Detail right pane */ private void createTermDetailTable() { - termDetailTable = new Table(termDetailComposite, SWT.BORDER | SWT.FULL_SELECTION); + // Toolbar for holding detail fields + termDetailTable = SwtUtils.addTable(termDetailComposite); termDetailTable.setLinesVisible (true); termDetailTable.setHeaderVisible (true); - GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); - //data.heightHint = 200; - - termDetailTable.setLayoutData(data); String[] titles = {"Label","Data"}; for (int i=0; i