Skip to content
Snippets Groups Projects
Commit b9272e37 authored by Anian Bühler's avatar Anian Bühler
Browse files

added parameter defaultText and tooltip to searchbar

parent 617a58c7
No related branches found
No related tags found
1 merge request!1Dev preferences
...@@ -693,14 +693,17 @@ public class WorkspaceController { ...@@ -693,14 +693,17 @@ public class WorkspaceController {
* Returns a SearchBar instance capable of searching for blocks * Returns a SearchBar instance capable of searching for blocks
* within the BlockCanvas and block drawers * within the BlockCanvas and block drawers
*/ */
public JComponent getSearchBar() { public JComponent getSearchBar(String defaultText, String tooltip) {
final SearchBar sb = new SearchBar( final SearchBar sb = new SearchBar(
"Search blocks", "Search for blocks in the drawers and workspace", workspace); defaultText, tooltip, workspace);
for (SearchableContainer con : getAllSearchableContainers()) { for (SearchableContainer con : getAllSearchableContainers()) {
sb.addSearchableContainer(con); sb.addSearchableContainer(con);
} }
return sb.getComponent(); return sb.getComponent();
} }
public JComponent getSearchBar() {
return getSearchBar("Search blocks", "Search for blocks in the drawers and workspace");
}
/** /**
* Returns an unmodifiable Iterable of SearchableContainers * Returns an unmodifiable Iterable of SearchableContainers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment