()
| 134 | } |
| 135 | |
| 136 | private void initLayout() { |
| 137 | this.borderPane = loadBorderPane(); |
| 138 | this.topTextField = loadTopTextField(); |
| 139 | // this.topTextField.setContextMenu(new ContextMenu()); // overrides the bugged default contextmenu |
| 140 | Node topNode = this.borderPane.getTop(); |
| 141 | if ((topNode instanceof HBox)) { |
| 142 | HBox topHBox = (HBox) topNode; |
| 143 | if (!topHBox.getChildren().isEmpty() && topHBox.getChildren().get(0) instanceof Label) { |
| 144 | this.topLabel = (Label) topHBox.getChildren().get(0); |
| 145 | } |
| 146 | HBox.setMargin(this.topTextField, new Insets(-1, -1, 0, -1)); |
| 147 | HBox.setHgrow(this.topTextField, Priority.ALWAYS); |
| 148 | HBox.setMargin(this.topLabel, new Insets(-1, -1, 0, -1)); |
| 149 | HBox.setHgrow(this.topLabel, Priority.ALWAYS); |
| 150 | } |
| 151 | |
| 152 | } |
| 153 | |
| 154 | private BorderPane loadBorderPane() { |
| 155 | Object loadedPreset = FXMLResourceUtil.loadPreset(Resource.PANEPRESET_FXML); // load pane preset from fxml file |
no test coverage detected