List of usage examples for org.eclipse.jface.dialogs IDialogConstants OK_LABEL
String OK_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants OK_LABEL.
Click Source Link
From source file:com.mindquarry.desktop.preferences.dialog.FilteredPreferenceDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); getShell().setDefaultButton(okButton); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.mobilesorcery.sdk.profiles.ui.internal.DeviceFilterDialog.java
License:Open Source License
public void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.mobilesorcery.sdk.profiles.ui.internal.SelectFilterTypeDialog.java
License:Open Source License
public void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); updateUI();//from w w w .j av a 2 s.c o m }
From source file:com.mobilesorcery.sdk.ui.MosyncUIPlugin.java
License:Open Source License
protected void checkConfig(final IWorkbench wb) { if (!MoSyncTool.getDefault().isValid()) { wb.getDisplay().syncExec(new Runnable() { public void run() { MessageDialog dialog = new MessageDialog(wb.getModalDialogShellProvider().getShell(), "Fatal error", null, MessageFormat.format( "The environment variable MOSYNCDIR has not been properly set, or some other serious error has occurred. (Reason: {0})\n\nMoSync will not work properly. Press Ok to quit, or Cancel to continue anyway.", MoSyncTool.getDefault().validate()), MessageDialog.ERROR, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); if (dialog.open() == IDialogConstants.OK_ID) { wb.close();/*from ww w . ja va2s .c o m*/ } } }); } }
From source file:com.mobilesorcery.sdk.ui.targetphone.internal.EditDeviceListDialog.java
License:Open Source License
@Override public void createButtonsForButtonBar(Composite parent) { Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); updateButtons();/*from www. ja va 2 s . co m*/ }
From source file:com.motorola.studio.android.launch.ui.StartedInstancesDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { // create OK, Ignore and Abort buttons okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); ignoreButton = createButton(parent, IDialogConstants.IGNORE_ID, IDialogConstants.IGNORE_LABEL, false); abortButton = createButton(parent, IDialogConstants.ABORT_ID, IDialogConstants.ABORT_LABEL, false); ignoreButton.addMouseListener(new MouseListener() { public void mouseUp(MouseEvent e) { setReturnCode(IDialogConstants.IGNORE_ID); close();//from w w w .j av a 2 s . c o m } public void mouseDown(MouseEvent e) { //do nothing } public void mouseDoubleClick(MouseEvent e) { //do nothing } }); abortButton.addMouseListener(new MouseListener() { public void mouseUp(MouseEvent e) { setReturnCode(IDialogConstants.ABORT_ID); close(); } public void mouseDown(MouseEvent e) { //do nothing } public void mouseDoubleClick(MouseEvent e) { //do nothing } }); }
From source file:com.mountainminds.eclemma.internal.ui.launching.InplaceInstrumentationHandler.java
License:Open Source License
public Object handleStatus(IStatus status, Object source) throws CoreException { ILaunchConfiguration config = (ILaunchConfiguration) source; Shell parent = EclEmmaUIPlugin.getInstance().getShell(); String title = UIMessages.InstrumentationWarning_title; String message = NLS.bind(UIMessages.InstrumentationWarning_message, config.getName()); IPreferenceStore store = EclEmmaUIPlugin.getInstance().getPreferenceStore(); if (MessageDialogWithToggle.ALWAYS .equals(store.getString(UIPreferences.PREF_ALLOW_INPLACE_INSTRUMENTATION))) { return Boolean.TRUE; }//from www. j a v a 2 s.c o m MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent, title, null, message, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0, null, false); dialog.setPrefKey(UIPreferences.PREF_ALLOW_INPLACE_INSTRUMENTATION); dialog.setPrefStore(store); dialog.open(); return Boolean.valueOf(dialog.getReturnCode() == IDialogConstants.OK_ID); }
From source file:com.netxforge.netxstudio.screens.f2.ExpressionContextDialog.java
License:Open Source License
/** * Create contents of the button bar./*from ww w . j av a2s .c o m*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); // createButton(parent, IDialogConstants.CANCEL_ID, // IDialogConstants.CANCEL_LABEL, false); }
From source file:com.netxforge.screens.editing.base.dialogs.MessageDialogWithResult.java
License:Open Source License
public static String[] getButtonLabels(int kind) { String[] dialogButtonLabels;/*from w w w.j a v a 2 s . co m*/ switch (kind) { case ERROR: case INFORMATION: case WARNING: { dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL }; break; } case CONFIRM: { dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }; break; } case QUESTION: { dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }; break; } case QUESTION_WITH_CANCEL: { dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; break; } default: { throw new IllegalArgumentException("Illegal value for kind in MessageDialog.open()"); //$NON-NLS-1$ } } return dialogButtonLabels; }
From source file:com.nokia.carbide.cdt.internal.builder.ui.TrackDependenciesQueryDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }