1 package org.cafesip.gwtcomp.examples.client;
2
3 import org.cafesip.gwtcomp.client.ui.DataEntryPanel;
4 import org.cafesip.gwtcomp.client.ui.MessageBar;
5 import org.cafesip.gwtcomp.client.ui.TitleBar;
6 import org.cafesip.gwtcomp.client.ui.WizardPanel;
7
8 import com.google.gwt.user.client.ui.Button;
9 import com.google.gwt.user.client.ui.Label;
10 import com.google.gwt.user.client.ui.ListBox;
11 import com.google.gwt.user.client.ui.TextArea;
12 import com.google.gwt.user.client.ui.TextBox;
13
14 public class PersonalInfoPanel extends DataEntryPanel
15 {
16 private TextBox name = new TextBox();
17 private TextBox email = new TextBox();
18 private TextArea address = new TextArea();
19 private ListBox cities = new ListBox();
20 private ListBox counties = new ListBox();
21
22
23 public PersonalInfoPanel(WizardPanel parent)
24 {
25 setTitleBar(new TitleBar("Personal Information", null, 2));
26
27
28
29
30 new MessageBar();
31
32
33 name.setName("name");
34 addField(new Label("Name"), name, true);
35
36 email.setName("email");
37 addField(new Label("Email"), email, true);
38
39 address.setName("address");
40 addField(new Label("Address"), address);
41
42 cities.addItem("Raleigh");
43 cities.addItem("Durham");
44 cities.addItem("Apex");
45 cities.addItem("Chapel Hill");
46
47 cities.setName("city");
48 addField(new Label("City"), cities);
49
50 addField(new Label("OR"));
51
52 counties.addItem("Wake");
53 counties.addItem("Durham");
54 counties.addItem("Orange");
55
56 counties.setName("county");
57 addField(new Label("County"), counties);
58
59 Button okButton = new Button("Apply");
60 Button cancelButton = new Button("Cancel");
61 getButtonBar().addButton(okButton);
62 getButtonBar().addButton(cancelButton);
63
64
65
66 getButtonBar().setVisible(false);
67 }
68
69
70
71
72
73 public TextArea getAddress()
74 {
75 return address;
76 }
77
78
79
80
81
82 public ListBox getCities()
83 {
84 return cities;
85 }
86
87
88
89
90
91 public TextBox getEmail()
92 {
93 return email;
94 }
95
96
97
98
99
100 public TextBox getName()
101 {
102 return name;
103 }
104
105
106
107
108
109 public ListBox getCounties()
110 {
111 return counties;
112 }
113
114 }