List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_LABEL
String CANCEL_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_LABEL.
Click Source Link
From source file:org.apache.directory.studio.schemaeditor.view.dialogs.ObjectClassSelectionDialog.java
License:Apache License
/** * {@inheritDoc}//from w ww .j av a 2s . c o m */ protected void createButtonsForButtonBar(Composite parent) { chooseButton = createButton(parent, IDialogConstants.OK_ID, Messages.getString("ObjectClassSelectionDialog.Choose"), true); //$NON-NLS-1$ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); StructuredSelection selection = (StructuredSelection) objectClassesTableViewer.getSelection(); if (selection.isEmpty()) { if ((chooseButton != null) && (!chooseButton.isDisposed())) { chooseButton.setEnabled(false); } } else { if ((chooseButton != null) && (!chooseButton.isDisposed())) { chooseButton.setEnabled(true); } } }
From source file:org.apache.directory.studio.schemaeditor.view.dialogs.PreviousSearchesDialog.java
License:Apache License
/** * {@inheritDoc}// w ww . j a v a 2 s.c o m */ protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); openButton = createButton(parent, IDialogConstants.OK_ID, Messages.getString("PreviousSearchesDialog.Open"), //$NON-NLS-1$ true); openButton.setEnabled(false); }
From source file:org.apache.directory.studio.valueeditors.certificate.CertificateDialog.java
License:Apache License
/** * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */// w ww .j av a 2 s . c om protected void createButtonsForButtonBar(Composite parent) { createButton(parent, LOAD_BUTTON_ID, Messages.getString("CertificateDialog.LoadCertificateButton"), false); //$NON-NLS-1$ createButton(parent, SAVE_BUTTON_ID, Messages.getString("CertificateDialog.SaveCertificateButton"), false); //$NON-NLS-1$ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:org.apache.directory.studio.valueeditors.image.ImageDialog.java
License:Apache License
/** * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */// ww w . j ava 2 s . c om protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); // load dialog settings try { int tabIndex = ValueEditorsActivator.getDefault().getDialogSettings() .getInt(SELECTED_TAB_DIALOGSETTINGS_KEY); tabFolder.setSelection(tabIndex); } catch (Exception e) { // Nothing to do } // Updating the tab folder on load updateTabFolder(); }
From source file:org.apache.directory.studio.valueeditors.password.PasswordDialog.java
License:Apache License
/** * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) *///from w ww . ja v a2 s . c o m protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); // load dialog settings try { int tabIndex = ValueEditorsActivator.getDefault().getDialogSettings() .getInt(SELECTED_TAB_DIALOGSETTINGS_KEY); if (currentPassword == null || currentPassword.toBytes().length == 0) { tabIndex = NEW_TAB; } tabFolder.setSelection(tabIndex); } catch (Exception e) { } try { String hashMethodName = ValueEditorsActivator.getDefault().getDialogSettings() .get(SELECTED_HASH_METHOD_DIALOGSETTINGS_KEY); LdapSecurityConstants hashMethod = LdapSecurityConstants.getAlgorithm(hashMethodName); if ((hashMethod == null) || NO_HASH_METHOD.equals(hashMethodName)) { newPasswordHashMethodComboViewer.setSelection(new StructuredSelection(NO_HASH_METHOD)); } else { newPasswordHashMethodComboViewer.setSelection(new StructuredSelection(hashMethod)); } } catch (Exception e) { } // update on load updateTabFolder(); }
From source file:org.apache.syncope.ide.eclipse.plugin.dialogs.AddTemplateDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.OK_ID, "Add", true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:org.apache.syncope.ide.eclipse.plugin.dialogs.LoginDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.OK_ID, "Login", true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); resetbutton = createButton(parent, IDialogConstants.NO_ID, "Reset Fields", false); resetbutton.addSelectionListener(new SelectionAdapter() { @Override//from w ww . jav a 2 s. co m public void widgetSelected(final SelectionEvent e) { deploymentUrlInp.setText(""); usernameInp.setText(""); passwordInp.setText(""); // add to preferences saveInput(); } }); }
From source file:org.bbaw.pdr.ae.view.filesaveandload.local.FileSaveDialog.java
License:Open Source License
@Override protected final void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:org.bonitasoft.expressions.test.TestConnectorExpression.java
License:Open Source License
@Test public void testConnectorExpression() { final String id = "connectorExpressionTest"; createConnectorDefinition(id);// ww w . j a va 2 s . co m SWTBotConnectorTestUtil.activateConnectorTestWizard(bot); bot.text().setText(id); bot.table().select(id); // bot.tree().select("Uncategorized"); // bot.table().select(id); //bot.table().select(indices); bot.button(IDialogConstants.NEXT_LABEL).click(); bot.toolbarButtonWithId(SWTBOT_ID_EDITBUTTON, 0).click(); bot.table().select("Constant"); bot.text().setText("Hello World"); assertFalse("return type combobox should be disabled", bot.comboBoxWithLabel("Return type").isEnabled()); assertEquals("wrong return type", bot.comboBoxWithLabel("Return type").selection(), String.class.getName()); bot.button(IDialogConstants.OK_LABEL).click(); assertEquals("wrong value for input1", bot.textWithLabel("Input1").getText(), "Hello World"); editGroovyEditor(1, "Input2", Boolean.class.getName(), "booleanScriptTest", "1==1;"); editGroovyEditor(2, "Input3", Double.class.getName(), "doubleScriptTest", "(double)9.345+1.256;"); editGroovyEditor(3, "Input4", Float.class.getName(), "floatScriptTest", "(float)9.345+1.256;"); editGroovyEditor(4, "Input5", Integer.class.getName(), "integerScriptTest", "(int)9+10;"); editGroovyEditor(5, "Input6", List.class.getName(), "listScriptTest", "def list=[1,2,3];"); bot.button(IDialogConstants.CANCEL_LABEL).click(); }
From source file:org.bonitasoft.studio.actors.tests.SWTbot.ActorFilterDefinitionTest.java
License:Open Source License
@Test public void testIdSyntaxError() throws Exception { final String id2 = "id.?"; final String textLabel = "Definition id *"; testButtonDisabled("", textLabel); testButtonDisabled(id2, textLabel);//w ww . j a v a 2 s . c o m bot.button(IDialogConstants.CANCEL_LABEL).click(); }