/** * Sets the focus to the search text box when the tab is selected. * * @see org.carewebframework.help.viewer.HelpViewBase#onSelect() */ @Override public void onSelect() { super.onSelect(); txtSearch.selectAll(); txtSearch.setFocus(true); }
private void setMode(Mode newMode) { resetActivity(); if (newMode != mode) { mode = newMode; updateState(true); txtPassword.setFocus(mode == Mode.LOCK); } }
/** * Sets the focus to the quick find text box when the tab is selected. * * @see org.carewebframework.help.viewer.HelpViewBase#onSelect() */ @Override public void onSelect() { super.onSelect(); txtFind.setFocus(true); txtFind.selectAll(); }
/** * Perform a search. */ @EventHandler(value = "click", target = "btnSearch") private void onClick$btnSearch() { txtSearch.setFocus(true); lblNotFound.setVisible(false); String text = txtSearch.getValue(); tree.setSelectedNode(null); if (text != null && !text.isEmpty()) { text = text.toLowerCase(); iterator = iterator == null ? tree.iterator() : iterator; while (iterator.hasNext()) { Treenode node = iterator.next(); if (node.getLabel().toLowerCase().contains(text)) { node.makeVisible(); node.setSelected(true); return; } } iterator = null; lblNotFound.setVisible(true); } }
/** * Place the specified tree node in edit mode. In this mode, the node's label is replaced with a * text box containing the label's value. * * @param node Target tree node. */ private void editNodeStart(Treenode node) { txtLabel.setAttribute(ITEM_ATTR, node); if (node == null) { popLabel.close(); } else { String label = node.getLabel(); node.setAttribute(LABEL_ATTR, label); txtLabel.setValue(label); node.setLabel(null); popLabel.open(node, "left top", "left top"); txtLabel.setFocus(true); } }