File tree 1 file changed +7
-15
lines changed
app/src/cc/arduino/contributions/ui
1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change 33
33
import javax .swing .event .DocumentEvent ;
34
34
import javax .swing .event .DocumentListener ;
35
35
import java .awt .*;
36
- import java .awt .event .ActionEvent ;
37
- import java .awt .event .ActionListener ;
38
36
import java .awt .event .FocusEvent ;
39
37
import java .awt .event .FocusListener ;
40
38
@@ -51,12 +49,9 @@ public FilterJTextField(String hint) {
51
49
52
50
showingHint = true ;
53
51
updateStyle ();
54
- timer = new Timer (1000 , new ActionListener () {
55
- @ Override
56
- public void actionPerformed (ActionEvent e ) {
57
- applyFilter ();
58
- timer .stop ();
59
- }
52
+ timer = new Timer (1000 , e -> {
53
+ applyFilter ();
54
+ timer .stop ();
60
55
});
61
56
62
57
addFocusListener (new FocusListener () {
@@ -90,14 +85,11 @@ public void changedUpdate(DocumentEvent e) {
90
85
}
91
86
});
92
87
93
- addActionListener (new ActionListener () {
94
- @ Override
95
- public void actionPerformed (ActionEvent e ) {
96
- if (timer .isRunning ()) {
97
- timer .stop ();
98
- }
99
- applyFilter ();
88
+ addActionListener (e -> {
89
+ if (timer .isRunning ()) {
90
+ timer .stop ();
100
91
}
92
+ applyFilter ();
101
93
});
102
94
}
103
95
You can’t perform that action at this time.
0 commit comments