From: lingutln Date: Sat, 18 Feb 2012 22:49:37 +0000 (+0000) Subject: Latest Changes. Done by Nikhil. X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=c27ba2c99bf1ca8055d124756ae94155a27aa32d;p=old-jaiswallab-svn%2F.git Latest Changes. Done by Nikhil. svn path=/; revision=299 --- diff --git a/Annotation/src/ie/dcu/apps/ist/AppWindow.java b/Annotation/src/ie/dcu/apps/ist/AppWindow.java index 8203b93..eda5822 100644 --- a/Annotation/src/ie/dcu/apps/ist/AppWindow.java +++ b/Annotation/src/ie/dcu/apps/ist/AppWindow.java @@ -218,7 +218,7 @@ public class AppWindow extends ApplicationWindow implements FileDropListener { super.configureShell(shell); updateWindowTitle(); loadIcons(shell); - shell.setSize(900, 650); + shell.setSize(970, 650); SwtUtils.center(shell); } @@ -251,7 +251,7 @@ public class AppWindow extends ApplicationWindow implements FileDropListener { @Override protected Control createContents(Composite parent) { - content = new Composite(parent, SWT.NONE); + content = new Composite(parent, SWT.BORDER); content.setLayout(LayoutFactory.createGridLayout(0, 0, 1, false)); diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index 59358b2..91a61d5 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -120,7 +120,12 @@ public class SegmentationView extends Composite { }; public enum termDetailLabels { - n("Name"), a("Accession ID"), b("Branch") /* a.k.a. "Aspect" */, d("Definition"), c("Comment"), s("Synonyms"); + n("Name"), + a("Accession ID"), + b("Branch") /* a.k.a. "Aspect" */, + d("Definition"), + c("Comment"), + s("Synonyms"); final String extendedLabel; termDetailLabels(String extendedLabel) { this.extendedLabel = extendedLabel; @@ -135,7 +140,7 @@ public class SegmentationView extends Composite { painters = new PainterRegistry(); mainToolbar = new ToolBar(this, SWT.RIGHT | SWT.FLAT); viewSelectionToolbar = new ToolBar(this, SWT.RIGHT | SWT.FLAT); - termLookupBar = new ToolBar(this, SWT.RIGHT | SWT.FLAT); + termLookupBar = new ToolBar(this, SWT.RIGHT | SWT.FLAT | SWT.BORDER); view = new AnnotatedImageControl(this, SWT.BORDER); termDetailComposite = new Composite(this, SWT.RIGHT | SWT.FLAT | SWT.BORDER); @@ -243,7 +248,7 @@ public class SegmentationView extends Composite { selectDropdownLabel(e); } }); - assign = SwtUtils.addButton(termLookupBar, 52, "Assign"); + assign = SwtUtils.addButton(termLookupBar, 50, "Assign"); assign.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { if(view.getContext().isEnabled()) @@ -394,7 +399,8 @@ public class SegmentationView extends Composite { // Layout viewSelectionToolbar gd = new GridData(); - gd.horizontalAlignment = SWT.FILL; + gd.horizontalAlignment = SWT.RIGHT; + gd.grabExcessHorizontalSpace = true; gd.heightHint = heightHint; viewSelectionToolbar.setLayoutData(gd); @@ -408,26 +414,30 @@ public class SegmentationView extends Composite { gd.verticalAlignment = SWT.FILL; view.setLayoutData(gd); - // Layout term lookup toolbar gd = new GridData(); - gd.horizontalAlignment = SWT.LEFT; + gd.horizontalAlignment = SWT.FILL; gd.grabExcessHorizontalSpace = true; - gd.verticalAlignment = GridData.BEGINNING; gd.verticalIndent = 1; - gd.verticalSpan = 1; + gd.verticalAlignment = GridData.BEGINNING; termLookupBar.setLayoutData(gd); // Layout term detail Composite GridLayout termDetailLayout = new GridLayout(2, false); termDetailComposite.setLayout(termDetailLayout); - + + Point size1 = termDetailTable.computeSize(SWT.DEFAULT, SWT.DEFAULT); + Point size2 = termDetailComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT); + + int width = Math.max(size1.x, size2.x); + // Inner composite properties gd = new GridData(); gd.verticalAlignment = GridData.BEGINNING; - gd.horizontalAlignment = SWT.LEFT; + gd.horizontalAlignment = SWT.FILL; + gd.verticalIndent = 2; + gd.widthHint = width; gd.grabExcessHorizontalSpace = true; - gd.grabExcessVerticalSpace = true; termDetailComposite.setLayoutData(gd); // Layout term detail table @@ -435,6 +445,23 @@ public class SegmentationView extends Composite { gd.horizontalSpan = 2; termDetailTable.setLayoutData(gd); + // Layout term detail table + gd = new GridData(SWT.FILL,SWT.FILL,true,true); + speciesCombo.setLayoutData(gd); + + // Layout term detail table + gd = new GridData(SWT.FILL,SWT.FILL,true,true); + curatorCombo.setLayoutData(gd); + + // Layout term detail table + gd = new GridData(SWT.FILL,SWT.FILL,true,true); + collectionId.setLayoutData(gd); + + // Layout term detail table + gd = new GridData(SWT.FILL,SWT.FILL,true,true); + comment.setLayoutData(gd); + + } diff --git a/Annotation/src/ie/dcu/swt/SwtUtils.java b/Annotation/src/ie/dcu/swt/SwtUtils.java index 6406999..ca119c0 100644 --- a/Annotation/src/ie/dcu/swt/SwtUtils.java +++ b/Annotation/src/ie/dcu/swt/SwtUtils.java @@ -1,6 +1,6 @@ package ie.dcu.swt; -import ie.dcu.apps.ist.AppWindow; + import ie.dcu.swt.event.*; import ie.dcu.util.FileUtils; @@ -39,9 +39,7 @@ public class SwtUtils { */ public static final int RIGHT = java.awt.Rectangle.OUT_RIGHT; - private static AppWindow window; - - /** + /** * Clone a rectangle. */ public static Rectangle clone(Rectangle r) { @@ -602,7 +600,7 @@ public class SwtUtils { GridData data = new GridData(); data.verticalAlignment = SWT.CENTER; data.grabExcessHorizontalSpace = true; - data.widthHint = width; + //data.widthHint = width; text.setLayoutData(data); return text; } @@ -619,7 +617,6 @@ public class SwtUtils { data.grabExcessVerticalSpace = true; data.grabExcessHorizontalSpace = true; data.heightHint = 100; - data.widthHint = 150; text.setLayoutData(data); return text; } @@ -661,7 +658,7 @@ public class SwtUtils { public static Combo addCombo(ToolBar bar, int width, int style) { ToolItem item = new ToolItem(bar, SWT.SEPARATOR); Combo combo = new Combo(bar, style); - item.setWidth(width); + //item.setWidth(width); item.setControl(combo); return combo; }