Example #1
0
  private void ok() {
    if (Const.isEmpty(wStepname.getText())) return;

    stepname = wStepname.getText(); // return value
    // Table table = wFields.table;

    int count = wFields.nrNonEmpty();
    input.allocate(count);

    for (int i = 0; i < count; i++) {
      TableItem item = wFields.getNonEmpty(i);
      input.getFieldName()[i] = item.getText(1);
      input.getFieldValue()[i] = item.getText(2);
    }
    dispose();
  }
Example #2
0
  /** Copy information from the meta-data input to the dialog fields. */
  public void getData() {
    wStepname.setText(stepname);

    for (int i = 0; i < input.getFieldName().length; i++) {
      TableItem item = wFields.table.getItem(i);
      String name = input.getFieldName()[i];
      String type = input.getFieldValue()[i];

      if (name != null) item.setText(1, name);
      if (type != null) item.setText(2, type);
    }

    wFields.setRowNums();
    wFields.optWidth(true);

    wStepname.selectAll();
    wStepname.setFocus();
  }