Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Right panel elements added. Done by Nikhil.
authorlingutln <lingutln@localhost>
Mon, 6 Feb 2012 22:25:11 +0000 (22:25 +0000)
committerlingutln <lingutln@localhost>
Mon, 6 Feb 2012 22:25:11 +0000 (22:25 +0000)
svn path=/; revision=295

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

index 2f5ce6f027451628f61e429bcd78b00370a6f7ab..9391788962a091b5c9c830a15fdf1fd05fd6c917 100644 (file)
@@ -26,6 +26,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.*;
 import org.eclipse.swt.widgets.*;
 
@@ -77,7 +78,7 @@ public class SegmentationView extends Composite {
        
        private static Button assign;
        
-       private static Text collectionText;
+       private static Text collectionId, comment;
        
        // Current segmentation tool
        private Segmenter segmenter;
@@ -348,7 +349,10 @@ public class SegmentationView extends Composite {
                        curatorCombo.add(curator);
                // text field for collection Id
                SwtUtils.addLabelToComposite(termDetailComposite, "Collection Id");
-               collectionText = SwtUtils.addTextFieldToComposite(termDetailComposite, 150);
+               collectionId = SwtUtils.addTextFieldToComposite(termDetailComposite, 140);
+               // Comments Text Area
+               SwtUtils.addLabelToComposite(termDetailComposite, "Comments");
+               comment = SwtUtils.addTextAreaToComposite(termDetailComposite, 150);
        }
        
        private void layoutControls() {
@@ -406,6 +410,7 @@ public class SegmentationView extends Composite {
                gd = new GridData();
                gd.verticalAlignment = GridData.BEGINNING;
                gd.grabExcessHorizontalSpace = true;
+               gd.grabExcessVerticalSpace = true;
                termDetailComposite.setLayoutData(gd);
                
                // Layout term detail table                             
index 25420328e5f31a0ce5d465840b33c1b56cff26ab..640699933411accf0807d7bbc1757d24e476c2a5 100644 (file)
@@ -1,5 +1,6 @@
 package ie.dcu.swt;
 
+import ie.dcu.apps.ist.AppWindow;
 import ie.dcu.swt.event.*;
 import ie.dcu.util.FileUtils;
 
@@ -38,6 +39,8 @@ public class SwtUtils {
         */
        public static final int RIGHT  = java.awt.Rectangle.OUT_RIGHT;
 
+       private static AppWindow window;
+
        /**
         * Clone a rectangle.
         */
@@ -585,6 +588,7 @@ public class SwtUtils {
                GridData data = new GridData();
                data.grabExcessVerticalSpace = true;
                data.grabExcessHorizontalSpace = true;
+               //data.heightHint = heightInt;
                label.setLayoutData(data);
        }
        
@@ -592,16 +596,30 @@ public class SwtUtils {
                Composite box = new Composite(parent, SWT.NONE);
                box.setLayout(new GridLayout(SWT.FILL,false));
                
-               // Create label
-               ToolBar bar = new ToolBar(box,SWT.NONE);
-               ToolItem item = new ToolItem(bar, SWT.SEPARATOR);
-               Text text = new Text(bar, SWT.NONE);
-               item.setWidth(width);
-               item.setControl(text);
+               // Create Single line TextField
+               Text text = new Text(box, SWT.BORDER | SWT.SINGLE);
                
                GridData data = new GridData();
                data.verticalAlignment = SWT.CENTER;
                data.grabExcessHorizontalSpace = true;
+               data.widthHint = width;
+               text.setLayoutData(data);
+               return text;
+       }
+       
+       public static Text addTextAreaToComposite(Composite parent, int width) {
+               
+               Composite box = new Composite(parent, SWT.NONE);
+               box.setLayout(new GridLayout());
+               
+               // Create TextArea
+               Text text = new Text(box, SWT.BORDER | SWT.MULTI);
+               
+               GridData data = new GridData();
+               data.grabExcessVerticalSpace = true;
+               data.grabExcessHorizontalSpace = true;
+               data.heightHint = 100;
+               data.widthHint = 150;
                text.setLayoutData(data);
                return text;
        }