List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID
int CANCEL_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID.
Click Source Link
From source file:dynamicrefactoring.interfaz.wizard.ExportPlanWizard.java
License:Open Source License
/** * Crea el contenido de la barra de botones. * /*from w w w. j a v a2 s. com*/ * @param parent el elemento padre de los botones. */ @Override protected void createButtonsForButtonBar(Composite parent) { bt_Export = createButton(parent, IDialogConstants.OK_ID, Messages.ExportWizard_Export, true); bt_Export.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, ButtonTextProvider.getCancelText(), false); t_Output.setText(RefactoringPlugin.getDefault().getExportRefactoringPlanPreference()); }
From source file:dynamicrefactoring.interfaz.wizard.ExportWizard.java
License:Open Source License
/** * Crea el contenido de la barra de botones. * //from www . jav a 2 s .co m * @param parent * el elemento padre de los botones. */ @Override protected void createButtonsForButtonBar(Composite parent) { btExport = createButton(parent, IDialogConstants.OK_ID, Messages.ExportWizard_Export, true); btExport.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, ButtonTextProvider.getCancelText(), false); }
From source file:dynamicrefactoring.interfaz.wizard.ImportPlanWizard.java
License:Open Source License
/** * Crea el contenido de la barra de botones. * /* www .j av a 2 s.com*/ * @param parent elemento padre de los contenidos de la barra de botones. */ @Override protected void createButtonsForButtonBar(Composite parent) { bt_Execute = createButton(parent, IDialogConstants.OK_ID, Messages.ImportPlanWizard_Execute, true); bt_Execute.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, ButtonTextProvider.getCancelText(), false); t_Input.setText(RefactoringPlugin.getDefault().getImportRefactoringPlanPreference()); }
From source file:dynamicrefactoring.interfaz.wizard.ImportWizard.java
License:Open Source License
/** * Crea el contenido de la barra de botones. * //from w w w.ja va2s . c o m * @param parent elemento padre de los contenidos de la barra de botones. */ @Override protected void createButtonsForButtonBar(Composite parent) { bt_Import = createButton(parent, IDialogConstants.OK_ID, Messages.ImportWizard_Import, true); bt_Import.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, ButtonTextProvider.getCancelText(), false); }
From source file:edu.iastate.cs.boa.ui.dialogs.InputSelectionDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); combo.setFocus();/*from w w w .ja v a 2 s. c om*/ if (value != null) combo.setText(value); }
From source file:edu.kit.joana.ui.ifc.sdg.gui.views.LatticeDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); if (fAddCancelButton) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); }// w w w . j a v a2s .c o m }
From source file:edu.tsinghua.lumaqq.ui.helper.ExportHelper.java
License:Open Source License
/** * ?//from w w w . j ava2s . co m * * @param arg * ? * @param defaultFileName * ??? */ public void exportMessage(Map<String, Object> arg, String defaultFileName) { // ? RecordExportTypeDialog dialog = new RecordExportTypeDialog(main.getShell(), factory); if (dialog.open() == IDialogConstants.CANCEL_ID) return; String fileTypeName = dialog.getFileTypeName(); IRecordExporter exporter = factory.getExporter(fileTypeName); if (exporter == null) return; // ?? FileDialog fd = new FileDialog(main.getShell(), SWT.SAVE); fd.setFilterExtensions(new String[] { '*' + factory.getFilterExtension(fileTypeName), "*.*" }); fd.setFilterNames(new String[] { factory.getFilterName(fileTypeName), "All Files" }); fd.setFileName(defaultFileName + factory.getFilterExtension(fileTypeName)); String filename = fd.open(); if (filename == null) return; exportToFile(exporter, arg, filename); }
From source file:edu.tsinghua.lumaqq.ui.helper.ExportHelper.java
License:Open Source License
/** * ??????/* ww w . j a va 2s.co m*/ */ public void exportAllMessage() { // ? RecordExportTypeDialog d = new RecordExportTypeDialog(main.getShell(), factory); if (d.open() == IDialogConstants.CANCEL_ID) return; String fileTypeName = d.getFileTypeName(); // DirectoryDialog dialog = new DirectoryDialog(main.getShell(), SWT.OPEN); dialog.setMessage(dir_dialog_export_message); dialog.setText(dir_dialog_common_title); String dir = dialog.open(); // if (dir != null) { // ???? if (!dir.endsWith(File.separator)) dir += File.separator; IExecutor executor = new DialogJobExecutor(main); executor.addJob(new ExportAllRecordJob(dir, fileTypeName, factory)); executor.execute(); } }
From source file:edu.tsinghua.lumaqq.ui.helper.ExportHelper.java
License:Open Source License
/** * ?/* w w w .ja v a 2 s. c o m*/ * * @param c * @param entries */ public void exportMessage(Cluster c, List<RecordEntry> entries) { // ? RecordExportTypeDialog dialog = new RecordExportTypeDialog(main.getShell(), factory); if (dialog.open() == IDialogConstants.CANCEL_ID) return; String fileTypeName = dialog.getFileTypeName(); // ?? FileDialog fd = new FileDialog(main.getShell(), SWT.SAVE); fd.setFilterExtensions(new String[] { '*' + factory.getFilterExtension(fileTypeName), "*.*" }); fd.setFilterNames(new String[] { factory.getFilterName(fileTypeName), "All Files" }); fd.setFileName( '(' + String.valueOf(c.externalId) + ')' + c.name + factory.getFilterExtension(fileTypeName)); String filename = fd.open(); if (filename == null) return; exportMessage(c, fileTypeName, filename, entries); }
From source file:edu.tsinghua.lumaqq.ui.helper.ExportHelper.java
License:Open Source License
/** * ?//from w w w . j a v a2 s.c o m * * @param f * @param entries */ public void exportMessage(User f, List<RecordEntry> entries) { // ? RecordExportTypeDialog dialog = new RecordExportTypeDialog(main.getShell(), factory); if (dialog.open() == IDialogConstants.CANCEL_ID) return; String fileTypeName = dialog.getFileTypeName(); // ?? FileDialog fd = new FileDialog(main.getShell(), SWT.SAVE); fd.setFilterExtensions(new String[] { '*' + factory.getFilterExtension(fileTypeName), "*.*" }); fd.setFilterNames(new String[] { factory.getFilterName(fileTypeName), "All Files" }); fd.setFileName(String.valueOf(f.qq) + factory.getFilterExtension(fileTypeName)); String filename = fd.open(); if (filename == null) return; exportMessage(f, fileTypeName, filename, entries); }