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.*;
private static Button assign;
- private static Text collectionText;
+ private static Text collectionId, comment;
// Current segmentation tool
private Segmenter segmenter;
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() {
gd = new GridData();
gd.verticalAlignment = GridData.BEGINNING;
gd.grabExcessHorizontalSpace = true;
+ gd.grabExcessVerticalSpace = true;
termDetailComposite.setLayoutData(gd);
// Layout term detail table
package ie.dcu.swt;
+import ie.dcu.apps.ist.AppWindow;
import ie.dcu.swt.event.*;
import ie.dcu.util.FileUtils;
*/
public static final int RIGHT = java.awt.Rectangle.OUT_RIGHT;
+ private static AppWindow window;
+
/**
* Clone a rectangle.
*/
GridData data = new GridData();
data.grabExcessVerticalSpace = true;
data.grabExcessHorizontalSpace = true;
+ //data.heightHint = heightInt;
label.setLayoutData(data);
}
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;
}