protected void setFocus() { mainItemComposite.setFocus(); FormToolkit.ensureVisible(getMainItemComposite()); }
private void verticalMove(boolean down) { Composite parent = getParent(); Control[] children = parent.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (child == this) { ExpandableComposite sibling = getSibling(children, i, down); if (sibling != null && sibling.toggle != null) { sibling.setFocus(); } break; } } }
private void verticalMove(boolean down) { Composite parent = getParent(); Control[] children = parent.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (child == this) { ExpandableComposite sibling = getSibling(children, i, down); if (sibling != null && sibling.toggle != null) { sibling.setFocus(); } break; } } }
@Override public void widgetSelected(SelectionEvent e) { fModifyAllPanel.setVisible(!fModifyAllPanel.isVisible()); if (fModifyAllPanel.isVisible()) { excomposite.setFocus(); // force preview update prepareControl(); fControl.requestLayout(); fControl.setFocus(); } } });
@Override public void keyTraversed(TraverseEvent e) { if (e.detail == SWT.TRAVERSE_MNEMONIC) { // steal the mnemonic if (!isVisible() || !isEnabled()) return; if (FormUtil.mnemonicMatch(getText(), e.character)) { e.doit = false; if (!isFixedStyle()) { programmaticToggleState(); } setFocus(); } } } });
programmaticToggleState(); setFocus();