MCPcopy Create free account
hub / github.com/rambaut/figtree / searchStarted

Method searchStarted

src/figtree/application/FigTreeFrame.java:382–397  ·  view source on GitHub ↗

Called when the user requests a search by pressing return having typed a search string into the text field. If the continuousUpdate flag is true then this method is called when the user types into the text field. @param searchString the user's search string

(String searchString)

Source from the content-addressed store, hash-verified

380 * @param searchString the user's search string
381 */
382 public void searchStarted(String searchString) {
383 Enumeration e = bg.getElements();
384 String value = null;
385 while (e.hasMoreElements()) {
386 AbstractButton button = (AbstractButton)e.nextElement();
387 if (button.isSelected()) {
388 value = button.getText();
389 }
390 }
391
392 for (TreeViewer.TextSearchType searchType : TreeViewer.TextSearchType.values()) {
393 if (searchType.toString().equals(value)) {
394 treeViewer.selectTaxa(searchType, searchString, false);
395 }
396 }
397 }
398
399 /**
400 * Called when the user presses the cancel search button or presses

Callers

nothing calls this directly

Calls 3

getTextMethod · 0.80
toStringMethod · 0.45
selectTaxaMethod · 0.45

Tested by

no test coverage detected