|
@@ -8,15 +8,13 @@ |
8 |
8 |
|
|
9 |
9 |
|
import com.google.gwt.user.client.ui.*; |
10 |
10 |
|
|
11 |
|
- |
public class PersonalInfoForm extends SizeableVerticalPanel |
12 |
|
- |
{ |
|
11 |
+ |
public class PersonalInfoForm extends SizeableVerticalPanel { |
13 |
12 |
|
// private static final ResourceKeyNameURL ERROR_RESOURCE = new ResourceKeyNameURL( "VW2", "Volkswagen2", "common/images/misc/tmp/vw.jpg" ); |
14 |
13 |
|
|
15 |
14 |
|
// private final List<Enableable> mFormComponents = new ArrayList<Enableable>(); |
16 |
15 |
|
// private Button mEnable, mDisable, mDialog; |
17 |
16 |
|
|
18 |
|
- |
public PersonalInfoForm() |
19 |
|
- |
{ |
|
17 |
+ |
public PersonalInfoForm() { |
20 |
18 |
|
stretchable(); |
21 |
19 |
|
|
22 |
20 |
|
HorizontalPanel zHPanel; |
|
@@ -35,7 +33,8 @@ |
35 |
33 |
|
// zTimestampPicker.addFormComponentListener( new MyListener( new SimpleTimestamp( 1960, 1, 2, 3, 4 ) ) ); |
36 |
34 |
|
// zHPanel.add( zTimestampPicker ); |
37 |
35 |
|
// |
38 |
|
- |
// FormDatePicker zCalendar = new FormDatePicker( "Calendar", null, "Pick-a-Date", "Cancel", "Today", new DateFormatControl( DateFormatControl.DEFAULT_DATE_FORMAT ) ); |
|
36 |
+ |
// FormDatePicker zCalendar = new FormDatePicker( "Calendar", null, "Pick-a-Date", "Cancel", "Today", |
|
37 |
+ |
// new DateFormatControl( DateFormatControl.DEFAULT_DATE_FORMAT ) ); |
39 |
38 |
|
// zCalendar.addFormComponentListener( new MyListener( new SimpleDate( 1957, 1, 4 ) ) ); |
40 |
39 |
|
// zHPanel.add( zCalendar ); |
41 |
40 |
|
// |
|
@@ -153,34 +152,29 @@ |
153 |
152 |
|
// } |
154 |
153 |
|
// } |
155 |
154 |
|
|
156 |
|
- |
private static class MyListener implements IFormComponent.Listener |
157 |
|
- |
{ |
|
155 |
+ |
private static class MyListener implements IFormComponent.Listener { |
158 |
156 |
|
protected IFormComponent mComponent; |
159 |
157 |
|
private Object mErrorValue; |
160 |
158 |
|
protected Object mOrigValue, mCurValue; |
161 |
159 |
|
private String mWhat; |
162 |
160 |
|
|
163 |
|
- |
public MyListener( Object pErrorValue ) |
164 |
|
- |
{ |
|
161 |
+ |
public MyListener( Object pErrorValue ) { |
165 |
162 |
|
mErrorValue = pErrorValue; |
166 |
163 |
|
} |
167 |
164 |
|
|
168 |
165 |
|
@Override |
169 |
|
- |
public void add( IFormComponent pComponent ) |
170 |
|
- |
{ |
|
166 |
+ |
public void add( IFormComponent pComponent ) { |
171 |
167 |
|
mComponent = pComponent; |
172 |
168 |
|
mOrigValue = mCurValue = mComponent.getCurrentValue(); |
173 |
169 |
|
mWhat = Objects.justClassNameOf( mComponent ); |
174 |
170 |
|
} |
175 |
171 |
|
|
176 |
172 |
|
@Override |
177 |
|
- |
public void remove( IFormComponent pComponent ) |
178 |
|
- |
{ |
|
173 |
+ |
public void remove( IFormComponent pComponent ) { |
179 |
174 |
|
} |
180 |
175 |
|
|
181 |
176 |
|
@Override |
182 |
|
- |
public void changeOccurred() |
183 |
|
- |
{ |
|
177 |
+ |
public void changeOccurred() { |
184 |
178 |
|
mCurValue = mComponent.getCurrentValue(); |
185 |
179 |
|
// System.out.println( mWhat + " Change: '" + mCurValue + "'" ); |
186 |
180 |
|
printToStatusbar( mWhat + " Change: '" + mCurValue + "'" ); |
|
@@ -189,8 +183,7 @@ |
189 |
183 |
|
} |
190 |
184 |
|
|
191 |
185 |
|
@Override |
192 |
|
- |
public void blurOccurred() |
193 |
|
- |
{ |
|
186 |
+ |
public void blurOccurred() { |
194 |
187 |
|
// System.out.println( mWhat + " Blur" ); |
195 |
188 |
|
printToStatusbar( mWhat + " Blur" ); |
196 |
189 |
|
mComponent.setFocused( false ); |
|
@@ -198,15 +191,13 @@ |
198 |
191 |
|
} |
199 |
192 |
|
|
200 |
193 |
|
@Override |
201 |
|
- |
public void focusOccured() |
202 |
|
- |
{ |
|
194 |
+ |
public void focusOccured() { |
203 |
195 |
|
mComponent.setFocused( true ); |
204 |
196 |
|
// System.out.println( mWhat + " Focus" ); |
205 |
197 |
|
printToStatusbar( mWhat + " Focus" ); |
206 |
198 |
|
} |
207 |
199 |
|
|
208 |
|
- |
public void setCurrentValue( String pNewValue ) |
209 |
|
- |
{ |
|
200 |
+ |
public void setCurrentValue( String pNewValue ) { |
210 |
201 |
|
mComponent.setCurrentValue( pNewValue ); |
211 |
202 |
|
mCurValue = mOrigValue = mComponent.getCurrentValue(); |
212 |
203 |
|
mComponent.setValueChanged( false ); |
|
@@ -214,8 +205,7 @@ |
214 |
205 |
|
} |
215 |
206 |
|
|
216 |
207 |
|
@Override |
217 |
|
- |
public void enterPressed( KeyboardKeyModifier pModifiers ) |
218 |
|
- |
{ |
|
208 |
+ |
public void enterPressed( KeyboardKeyModifier pModifiers ) { |
219 |
209 |
|
} |
220 |
210 |
|
} |
221 |
211 |
|
|
|
@@ -390,8 +380,7 @@ |
390 |
380 |
|
// } |
391 |
381 |
|
// } |
392 |
382 |
|
|
393 |
|
- |
private static void printToStatusbar( String pMessage ) |
394 |
|
- |
{ |
|
383 |
+ |
private static void printToStatusbar( String pMessage ) { |
395 |
384 |
|
System.out.println( pMessage ); |
396 |
385 |
|
String current = StatusBar.get(); |
397 |
386 |
|
StatusBar.set( pMessage + " | " + current ); |