File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed
app/src/cc/arduino/contributions/ui Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change 3333import javax .swing .event .DocumentEvent ;
3434import javax .swing .event .DocumentListener ;
3535import java .awt .*;
36- import java .awt .event .ActionEvent ;
37- import java .awt .event .ActionListener ;
3836import java .awt .event .FocusEvent ;
3937import java .awt .event .FocusListener ;
4038
@@ -51,12 +49,9 @@ public FilterJTextField(String hint) {
5149
5250 showingHint = true ;
5351 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 ();
6055 });
6156
6257 addFocusListener (new FocusListener () {
@@ -90,14 +85,11 @@ public void changedUpdate(DocumentEvent e) {
9085 }
9186 });
9287
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 ();
10091 }
92+ applyFilter ();
10193 });
10294 }
10395
You can’t perform that action at this time.
0 commit comments