Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Latest Changes. Done by Nikhil.
authorlingutln <lingutln@localhost>
Sat, 18 Feb 2012 22:49:37 +0000 (22:49 +0000)
committerlingutln <lingutln@localhost>
Sat, 18 Feb 2012 22:49:37 +0000 (22:49 +0000)
svn path=/; revision=299

Annotation/src/ie/dcu/apps/ist/AppWindow.java
Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java
Annotation/src/ie/dcu/swt/SwtUtils.java

index 8203b9396b868d3a9fac7eb3ec37db1e82c4a338..eda582216d407679cdcb577e40849d1ba67fb235 100644 (file)
@@ -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));
 
index 59358b2eb48237157749ca6cfefa2277eefce689..91a61d53595021741b2eb30aa53bdb12646065b0 100644 (file)
@@ -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);
+               
+               
        }
        
        
index 640699933411accf0807d7bbc1757d24e476c2a5..ca119c073b893eb6ddee0fa9ff51109da047a831 100644 (file)
@@ -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;
        }