Subversion Repository Public Repository

litesoft

Diff Revisions 628 vs 629 for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/input/fieldsupport/InputFieldAccessor.java

Diff revisions: vs.
  @@ -5,15 +5,19 @@
5 5
6 6 public class InputFieldAccessor<T> implements Enableable
7 7 {
8 - private final Widget inputWidget;
9 - private final InputWidgetValidator<T> validator;
10 - private final InputWidgetChangeFilter<T> input;
8 + protected final Widget inputWidget;
9 + protected final InputWidgetValueAdapter<T> valueAdapter;
10 + protected final InputWidgetValidator<T> validator;
11 + protected final InputWidgetChangeFilter<T> input;
12 + protected final Focusable[] focusables;
11 13
12 - public InputFieldAccessor( InputWidgetChangeFilter<T> input, InputWidgetValidator<T> validator, Widget inputWidget )
14 + public InputFieldAccessor( InputWidgetChangeFilter<T> input, InputWidgetValidator<T> validator, InputWidgetValueAdapter<T> valueAdapter, Widget inputWidget, Focusable... focusables )
13 15 {
14 16 this.input = input;
15 17 this.validator = validator;
18 + this.valueAdapter = valueAdapter;
16 19 this.inputWidget = inputWidget;
20 + this.focusables = (focusables != null) ? focusables : new Focusable[0];
17 21 }
18 22
19 23 @Override
  @@ -33,11 +37,11 @@
33 37 return inputWidget;
34 38 }
35 39
36 - /**
37 - * Get the Validator or null if the InputWidget CAN'T have an Error (e.g. RadioGroups).
38 - *
39 - * @return Validator or null
40 - */
40 + public InputWidgetValueAdapter<T> getValueAdapter()
41 + {
42 + return valueAdapter;
43 + }
44 +
41 45 public InputWidgetValidator<T> getValidator()
42 46 {
43 47 return validator;
  @@ -48,6 +52,11 @@
48 52 return input;
49 53 }
50 54
55 + public Focusable[] getFocusables()
56 + {
57 + return focusables;
58 + }
59 +
51 60 private Enableable getEnableable()
52 61 {
53 62 return (inputWidget instanceof Enableable) ? (Enableable)inputWidget : Enableable.ALWAYS_ENABLED;