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();
// 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() {
// 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;
}
}
-
public void setSegmenter(Segmenter segmenter) {
if (this.segmenter != segmenter) {
SegmentationContext ctx = view.getContext();
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));
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());
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;
}