MCPcopy Create free account
hub / github.com/BaseXdb/basex / refreshControls

Method refreshControls

basex-core/src/main/java/org/basex/gui/GUI.java:612–632  ·  view source on GitHub ↗

Refreshes the menu and the buttons. @param result update number of results

(final boolean result)

Source from the content-addressed store, hash-verified

610 * @param result update number of results
611 */
612 public void refreshControls(final boolean result) {
613 final DBNodes marked = context.marked, current = context.current();
614 if(result && marked != null) {
615 results.setText(BaseXLayout.results((marked.isEmpty() ? current : marked).size(), -1, this));
616 }
617
618 final boolean inf = gopts.get(GUIOptions.SHOWINFO);
619 context.options.set(MainOptions.QUERYINFO, inf);
620 context.options.set(MainOptions.XMLPLAN, inf);
621
622 final Data data = context.data();
623 mode.setEnabled(data != null);
624 final int m = data == null ? 2 : gopts.get(GUIOptions.SEARCHMODE);
625 if(mode.getSelectedIndex() != m) {
626 mode.setSelectedIndex(m);
627 input.mode(mode.getSelectedItem());
628 }
629
630 toolbar.refresh();
631 menu.refresh();
632 }
633
634 /**
635 * Toggles fullscreen mode.

Callers 3

GUIMethod · 0.95
updateControlMethod · 0.95
layoutViewsMethod · 0.95

Calls 12

resultsMethod · 0.95
isEmptyMethod · 0.95
modeMethod · 0.80
getSelectedItemMethod · 0.80
sizeMethod · 0.65
getMethod · 0.65
setMethod · 0.65
refreshMethod · 0.65
currentMethod · 0.45
setTextMethod · 0.45
dataMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected