mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -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 {
|
public class ContactInfoGenerator implements GeneratorSource {
|
||||||
Grid table = null;
|
Grid table = null;
|
||||||
TextBox name = new TextBox();
|
TextBox name = new TextBox();
|
||||||
TextBox company = new TextBox();
|
//TextBox company = new TextBox();
|
||||||
TextBox tel = new TextBox();
|
TextBox tel = new TextBox();
|
||||||
TextBox url = new TextBox();
|
TextBox url = new TextBox();
|
||||||
TextBox email = new TextBox();
|
TextBox email = new TextBox();
|
||||||
TextBox address = new TextBox();
|
TextBox address = new TextBox();
|
||||||
TextBox address2 = new TextBox();
|
TextBox address2 = new TextBox();
|
||||||
TextBox memo = 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,
|
public ContactInfoGenerator(ChangeListener changeListener,
|
||||||
KeyPressHandler keyListener) {
|
KeyPressHandler keyListener) {
|
||||||
|
@ -141,9 +141,9 @@ public class ContactInfoGenerator implements GeneratorSource {
|
||||||
return parseTextField("Name", name);
|
return parseTextField("Name", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getCompanyField() throws GeneratorException {
|
//private String getCompanyField() throws GeneratorException {
|
||||||
return parseTextField("Company", company);
|
// return parseTextField("Company", company);
|
||||||
}
|
//}
|
||||||
|
|
||||||
private String getTelField() throws GeneratorException {
|
private String getTelField() throws GeneratorException {
|
||||||
String input = Validators.filterNumber(tel.getText());
|
String input = Validators.filterNumber(tel.getText());
|
||||||
|
@ -194,24 +194,22 @@ public class ContactInfoGenerator implements GeneratorSource {
|
||||||
// early termination if the table has already been constructed
|
// early termination if the table has already been constructed
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
table = new Grid(8, 2);
|
table = new Grid(7, 2);
|
||||||
|
|
||||||
table.setText(0, 0, "Name");
|
table.setText(0, 0, "Name");
|
||||||
table.setWidget(0, 1, name);
|
table.setWidget(0, 1, name);
|
||||||
table.setText(1, 0, "Company");
|
table.setText(1, 0, "Phone number");
|
||||||
table.setWidget(1, 1, company);
|
table.setWidget(1, 1, tel);
|
||||||
table.setText(2, 0, "Phone number");
|
table.setText(2, 0, "Email");
|
||||||
table.setWidget(2, 1, tel);
|
table.setWidget(2, 1, email);
|
||||||
table.setText(3, 0, "Email");
|
table.setText(3, 0, "Address");
|
||||||
table.setWidget(3, 1, email);
|
table.setWidget(3, 1, address);
|
||||||
table.setText(4, 0, "Address");
|
table.setText(4, 0, "Address 2");
|
||||||
table.setWidget(4, 1, address);
|
table.setWidget(4, 1, address2);
|
||||||
table.setText(5, 0, "Address 2");
|
table.setText(5, 0, "Website");
|
||||||
table.setWidget(5, 1, address2);
|
table.setWidget(5, 1, url);
|
||||||
table.setText(6, 0, "Website");
|
table.setText(6, 0, "Memo");
|
||||||
table.setWidget(6, 1, url);
|
table.setWidget(6, 1, memo);
|
||||||
table.setText(7, 0, "Memo");
|
|
||||||
table.setWidget(7, 1, memo);
|
|
||||||
|
|
||||||
name.addStyleName(StylesDefs.INPUT_FIELD_REQUIRED);
|
name.addStyleName(StylesDefs.INPUT_FIELD_REQUIRED);
|
||||||
return table;
|
return table;
|
||||||
|
@ -219,7 +217,7 @@ public class ContactInfoGenerator implements GeneratorSource {
|
||||||
|
|
||||||
public void validate(Widget widget) throws GeneratorException {
|
public void validate(Widget widget) throws GeneratorException {
|
||||||
if (widget == name) getNameField();
|
if (widget == name) getNameField();
|
||||||
if (widget == company) getCompanyField();
|
//if (widget == company) getCompanyField();
|
||||||
if (widget == tel) getTelField();
|
if (widget == tel) getTelField();
|
||||||
if (widget == email) getEmailField();
|
if (widget == email) getEmailField();
|
||||||
if (widget == address) getAddressField();
|
if (widget == address) getAddressField();
|
||||||
|
|
Loading…
Reference in a new issue