TwoInputDialog.java
Go to the documentation of this file.
1 package com.generalrobotix.ui.util;
2 
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;
12 
13 public class TwoInputDialog extends InputDialog {
14  private String dialogMessage1_=null;
15  private String initialValue1_=null;
16  private String value1_=null;
17  private Text text1_=null;
18 
19  public TwoInputDialog(Shell parentShell, String dialogTitle,
20  String dialogMessage0, String initialValue0, IInputValidator validator, String dialogMessage1, String initialValue1) {
21  super(parentShell, dialogTitle, dialogMessage0, initialValue0, validator);
22  dialogMessage1_=dialogMessage1;
23  initialValue1_=initialValue1;
24  }
25 
26  protected Control createDialogArea(Composite parent) {
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);
35  return composite;
36  }
37 
38  protected void buttonPressed(int buttonId) {
39  value1_=text1_.getText();
40  super.buttonPressed(buttonId);
41  }
42 
43  public String[] getValues(){
44  String[] values = new String[2];
45  values[0]=super.getValue();
46  values[1]=value1_;
47  return values;
48  }
49 
50 }
#define null
our own NULL pointer
Definition: IceTypes.h:57
Control createDialogArea(Composite parent)
org
TwoInputDialog(Shell parentShell, String dialogTitle, String dialogMessage0, String initialValue0, IInputValidator validator, String dialogMessage1, String initialValue1)


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:05