()
| 35 | } |
| 36 | |
| 37 | private void init() { |
| 38 | setId("bottom-pane"); |
| 39 | setPadding(new Insets(GuiConstants.padding)); |
| 40 | |
| 41 | HBox center = new HBox(GuiConstants.padding); |
| 42 | getChildren().add(center); |
| 43 | StackPane.setAlignment(center, Pos.CENTER); |
| 44 | center.setAlignment(Pos.CENTER); |
| 45 | |
| 46 | matchButton.setText("match"); |
| 47 | matchButton.setOnAction(event -> match()); |
| 48 | matchButton.setDisable(true); |
| 49 | |
| 50 | center.getChildren().add(matchButton); |
| 51 | |
| 52 | matchableButton.setText("unmatchable"); |
| 53 | matchableButton.setOnAction(event -> toggleMatchable()); |
| 54 | matchableButton.setDisable(true); |
| 55 | |
| 56 | center.getChildren().add(matchableButton); |
| 57 | |
| 58 | matchPerfectMembersButton.setText("match 100% members"); |
| 59 | matchPerfectMembersButton.setOnAction(event -> matchPerfectMembers()); |
| 60 | matchPerfectMembersButton.setDisable(true); |
| 61 | |
| 62 | center.getChildren().add(matchPerfectMembersButton); |
| 63 | |
| 64 | HBox right = new HBox(GuiConstants.padding); |
| 65 | getChildren().add(right); |
| 66 | StackPane.setAlignment(right, Pos.CENTER_RIGHT); |
| 67 | right.setAlignment(Pos.CENTER_RIGHT); |
| 68 | right.setPickOnBounds(false); |
| 69 | |
| 70 | unmatchClassButton.setText("unmatch classes"); |
| 71 | unmatchClassButton.setOnAction(event -> unmatchClass()); |
| 72 | unmatchClassButton.setDisable(true); |
| 73 | |
| 74 | right.getChildren().add(unmatchClassButton); |
| 75 | |
| 76 | unmatchMemberButton.setText("unmatch members"); |
| 77 | unmatchMemberButton.setOnAction(event -> unmatchMember()); |
| 78 | unmatchMemberButton.setDisable(true); |
| 79 | |
| 80 | right.getChildren().add(unmatchMemberButton); |
| 81 | |
| 82 | unmatchVarButton.setText("unmatch vars"); |
| 83 | unmatchVarButton.setOnAction(event -> unmatchVar()); |
| 84 | unmatchVarButton.setDisable(true); |
| 85 | |
| 86 | right.getChildren().add(unmatchVarButton); |
| 87 | |
| 88 | SelectListener selectListener = new SelectListener(); |
| 89 | srcPane.addListener(selectListener); |
| 90 | dstPane.addListener(selectListener); |
| 91 | } |
| 92 | |
| 93 | @Override |
| 94 | public void onMatchChange(Set<MatchType> types) { |
no test coverage detected