diff --git a/javadocviewer/src/main/java/qupath/ui/javadocviewer/gui/viewer/JavadocViewer.java b/javadocviewer/src/main/java/qupath/ui/javadocviewer/gui/viewer/JavadocViewer.java index 47a7ade..97e30f1 100644 --- a/javadocviewer/src/main/java/qupath/ui/javadocviewer/gui/viewer/JavadocViewer.java +++ b/javadocviewer/src/main/java/qupath/ui/javadocviewer/gui/viewer/JavadocViewer.java @@ -61,6 +61,14 @@ public JavadocViewer(ReadOnlyStringProperty stylesheet, URI... urisToSearch) thr setUpListeners(); } + /** + * Set the search text field to an input query. + * @param input The search query string. + */ + public void setSearchInput(String input) { + autoCompletionTextField.setText(input); + } + @FXML private void onBackClicked(ActionEvent ignoredEvent) { offset(-1); @@ -139,10 +147,6 @@ protected void updateItem(URI item, boolean empty) { })); } - public TextField getAutoCompletionTextField() { - return autoCompletionTextField; - } - private void setUpListeners() { back.disableProperty().bind(webView.getEngine().getHistory().currentIndexProperty().isEqualTo(0)); forward.disableProperty().bind(webView.getEngine().getHistory().currentIndexProperty().greaterThanOrEqualTo(