List of usage examples for org.eclipse.jface.dialogs IDialogConstants OK_ID
int OK_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants OK_ID.
Click Source Link
From source file:ch.elexis.core.ui.dialogs.KontaktDetailDialog.java
License:Open Source License
@Override public void create() { super.create(); getShell().setText(Messages.KontaktDetailDialog_showDetails); //$NON-NLS-1$ if (k != null) { setTitle(k.getLabel());//ww w . j av a 2 s. c o m } else { setTitle(Messages.KontaktDetailDialog_newContact); //$NON-NLS-1$ } setMessage(Messages.KontaktDetailDialog_enterData); //$NON-NLS-1$ if (locked) { Button btnOk = getButton(IDialogConstants.OK_ID); if (btnOk != null) { btnOk.setEnabled(false); } } }
From source file:ch.elexis.core.ui.dialogs.KontaktSelektor.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { if (enableEmptyField) { parent.setLayout(new GridLayout(3, false)); Button btnClear = createButton(parent, IDialogConstants.NO_ID, Messages.KontaktSelector_clearField, false);/*from w w w . j a va2s . c om*/ btnClear.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { selection = null; vc.getContentProvider().stopListening(); close(); } }); } else { parent.setLayout(new GridLayout(2, false)); } createButton(parent, IDialogConstants.OK_ID, "OK", false); createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", false); }
From source file:ch.elexis.core.ui.dialogs.LoginDialog.java
License:Open Source License
@Override public void create() { super.create(); getButton(IDialogConstants.OK_ID).setText(Messages.LoginDialog_login); getButton(IDialogConstants.CANCEL_ID).setText(Messages.LoginDialog_terminate); // getButton(IDialogConstants.OK_ID).setEnabled(false); }
From source file:ch.elexis.core.ui.dialogs.OrderImportDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // Create Close button createButton(parent, IDialogConstants.OK_ID, "Schliessen", false); }
From source file:ch.elexis.core.ui.dialogs.ZusatzAdresseEingabeDialog.java
License:Open Source License
@Override public void create() { super.create(); setTitle(Messages.AnschriftEingabeDialog_enterAddress); //$NON-NLS-1$ setMessage(Messages.AnschriftEingabeDialog_enterData); //$NON-NLS-1$ getShell().setText(Messages.AnschriftEingabeDialog_postalAddress); //$NON-NLS-1$ if (locked) { Button btnOk = getButton(IDialogConstants.OK_ID); if (btnOk != null) { btnOk.setEnabled(false);/*from ww w.j a va 2s . c o m*/ } } }
From source file:ch.elexis.core.ui.stock.dialogs.ImportArticleDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Button okBtn = super.getButton(IDialogConstants.OK_ID); if (okBtn != null) { okBtn.setText("Import"); }//from ww w. j av a 2 s. c o m Button closeBtn = super.getButton(IDialogConstants.CANCEL_ID); if (closeBtn != null) { closeBtn.setText("Schlieen"); } }
From source file:ch.elexis.dialogs.TerminDialog.java
License:Open Source License
private void enable(final boolean mode) { msg = Messages.TerminDialog_editTermins; bChange.setEnabled(mode);//from w w w. j a va2s . c om bSave.setEnabled(mode); getButton(IDialogConstants.OK_ID).setEnabled(mode); slider.setBackground(UiDesk.getColor(UiDesk.COL_LIGHTGREY)); //$NON-NLS-1$ if (!mode) { slider.setBackground(UiDesk.getColor(UiDesk.COL_DARKGREY)); //$NON-NLS-1$ msg = Messages.TerminDialog_editTermins + "\n\t" + Messages.TerminDialog_collision; } getShell().getDisplay().asyncExec(new Runnable() { @Override public void run() { setMessage(msg, mode ? IMessageProvider.NONE : IMessageProvider.ERROR); } }); }
From source file:ch.hilbri.assist.application.parts.AboutDialog.java
License:Open Source License
@Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); // create a layout with spacing and margins appropriate for the font // size.//from www. j a v a 2 s. co m GridLayout layout = new GridLayout(); layout.numColumns = 0; // this is incremented by createButton layout.makeColumnsEqualWidth = true; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); composite.setLayout(layout); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_CENTER); composite.setLayoutData(data); composite.setFont(parent.getFont()); createButton(composite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); return composite; }
From source file:ch.hsr.ifs.cutelauncher.ui.CuteCompareResultDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, "OK", true); }
From source file:ch.netcetera.eclipse.common.dialog.LoginDialog.java
License:Open Source License
/** * {@inheritDoc}//ww w . j a v a 2s . c o m */ @Override public void keyPressed(KeyEvent e) { Button okButton = getButton(IDialogConstants.OK_ID); if (okButton != null) { okButton.setEnabled( this.nameText.getText().trim().length() > 0 && this.passwordText.getText().trim().length() > 0); } }