@@ -45,8 +45,8 @@ public class ConsoleWindowController extends StackPane {
45
45
@ FXML
46
46
private BorderPane borderPane ;
47
47
48
- @ FXML
49
- private JFXTextField commandTextField ;
48
+ // @FXML
49
+ // private JFXTextField commandTextField;
50
50
51
51
@ FXML
52
52
private Button go ;
@@ -65,7 +65,7 @@ public class ConsoleWindowController extends StackPane {
65
65
private final Logger logger = Logger .getLogger (getClass ().getName ());
66
66
67
67
/** The Window */
68
- private Stage window ;
68
+ private final Stage window = new Stage () ;
69
69
70
70
/**
71
71
* The Speech Recognition of the Application
@@ -85,13 +85,6 @@ public enum ConsoleTab {
85
85
*/
86
86
public ConsoleWindowController () {
87
87
88
-
89
- }
90
-
91
- private Stage initFromConstructor () {
92
- Stage window ;
93
- window = new Stage ();
94
-
95
88
// ------------------------------------FXMLLOADER
96
89
final FXMLLoader loader = new FXMLLoader (
97
90
getClass ().getResource (InfoTool .WINDOW_FXMLS + "ConsoleWindowController.fxml" ));
@@ -108,22 +101,21 @@ private Stage initFromConstructor() {
108
101
window .initStyle (StageStyle .UTILITY );
109
102
window .setScene (new Scene (this ));
110
103
this .focusedProperty ().addListener ((observable , oldValue , newValue ) -> {
111
- if (window .isFocused ())
112
- commandTextField .requestFocus ();
104
+ // if (window.isFocused())
105
+ // commandTextField.requestFocus();
113
106
});
114
107
window .getScene ().setOnKeyReleased (k -> {
115
108
if (k .getCode () == KeyCode .ESCAPE )
116
109
window .close ();
117
110
});
118
- return window ;
111
+
119
112
}
120
113
121
114
/**
122
115
* Called as soon as .fxml is initialized
123
116
*/
124
117
@ FXML
125
118
private void initialize () {
126
- window = initFromConstructor ();
127
119
128
120
// -- cssTextArea
129
121
cssTextArea .setEditable (false );
@@ -140,11 +132,11 @@ private void initialize() {
140
132
borderPane .setCenter (vsPane );
141
133
142
134
// commandTextField
143
- commandTextField .setOnAction (a -> procceedCommand (commandTextField .getText ()));
135
+ // commandTextField.setOnAction(a -> procceedCommand(commandTextField.getText()));
144
136
145
137
// go
146
- go .setOnAction (a -> procceedCommand (commandTextField .getText ()));
147
- go .disableProperty ().bind (commandTextField .textProperty ().isEmpty ());
138
+ // go.setOnAction(a -> procceedCommand(commandTextField.getText()));
139
+ // go.disableProperty().bind(commandTextField.textProperty().isEmpty());
148
140
149
141
// close
150
142
close .setOnAction (a -> window .close ());
0 commit comments