+ txt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ if (modifyListener != null)
+ txt.addModifyListener(modifyListener);
+ return txt;
+ }
+
+ public static Text createGridLT(Composite parent, String label) {
+ return createGridLT(parent, label, null);
+ }
+
+ /**
+ * Creates one label and a text field not editable with background color of
+ * the parent (like a label but with selectable text)
+ */
+ public static Text createGridLL(Composite parent, String label, String text) {
+ Text txt = createGridLT(parent, label);
+ txt.setText(text);
+ txt.setEditable(false);
+ txt.setBackground(parent.getBackground());
+ return txt;
+ }
+
+ public static Text createGridLP(Composite parent, String label,
+ ModifyListener modifyListener) {
+ Label lbl = new Label(parent, SWT.LEAD);
+ lbl.setText(label);
+ lbl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+ Text txt = new Text(parent, SWT.LEAD | SWT.BORDER | SWT.PASSWORD);
+ txt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));