1 | void firePropertyChange() {↵ | | 1 | void firePropertyChange() {↵
|
2 | String newValue = getAsText();↵ | | 2 | String newValue = getAsText();↵
|
|
3 | if (initialValue.equals(newValue)) {↵ | | 3 | if (initialValue.equals(newValue)) {↵
|
4 | return;↵ | | 4 | return;↵
|
5 | }↵ | | 5 | }↵
|
6 | initialValue = newValue;↵ | | 6 | initialValue = newValue;↵
|
|
7 | super.firePropertyChange();↵ | | 7 | super.firePropertyChange();↵
|
8 | }↵ | | 8 | }↵
|
|
9 | /*↵ | | 9 | /*↵
|
10 | * (non-Javadoc)↵ | | 10 | * (non-Javadoc)↵
|
11 | * ↵ | | 11 | * ↵
|
12 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)↵ | | 12 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)↵
|
13 | */↵ | | 13 | */↵
|
14 | public void actionPerformed(ActionEvent e) {↵ | | 14 | public void actionPerformed(ActionEvent e) {↵
|
15 | firePropertyChange();↵ | | 15 | firePropertyChange();↵
|
16 | }↵ | | 16 | }↵
|
|
17 | /*↵ | | 17 | /*↵
|
18 | * (non-Javadoc)↵ | | 18 | * (non-Javadoc)↵
|
19 | * ↵ | | 19 | * ↵
|
20 | * @see java.awt.event.FocusListener#focusGained(java.awt.event.FocusEvent)↵ | | 20 | * @see java.awt.event.FocusListener#focusGained(java.awt.event.FocusEvent)↵
|
21 | */↵ | | 21 | */↵
|
22 | public void focusGained(FocusEvent e) {↵ | | 22 | public void focusGained(FocusEvent e) {↵
|
23 | }↵ | | 23 | }↵
|
|
24 | /*↵ | | 24 | /*↵
|
25 | * (non-Javadoc)↵ | | 25 | * (non-Javadoc)↵
|
26 | * ↵ | | 26 | * ↵
|
27 | * @see java.awt.event.FocusListener#focusLost(java.awt.event.FocusEvent)↵ | | 27 | * @see java.awt.event.FocusListener#focusLost(java.awt.event.FocusEvent)↵
|
28 | */↵ | | 28 | */↵
|
29 | public void focusLost(FocusEvent e) {↵ | | 29 | public void focusLost(FocusEvent e) {↵
|
30 | firePropertyChange();↵ | | 30 | firePropertyChange();↵
|
31 | | | 31 |
|