mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Issue 507 remove company
git-svn-id: https://zxing.googlecode.com/svn/trunk@1518 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
14712eff37
commit
6f3d6a0eff
|
@ -30,14 +30,14 @@ import com.google.gwt.user.client.ui.Widget;
|
|||
public class ContactInfoGenerator implements GeneratorSource {
|
||||
Grid table = null;
|
||||
TextBox name = new TextBox();
|
||||
TextBox company = new TextBox();
|
||||
//TextBox company = new TextBox();
|
||||
TextBox tel = new TextBox();
|
||||
TextBox url = new TextBox();
|
||||
TextBox email = new TextBox();
|
||||
TextBox address = new TextBox();
|
||||
TextBox address2 = new TextBox();
|
||||
TextBox memo = new TextBox();
|
||||
TextBox[] widgets = {name, company, tel, url, email, address, address2, memo};
|
||||
TextBox[] widgets = {name, tel, url, email, address, address2, memo};
|
||||
|
||||
public ContactInfoGenerator(ChangeListener changeListener,
|
||||
KeyPressHandler keyListener) {
|
||||
|
@ -141,9 +141,9 @@ public class ContactInfoGenerator implements GeneratorSource {
|
|||
return parseTextField("Name", name);
|
||||
}
|
||||
|
||||
private String getCompanyField() throws GeneratorException {
|
||||
return parseTextField("Company", company);
|
||||
}
|
||||
//private String getCompanyField() throws GeneratorException {
|
||||
// return parseTextField("Company", company);
|
||||
//}
|
||||
|
||||
private String getTelField() throws GeneratorException {
|
||||
String input = Validators.filterNumber(tel.getText());
|
||||
|
@ -194,24 +194,22 @@ public class ContactInfoGenerator implements GeneratorSource {
|
|||
// early termination if the table has already been constructed
|
||||
return table;
|
||||
}
|
||||
table = new Grid(8, 2);
|
||||
table = new Grid(7, 2);
|
||||
|
||||
table.setText(0, 0, "Name");
|
||||
table.setWidget(0, 1, name);
|
||||
table.setText(1, 0, "Company");
|
||||
table.setWidget(1, 1, company);
|
||||
table.setText(2, 0, "Phone number");
|
||||
table.setWidget(2, 1, tel);
|
||||
table.setText(3, 0, "Email");
|
||||
table.setWidget(3, 1, email);
|
||||
table.setText(4, 0, "Address");
|
||||
table.setWidget(4, 1, address);
|
||||
table.setText(5, 0, "Address 2");
|
||||
table.setWidget(5, 1, address2);
|
||||
table.setText(6, 0, "Website");
|
||||
table.setWidget(6, 1, url);
|
||||
table.setText(7, 0, "Memo");
|
||||
table.setWidget(7, 1, memo);
|
||||
table.setText(1, 0, "Phone number");
|
||||
table.setWidget(1, 1, tel);
|
||||
table.setText(2, 0, "Email");
|
||||
table.setWidget(2, 1, email);
|
||||
table.setText(3, 0, "Address");
|
||||
table.setWidget(3, 1, address);
|
||||
table.setText(4, 0, "Address 2");
|
||||
table.setWidget(4, 1, address2);
|
||||
table.setText(5, 0, "Website");
|
||||
table.setWidget(5, 1, url);
|
||||
table.setText(6, 0, "Memo");
|
||||
table.setWidget(6, 1, memo);
|
||||
|
||||
name.addStyleName(StylesDefs.INPUT_FIELD_REQUIRED);
|
||||
return table;
|
||||
|
@ -219,7 +217,7 @@ public class ContactInfoGenerator implements GeneratorSource {
|
|||
|
||||
public void validate(Widget widget) throws GeneratorException {
|
||||
if (widget == name) getNameField();
|
||||
if (widget == company) getCompanyField();
|
||||
//if (widget == company) getCompanyField();
|
||||
if (widget == tel) getTelField();
|
||||
if (widget == email) getEmailField();
|
||||
if (widget == address) getAddressField();
|
||||
|
|
Loading…
Reference in a new issue