public void keyTraversed( TraverseEvent te ) { te.doit = false; // set focus on the next control. // set focus on the next control. // What is the next control : 0 int thisOne = 0; while ( !controls[ thisOne ].isEnabled() ) { thisOne++; if ( thisOne >= controls.length ) { return; // already tried all others, time to quit. } } controls[ thisOne ].setFocus(); } } );
public void keyTraversed( TraverseEvent te ) { te.doit = false; // set focus on the next control. // What is the next control? int thisOne = controlNr + 1; while ( !controls[ thisOne ].isEnabled() ) { thisOne++; if ( thisOne >= controls.length ) { thisOne = 0; } if ( thisOne == controlNr ) { return; // already tried all others, time to quit. } } controls[ thisOne ].setFocus(); } } );
text.setFocus(); text.setSize( width, height ); editor.layout();
@Override public void mouseDown(MouseEvent e) { ((Control) e.widget).setFocus(); } });
/** * Sets focus to a part in the page. */ public void setFocus() { treeViewer.getControl().setFocus(); }
@Override public void setFocus() { super.setFocus(); if (fFocusControl != null) fFocusControl.setFocus(); }
public void setFocus() { if (fSourceViewer != null) { fSourceViewer.getControl().setFocus(); } }
@Override public void setFocus() { if (viewer != null) { viewer.getControl().setFocus(); } }
/** * Sets focus on the current page if shown. */ @Override public boolean setFocus() { if (currentPage != null) return currentPage.setFocus(); return super.setFocus(); } /**
@Override public void setFocus() { Control client = section.getClient(); if (client != null) client.setFocus(); } }
@Override public void setFocus() { super.setFocus(); if (fSourceAttachmentForm != null && !fSourceAttachmentForm.isDisposed()) fSourceAttachmentForm.setFocus(); }
@Override public boolean setFocus() { if (fTable != null && isOkToUse(fTable.getControl())) { fTable.getControl().setFocus(); } return true; }
@Override public boolean setFocus() { if (fTable != null && isOkToUse(fTable.getControl())) { fTable.getControl().setFocus(); } return true; }
private void restoreSelection(int index) { fTableViewer.refresh(); fTableViewer.getControl().setFocus(); int itemCount= getTableItemCount(); if (itemCount != 0 && index >= itemCount) { index= itemCount - 1; getTable().setSelection(index); } fListener.parameterListChanged(); updateButtonsEnabledState(); } });
public void selectReveal(IHelpResource res) { treeViewer.setSelection(new StructuredSelection(res), true); treeViewer.expandToLevel(res, 1); treeViewer.getControl().setFocus(); }
@Override public void widgetSelected(SelectionEvent e) { fModifyAllPanel.setVisible(!fModifyAllPanel.isVisible()); if (fModifyAllPanel.isVisible()) { excomposite.setFocus(); // force preview update prepareControl(); fControl.requestLayout(); fControl.setFocus(); } } });
public void editParameter(ParameterInfo info) { fTableViewer.getControl().setFocus(); if (! info.isDeleted()) { fTableViewer.setSelection(new StructuredSelection(info), true); updateButtonsEnabledState(); editColumnOrNextPossible(NEWNAME_PROP); return; } }
private void updateWizardPage(final ISelection preserved, final boolean displayErrorMessage) { fTableViewer.refresh(); if (preserved != null) { fTableViewer.getControl().setFocus(); fTableViewer.setSelection(preserved); } checkPageCompletionStatus(displayErrorMessage); updateButtonEnablementState(((IStructuredSelection) fTableViewer.getSelection())); updateStatusLine(); } }
@Override public void setFocus() { getViewer().getControl().setFocus(); if (BuildsUiPlugin.getDefault().getPreferenceStore().getBoolean(BuildsUiInternal.PREF_REFRESH_ON_FOCUS)) { RefreshOperation operation = BuildsUiInternal.getFactory().getRefreshOperation(); operation.addFlag(OperationFlag.BACKGROUND); operation.execute(); } }