@@ -29,20 +29,19 @@ class EnterPasswordDialog(project: Project) : DialogWrapper(project, true, IdeMo
29
29
}
30
30
}
31
31
32
- private var myPasswordInput = JBPasswordField ()
33
- private val myRememberCheckBox = JBCheckBox (" Remember" , true )
34
-
35
- fun getPassword () = String (myPasswordInput.password)
36
- fun isRemember () = myRememberCheckBox.isSelected
37
-
32
+ private var passwordInput = JBPasswordField ()
33
+ private val rememberCheckBox = JBCheckBox (" Remember" , true )
38
34
private val warningLabel = JLabel ().apply { foreground = JBColor .RED }
39
35
36
+ fun getPassword () = String (passwordInput.password)
37
+ fun isRemember () = rememberCheckBox.isSelected
38
+
40
39
init {
41
40
title = " Enter PIN"
42
41
43
42
init ()
44
43
45
- myPasswordInput .addKeyListener(object : KeyAdapter () {
44
+ passwordInput .addKeyListener(object : KeyAdapter () {
46
45
override fun keyReleased (e : KeyEvent ) {
47
46
if (getPassword().any { it in ' А' .. ' я' || it == ' ё' || it == ' Ё' }) {
48
47
warningLabel.text = " PIN should contain only English characters and numbers!"
@@ -53,12 +52,12 @@ class EnterPasswordDialog(project: Project) : DialogWrapper(project, true, IdeMo
53
52
})
54
53
}
55
54
56
- override fun getPreferredFocusedComponent () = myPasswordInput
55
+ override fun getPreferredFocusedComponent () = passwordInput
57
56
58
57
override fun createSouthAdditionalPanel (): JPanel {
59
58
return panel {
60
59
row {
61
- cell(myRememberCheckBox )
60
+ cell(rememberCheckBox )
62
61
}
63
62
}
64
63
}
@@ -70,7 +69,7 @@ class EnterPasswordDialog(project: Project) : DialogWrapper(project, true, IdeMo
70
69
}.topGap(TopGap .NONE )
71
70
72
71
row {
73
- cell(myPasswordInput )
72
+ cell(passwordInput )
74
73
.align(AlignX .FILL )
75
74
}.bottomGap(BottomGap .NONE )
76
75
0 commit comments