Skip to content

Commit

Permalink
devonfw#1454 added a button for search, made searchbar functional
Browse files Browse the repository at this point in the history
  • Loading branch information
leonie committed Nov 23, 2022
1 parent 0f7439e commit 044054e
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 188 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import javafx.scene.control.Button;
import javafx.scene.control.ListView;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;

/**
Expand Down Expand Up @@ -48,6 +47,9 @@ public class Controller implements Initializable {
@FXML
public TextField searchBar;

@FXML
public Button goSearch;

// TODO: Transform to ListView<HBox>
@FXML
public ListView<String> searchResultsView;
Expand Down Expand Up @@ -89,9 +91,10 @@ public void loadDetails(javafx.event.ActionEvent actionEvent) throws IOException

/**
* @param event
* @throws IOException
*/
@FXML
public void search(KeyEvent event) {
public void search(javafx.event.ActionEvent event) throws IOException {

this.searchResultsView.getItems().clear();
this.searchResultsView.getItems().addAll(searchTemplateSets(this.searchBar.getText(), this.templateSets));
Expand Down
Loading

0 comments on commit 044054e

Please sign in to comment.