Skip to content

Commit

Permalink
Merge pull request #179 from jasperng-nus/branch-add-code-reuse
Browse files Browse the repository at this point in the history
Add code reuse of some methods
  • Loading branch information
Xilef121 authored May 3, 2024
2 parents 7bd8cc0 + 4d3da1a commit c45eae6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/ui/CompanyCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public CompanyCard(Company company, int displayedIndex) {
company.getTags().stream()
.sorted(Comparator.comparing(Tag::getTagName))
.forEach(tag -> tags.getChildren().add(new Label(tag.capitalise())));
// Solution below inspired by
// https://stackoverflow.com/questions/37785689/javafx-listener-to-check-for-a-boolean-value
applicationStatusCheckBox.selectedProperty().bind(company.checkboxIsMarked());
// Disable the checkbox to make it unclickable
applicationStatusCheckBox.setDisable(true);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/ui/HelpWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public HelpWindow(Stage root) {
super(FXML, root);
helpMessage.setText(HELP_MESSAGE);

// Solution below inspired by
// https://stackoverflow.com/questions/35703884/trying-to-load-a-local-page-into-javafx-webengine
webView = new WebView();
WebEngine webEngine = webView.getEngine();
String userGuidePath = getClass().getResource("/html/InternBook_UserGuide.html").toExternalForm();
Expand Down

0 comments on commit c45eae6

Please sign in to comment.