public boolean setFocus() { return wBox.setFocus(); }
public void getData() { if ( text != null ) { wDesc.setText( text ); } if ( readonly ) { wOK.setFocus(); } else { wDesc.setFocus(); } }
protected void openDialog() { shell.pack(); // Set the focus on the OK button wOK.setFocus(); Rectangle shellBounds = getParent().getBounds(); Point dialogSize = shell.getSize(); shell.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2, shellBounds.y + ( shellBounds.height - dialogSize.y ) / 2 ); shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep(); } } }
Rectangle screenSize = display.getPrimaryMonitor().getBounds(); shell.setLocation( ( screenSize.width - shell.getBounds().width ) / 2, ( screenSize.height - shell.getBounds().height ) / 2 ); closeButton.setFocus(); shell.open(); while ( !shell.isDisposed() ) {
wLaunch.setFocus(); shell.setDefaultButton( wLaunch );
wOK.setFocus(); shell.pack(); shell.open();
button.setFocus();
@Override public void setFocus() { if (checkBox != null) { checkBox.setFocus(); } }
public void setFocus() { if (checkBox != null) { checkBox.setFocus(); } }
/** * {@inheritDoc} */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, true).setFocus(); }
@Override public void widgetSelected(SelectionEvent event) { // force focusout on osx apply.setFocus(); save(); } });
@Override boolean mnemonicHit (char key) { if (labelHandle == 0) return false; boolean result = super.mnemonicHit (labelHandle, key); if (result) setFocus (); return result; }
@Override boolean mnemonicHit (char key) { if (labelHandle == 0) return false; boolean result = super.mnemonicHit (labelHandle, key); if (result) setFocus (); return result; }
@Override public void applyData(Object data) { if (ComparePreferencePage.CAPPING_DISABLED.equals(data)) { fTextCompareTab.getParent().setSelection(fTextCompareTab); fDisableCappingCheckBox.setFocus(); } } }
@Override protected void doSetFocus() { button.setFocus(); // add a FocusListener to the button button.addFocusListener(getButtonFocusListener()); }
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Button ok= getButton(IDialogConstants.OK_ID); ok.setText( RefactoringMessages.ChangeExceptionHandler_undo_button); Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringMessages.ChangeExceptionHandler_abort_button, true); abort.moveBelow(ok); abort.setFocus(); } @Override
/** * {@inheritDoc} */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false); createButton(parent, IDialogConstants.CLIENT_ID, "Send Error Report", false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, true).setFocus(); }
@Override public void widgetSelected(SelectionEvent event) { // force focusout on osx apply.setFocus(); save(); apply.getShell().dispose(); } });