mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
schemes ui: stop edit name when focus is lost
This commit is contained in:
@@ -25,9 +25,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.*;
|
||||
import java.util.Collection;
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -76,6 +74,12 @@ public class SchemesCombo<T extends Scheme> {
|
||||
stopEdit();
|
||||
}
|
||||
}, ENTER_KEY_STROKE, JComponent.WHEN_FOCUSED);
|
||||
nameEditorField.addFocusListener(new FocusAdapter() {
|
||||
@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
stopEdit();
|
||||
}
|
||||
});
|
||||
return nameEditorField;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user