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.amalto.workbench.dialogs.AnnotationLangInfoDialog.java
License:Open Source License
@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.amalto.workbench.dialogs.ComplexTypeInputDialogR.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, 0, IDialogConstants.OK_LABEL, true); createButton(parent, 1, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.amalto.workbench.dialogs.datacontainer.UpdateAutoIncrementDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { resetBtn = createButton(parent, resetBtnId, Messages.UpdateAutoIncrementDialog_Reset, false); resetBtn.setEnabled(false);/*from w w w. ja v a 2 s . co m*/ GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.CENTER).applyTo(resetBtn); Button resetAllBtn = createButton(parent, resetAllBtnId, Messages.UpdateAutoIncrementDialog_resetAll, false); GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.CENTER).applyTo(resetAllBtn); Composite rightArea = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(0).equalWidth(true).applyTo(rightArea); GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).grab(true, false).applyTo(rightArea); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.amalto.workbench.dialogs.DataModelFilterDialog.java
License:Open Source License
@Override protected Control createButtonBar(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); composite.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WHITE)); createButton(composite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(composite, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); return composite; }
From source file:com.amalto.workbench.dialogs.ErrorExceptionDialog.java
License:Open Source License
protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(1) // this is incremented // by createButton .equalWidth(true).applyTo(composite); GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).span(2, 1).applyTo(composite); composite.setFont(parent.getFont()); createButton(composite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); return composite; }
From source file:com.amalto.workbench.dialogs.FacetsListInputDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); getButton(IDialogConstants.OK_ID).addSelectionListener(this.caller); }
From source file:com.amalto.workbench.dialogs.IdentityConstraintInputDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // super.createButtonsForButtonBar(parent); // getButton(IDialogConstants.OK_ID).addSelectionListener(this.caller); // /*//from w ww. ja v a2 s .c om // createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, // true); // createButton(parent, IDialogConstants.CANCEL_ID, // IDialogConstants.CANCEL_LABEL, false); // */ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.amalto.workbench.dialogs.ImportExchangeOptionsDialog.java
License:Open Source License
private void unzipDownloadRes(boolean export) { JSONObject datum = dataContent[exchangeDwnTable.getSelectionIndex()]; InputStream stream = null;/* ww w . j av a 2 s . c o m*/ OutputStream out = null; try { String url = datum.getString(COLUMN_URL_NAME); stream = HttpClientUtil.getInstreamContentByHttpget(url); if (null == stream) { throw new RuntimeException("cannot get the content stream"); //$NON-NLS-1$ } String downloadFolder = System.getProperty("user.dir") + File.separator + (export ? "temp" : "xsdTemp");//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ String subFolderForTmp = downloadFolder + File.separator + "tmp" + System.currentTimeMillis();//$NON-NLS-1$ File tempFile = new File(subFolderForTmp + File.separator + "tmp" + System.currentTimeMillis());//$NON-NLS-1$ File dir = new File(downloadFolder); if (!dir.exists()) { dir.mkdir(); } File subDir = new File(subFolderForTmp); if (!subDir.exists()) { subDir.mkdir(); } if (zipFileRepository.length() > 0) { zipFileRepository.delete(0, zipFileRepository.length()); } out = new FileOutputStream(tempFile); IOUtils.copy(stream, out); out.flush(); if (!export) { ZipToFile.unZipFile(tempFile.getAbsolutePath(), subFolderForTmp); boolean result = false; int tryCount = 0; while (!result && tryCount++ < 10) { System.gc(); result = tempFile.delete(); } zipFileRepository.append(subFolderForTmp); } else { zipFileRepository.append(tempFile.getAbsolutePath()); } } catch (Exception e1) { final MessageDialog dialog = new MessageDialog(this.getParentShell().getShell(), Messages.ImportExchangeOptionsDialog_ParsingError, null, e1.getMessage(), MessageDialog.ERROR, new String[] { IDialogConstants.OK_LABEL }, 0); dialog.open(); } finally { IOUtils.closeQuietly(out); IOUtils.closeQuietly(stream); } }
From source file:com.amalto.workbench.dialogs.InputComboDialog.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); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); // do this here because setting the text will set enablement on the ok // button/*from w w w . j av a 2 s . co m*/ if (value != null) { inputCombo.setText(value); } }
From source file:com.amalto.workbench.dialogs.JobProcesssOptionsDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // create Generate and Cancel buttons by default Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); button.setText(Messages.JobProcesssOptionsDialog_Generate); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }