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:cn.edu.xmu.tidems.control.ui.views.components.MzCalibrationDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.OK_ID, "Calibrate", true); createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", false); // parent.pack(); }
From source file:cn.ieclipse.adt.ext.helpers.MultiCheckSelector.java
License:Apache License
/** * Create contents of the button bar.//from w w w . j av a 2 s .c o m * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { Button ok = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); // ok.addSelectionListener(new SelectionAdapter() { // @Override // public void widgetSelected(SelectionEvent e) { // // } // }); Button cancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); cancel.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (callback != null) { callback.onClose(); } } }); }
From source file:cn.ieclipse.aorm.eclipse.helpers.MultiCheckSelector.java
License:Apache License
/** * Create contents of the button bar./*from w w w. j a v a2 s .c o m*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { Button ok = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); ok.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (callback != null) { List<String> sel = getSelection(); callback.onOkay(sel); } } }); Button cancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); cancel.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (callback != null) { callback.onClose(); } } }); }
From source file:cn.ieclipse.pde.signer.wizard.KeyAliasDialog.java
License:Apache License
/** * Create contents of the dialog.// w w w. j av a 2 s. c o m * * @param parent */ @Override protected Control createDialogArea(Composite parent) { Composite area = (Composite) super.createDialogArea(parent); Composite container = new Composite(area, SWT.NONE); container.setLayout(new FillLayout(SWT.VERTICAL)); container.setLayoutData(new GridData(GridData.FILL_BOTH)); setTitle("Alias"); setMessage("Create/View/Delete alias in keystore."); composite = new KeyAliasComposite(container, SWT.NONE); if (this.item != null) { composite.setKeyItem(item); } composite.setEditMode(editMode); composite.setValidationListener(new ValidationListener() { public void onValidate(String msg) { setErrorMessage(msg); getButton(IDialogConstants.OK_ID).setEnabled(getErrorMessage() == null); } }); return area; }
From source file:cn.ieclipse.pde.signer.wizard.KeyAliasDialog.java
License:Apache License
/** * Create contents of the button bar.//from ww w . ja v a 2 s. co m * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { if (this.item != null) { createButton(parent, IDialogConstants.RETRY_ID, "&Delete", false); createButton(parent, IDialogConstants.IGNORE_ID, "&Export", true); } else { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:cn.ieclipse.pde.signer.wizard.KeyStoreCreateDialog.java
License:Apache License
@Override protected void okPressed() { validate(); if (getButton(IDialogConstants.OK_ID).isEnabled()) { super.okPressed(); } }
From source file:cn.ieclipse.pde.signer.wizard.KeyStoreCreateDialog.java
License:Apache License
@Override public void setErrorMessage(String newErrorMessage) { super.setErrorMessage(newErrorMessage); boolean hasError = getErrorMessage() != null && !"".equals(getErrorMessage()); getButton(IDialogConstants.OK_ID).setEnabled(!hasError); }
From source file:co.turnus.ui.profiling.wizard.page.LoadOperatorCostsFilePage.java
License:Open Source License
@Override public void create() { super.create(); setTitle("Load the costs configuration from an XML file"); setMessage("Select an XML from where the configuration will be loaded", IMessageProvider.INFORMATION); getButton(IDialogConstants.OK_ID).setEnabled(false); }
From source file:co.turnus.ui.profiling.wizard.page.LoadOperatorCostsFilePage.java
License:Open Source License
@Override public void widgetSelected(SelectionEvent e) { String value = outputChooser.getText(); if (value != null && !value.isEmpty()) { File tmpFile = new File(value); if (tmpFile.exists()) { file = tmpFile;/*from www.j a va 2s . c o m*/ // reset the error message setErrorMessage(null); getButton(IDialogConstants.OK_ID).setEnabled(true); return; } } file = null; outputChooser.setFile(""); setErrorMessage("no input file selected"); getButton(IDialogConstants.OK_ID).setEnabled(false); }
From source file:co.turnus.ui.profiling.wizard.page.StoreOperatorCostsFilePage.java
License:Open Source License
@Override public void create() { super.create(); setTitle("Store the costs configuration to an XML file"); setMessage("Select an XML file where this configuration will be saved", IMessageProvider.INFORMATION); getButton(IDialogConstants.OK_ID).setEnabled(false); }