Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Minor alignments in Linux and Windows OS. Done by Nikhil.
authorlingutln <lingutln@localhost>
Mon, 20 Feb 2012 20:05:09 +0000 (20:05 +0000)
committerlingutln <lingutln@localhost>
Mon, 20 Feb 2012 20:05:09 +0000 (20:05 +0000)
svn path=/; revision=301

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

index 879cfe3346065ba09076149ff0fadf31f9df45e6..13b424d91dea994e74819d648c366d7f9f288db2 100644 (file)
@@ -142,7 +142,7 @@ public class SegmentationView extends Composite {
                viewSelectionToolbar = 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);
+               termDetailComposite = new Composite(this, SWT.RIGHT | SWT.FLAT);
                
                brushControl = new BrushControl(getShell(), SWT.BORDER);
                eventHandler = new EventHandler();
@@ -368,11 +368,13 @@ public class SegmentationView extends Composite {
                
                // text field for collection Id
                SwtUtils.addLabelToComposite(termDetailComposite, "Collection Id");
-               collectionId = SwtUtils.addTextFieldToComposite(termDetailComposite, 140);
+               collectionId = SwtUtils.addTextFieldToComposite(termDetailComposite);
+               collectionId.setToolTipText( getAction(Tool.SetPainter).getToolTipText());
                
                // Comments Text Area
                SwtUtils.addLabelToComposite(termDetailComposite, "Comments");
-               comment = SwtUtils.addTextAreaToComposite(termDetailComposite, 150);
+               comment = SwtUtils.addTextAreaToComposite(termDetailComposite);
+               comment.setToolTipText( getAction(Tool.SetPainter).getToolTipText());
        }
        
        private void layoutControls() {
@@ -454,16 +456,22 @@ public class SegmentationView extends Composite {
                
                // Layout term detail table                             
                gd = new GridData();
+               gd.widthHint = width;
+               gd.grabExcessHorizontalSpace = true;
+               gd.grabExcessVerticalSpace = true;
                collectionId.setLayoutData(gd);
                
                // Layout term detail table                             
                gd = new GridData();
+               gd.widthHint = width;
+               gd.grabExcessHorizontalSpace = true;
+               gd.grabExcessVerticalSpace = true;
+               gd.verticalAlignment = SWT.FILL;
                comment.setLayoutData(gd);
                
                
        }
        
-       
        private void updatePainters() {
                combo.removeAll();
                boolean first = true;
@@ -476,7 +484,6 @@ public class SegmentationView extends Composite {
                }
        }
        
-       
        public void setSegmenter(Segmenter segmenter) {
                if (this.segmenter != segmenter) {
                        SegmentationContext ctx = view.getContext();
index 13d39ee35d8c9a3ff8448b78a61a3570793cbb02..f627380cf61d0c010b578095f37209c9f70be0ed 100644 (file)
@@ -590,7 +590,7 @@ public class SwtUtils {
                label.setLayoutData(data);
        }
        
-       public static Text addTextFieldToComposite(Composite parent, int width) {
+       public static Text addTextFieldToComposite(Composite parent) {
                Composite box = new Composite(parent, SWT.NONE);
                box.setLayout(new GridLayout(SWT.FILL,false));
                
@@ -598,14 +598,14 @@ public class SwtUtils {
                Text text = new Text(box, SWT.BORDER | SWT.SINGLE);
                
                GridData data = new GridData();
-               data.verticalAlignment = SWT.CENTER;
                data.grabExcessHorizontalSpace = true;
-               //data.widthHint = width;
+               data.grabExcessVerticalSpace = true;
+               data.widthHint = 140;
                text.setLayoutData(data);
                return text;
        }
        
-       public static Text addTextAreaToComposite(Composite parent, int width) {
+       public static Text addTextAreaToComposite(Composite parent) {
                
                Composite box = new Composite(parent, SWT.NONE);
                box.setLayout(new GridLayout());
@@ -614,9 +614,10 @@ public class SwtUtils {
                Text text = new Text(box, SWT.BORDER | SWT.MULTI);
                
                GridData data = new GridData();
-               data.grabExcessVerticalSpace = true;
                data.grabExcessHorizontalSpace = true;
-               data.heightHint = 100;
+               data.grabExcessVerticalSpace = true;
+               data.heightHint = 150;
+               data.widthHint = 150;
                text.setLayoutData(data);
                return text;
        }