1 package com.generalrobotix.ui.util;
3 import org.eclipse.jface.dialogs.IInputValidator;
4 import org.eclipse.jface.dialogs.InputDialog;
5 import org.eclipse.swt.SWT;
6 import org.eclipse.swt.layout.GridData;
7 import org.eclipse.swt.widgets.Composite;
8 import org.eclipse.swt.widgets.Control;
9 import org.eclipse.swt.widgets.Label;
10 import org.eclipse.swt.widgets.Shell;
11 import org.eclipse.swt.widgets.Text;
20 String dialogMessage0, String initialValue0, IInputValidator validator, String dialogMessage1, String initialValue1) {
21 super(parentShell, dialogTitle, dialogMessage0, initialValue0, validator);
22 dialogMessage1_=dialogMessage1;
23 initialValue1_=initialValue1;
27 Composite composite = (Composite)super.createDialogArea(parent);
28 Label label1 =
new Label(composite, SWT.NONE);
29 label1.setText(dialogMessage1_);
30 text1_ =
new Text(composite, SWT.BORDER);
31 text1_.setText(initialValue1_);
32 GridData gridData =
new GridData();
33 gridData.horizontalAlignment=GridData.FILL;
34 text1_.setLayoutData(gridData);
39 value1_=text1_.getText();
40 super.buttonPressed(buttonId);
44 String[] values =
new String[2];
45 values[0]=super.getValue();
#define null
our own NULL pointer