/** Copy information from the meta-data input to the dialog fields. */ public void getData() { wStepname.setText(stepname); for (int i = 0; i < input.getFieldCCType().length; i++) { TableItem item = wFields.table.getItem(i); String type = input.getFieldCCType()[i]; String len = input.getFieldCCLength()[i]; String size = input.getFieldCCSize()[i]; if (type != null) item.setText(1, type); if (len != null) item.setText(2, len); if (size != null) item.setText(3, size); } wFields.setRowNums(); wFields.optWidth(true); if (input.getCardNumberFieldName() != null) wCCNumberField.setText(input.getCardNumberFieldName()); if (input.getCardTypeFieldName() != null) wCCTypeField.setText(input.getCardTypeFieldName()); if (input.getCardLengthFieldName() != null) wCCLengthField.setText(input.getCardLengthFieldName()); wStepname.selectAll(); }
private void getInfo(RandomCCNumberGeneratorMeta in) throws KettleException { stepname = wStepname.getText(); // return value int count = wFields.nrNonEmpty(); in.allocate(count); for (int i = 0; i < count; i++) { TableItem item = wFields.getNonEmpty(i); in.getFieldCCType()[i] = item.getText(1); in.getFieldCCLength()[i] = item.getText(2); in.getFieldCCSize()[i] = item.getText(3); } in.setCardNumberFieldName(wCCNumberField.getText()); in.setCardTypeFieldName(wCCTypeField.getText()); in.setCardLengthFieldName(wCCLengthField.getText()); }