1 | void setAsText(String value) {↵ | | 1 | void setAsText(String value) {↵
|
2 | initialValue = value;↵ | | 2 | initialValue = value;↵
|
3 | textField.setText(value);↵ | | 3 | textField.setText(value);↵
|
4 | }↵ | | 4 | }↵
|
|
5 | public Object getValue() {↵ | | 5 | public Object getValue() {↵
|
6 | return getAsText();↵ | | 6 | return getAsText();↵
|
7 | }↵ | | 7 | }↵
|
|
8 | public void setValue(Object value) {↵ | | 8 | public void setValue(Object value) {↵
|
9 | if (value instanceof String) {↵ | | 9 | if (value instanceof String) {↵
|
10 | setAsText((String) value);↵ | | 10 | setAsText((String) value);↵
|
11 | } else {↵ | | 11 | } else {↵
|
12 | throw new IllegalArgumentException();↵ | | 12 | throw new IllegalArgumentException();↵
|
13 | }↵ | | 13 | }↵
|
14 | } | | 14 | }
|