List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION
int INFORMATION
To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.
Click Source Link
From source file:com.siteview.mde.internal.ui.wizards.imports.PluginImportFinishDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); super.setTitle(fTitle); super.setMessage(fMessage, IMessageProvider.INFORMATION); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); composite.setLayout(new GridLayout(1, true)); fPluginListViewer = new TableViewer(composite); fPluginListViewer.setLabelProvider(new MDELabelProvider()); fPluginListViewer.setContentProvider(new PluginImportTableContentProvider()); fPluginListViewer.setInput(fPluginList); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = 100;// ww w . j av a 2s . c o m data.heightHint = 200; fPluginListViewer.getTable().setLayoutData(data); fConfigured = true; return composite; }
From source file:com.siteview.mde.internal.ui.wizards.imports.PluginImportFinishDialog.java
License:Open Source License
public void setMessage(String newMessage) { fMessage = newMessage; if (fConfigured) super.setMessage(fMessage, IMessageProvider.INFORMATION); }
From source file:com.surelogic.common.ui.dialogs.ManageLicensesDialog.java
@Override protected Control createDialogArea(Composite parent) { final Composite contents = (Composite) super.createDialogArea(parent); final Composite panel = new Composite(contents, SWT.NONE); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); data.widthHint = CONTENTS_WIDTH_HINT; panel.setLayoutData(data);// ww w . j a v a 2s . com GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; panel.setLayout(gridLayout); final Label info = new Label(panel, SWT.WRAP); info.setText(I18N.msg("common.manage.licenses.dialog.info")); info.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 2, 1)); final Table licenseTable = new Table(panel, SWT.MULTI | SWT.FULL_SELECTION); licenseTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); licenseTable.setHeaderVisible(true); licenseTable.setLinesVisible(true); final TableColumn product = new TableColumn(licenseTable, SWT.DEFAULT); product.setText(I18N.msg("common.manage.licenses.dialog.column.product")); final TableColumn activated = new TableColumn(licenseTable, SWT.DEFAULT); activated.setText(I18N.msg("common.manage.licenses.dialog.column.activated")); final TableColumn type = new TableColumn(licenseTable, SWT.DEFAULT); type.setText(I18N.msg("common.manage.licenses.dialog.column.type")); final TableColumn expired = new TableColumn(licenseTable, SWT.DEFAULT); expired.setText(I18N.msg("common.manage.licenses.dialog.column.expired")); final TableColumn issuedTo = new TableColumn(licenseTable, SWT.DEFAULT); issuedTo.setText(I18N.msg("common.manage.licenses.dialog.column.issuedTo")); final TableColumn id = new TableColumn(licenseTable, SWT.DEFAULT); id.setText(I18N.msg("common.manage.licenses.dialog.column.id")); final Composite buttonPanel = new Composite(panel, SWT.NONE); buttonPanel.setLayoutData(new GridData(SWT.DEFAULT, SWT.TOP, false, false)); final RowLayout rl = new RowLayout(SWT.VERTICAL); rl.fill = true; buttonPanel.setLayout(rl); final Button installFromFileButton = new Button(buttonPanel, SWT.PUSH); installFromFileButton.setText(I18N.msg("common.manage.licenses.dialog.installFromFile")); final Button installFromClipboardButton = new Button(buttonPanel, SWT.PUSH); installFromClipboardButton.setText(I18N.msg("common.manage.licenses.dialog.installFromClipboard")); final Button activateButton = new Button(buttonPanel, SWT.PUSH); activateButton.setText(I18N.msg("common.manage.licenses.dialog.activate")); activateButton.setEnabled(false); final Button renewButton = new Button(buttonPanel, SWT.PUSH); renewButton.setText(I18N.msg("common.manage.licenses.dialog.renew")); renewButton.setEnabled(false); final Button uninstallButton = new Button(buttonPanel, SWT.PUSH); uninstallButton.setText(I18N.msg("common.manage.licenses.dialog.uninstall")); uninstallButton.setEnabled(false); setTitle(I18N.msg("common.manage.licenses.dialog.msg.title")); setMessage(I18N.msg("common.manage.licenses.dialog.msg"), IMessageProvider.INFORMATION); Dialog.applyDialogFont(panel); f_mediator = new ManageLicensesMediator(licenseTable, installFromFileButton, installFromClipboardButton, activateButton, renewButton, uninstallButton); f_mediator.init(); return contents; }
From source file:com.surelogic.common.ui.serviceability.SendServiceMessageCollectInformationPage.java
@Override public void createControl(Composite parent) { final Composite panel = new Composite(parent, SWT.NONE); setControl(panel);// w ww .ja va 2 s . co m @Nullable Pair<String, String> nameEmail = SLLicenseManager.getInstance().getNameAndEmail(); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; panel.setLayout(gridLayout); final Label info = new Label(panel, SWT.WRAP); info.setText(I18N.msg(f_data.propPfx() + "info")); GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false, 2, 1); data.widthHint = CONTENTS_WIDTH_HINT; info.setLayoutData(data); final Label email = new Label(panel, SWT.RIGHT); email.setText(I18N.msg(f_data.propPfx() + "email")); email.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, false, false)); final Text emailText = new Text(panel, SWT.SINGLE | SWT.BORDER); String emailValue = CommonCorePreferencesUtility.getServicabilityEmail(); if (nameEmail != null && "".equals(emailValue)) emailValue = nameEmail.second(); emailText.setText(emailValue); emailText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Label name = new Label(panel, SWT.RIGHT); name.setText(I18N.msg(f_data.propPfx() + "name")); name.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, false, false)); final Text nameText = new Text(panel, SWT.SINGLE | SWT.BORDER); // Use name preference if set (otherwise get from license) String nameValue = CommonCorePreferencesUtility.getServicabilityName(); if (nameEmail != null && "".equals(nameValue)) nameValue = nameEmail.first(); nameText.setText(nameValue); nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Button sendVersion = new Button(panel, SWT.CHECK); sendVersion.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1)); sendVersion.setText(I18N.msg(f_data.propPfx() + "sendVersion")); sendVersion.setSelection(true); final Button sendEclipseLog; if (f_data instanceof MessageWithLog) { final MessageWithLog mwl = (MessageWithLog) f_data; sendEclipseLog = new Button(panel, SWT.CHECK); sendEclipseLog.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1)); sendEclipseLog.setText(I18N.msg(f_data.propPfx() + "sendEclipseLog")); sendEclipseLog.setSelection(mwl.getSendLog()); } else { sendEclipseLog = null; } final Label space = new Label(panel, SWT.NONE); space.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1)); final Label summary = new Label(panel, SWT.RIGHT); summary.setText(I18N.msg(f_data.propPfx() + "summary")); summary.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, false, false)); final Text summaryText = new Text(panel, SWT.SINGLE | SWT.BORDER); if (f_data.getSummary() != null) { summaryText.setText(f_data.getSummary()); } summaryText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Label description = new Label(panel, SWT.WRAP); description.setText(I18N.msg(f_data.propPfx() + "desc")); data = new GridData(SWT.FILL, SWT.DEFAULT, true, false, 2, 1); data.widthHint = CONTENTS_WIDTH_HINT; description.setLayoutData(data); final Text descriptionText = new Text(panel, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); descriptionText.setFont(JFaceResources.getTextFont()); if (f_data.getDescription() != null) descriptionText.setText(f_data.getDescription()); data = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1); data.heightHint = TIP_HEIGHT_HINT; descriptionText.setLayoutData(data); final Runnable updatePageComplete = new Runnable() { @Override public void run() { f_data.setEmail(emailText.getText()); f_data.setName(nameText.getText()); f_data.setSummary(summaryText.getText()); f_data.setDescription(descriptionText.getText()); f_data.setSendVersionInfo(sendVersion.getSelection()); if (f_data instanceof MessageWithLog) { final MessageWithLog mwl = (MessageWithLog) f_data; mwl.setSendLog(sendEclipseLog.getSelection()); } setPageComplete(f_data.minimumDataEntered()); } }; final Listener listener = new Listener() { @Override public void handleEvent(Event event) { updatePageComplete.run(); } }; emailText.addListener(SWT.Modify, listener); nameText.addListener(SWT.Modify, listener); summaryText.addListener(SWT.Modify, listener); descriptionText.addListener(SWT.Modify, listener); sendVersion.addListener(SWT.Selection, listener); if (f_data instanceof MessageWithLog) { sendEclipseLog.addListener(SWT.Selection, listener); } /* * We have to run this a bit later so that the OK button is created. */ EclipseUIUtility.asyncExec(updatePageComplete); setTitle(I18N.msg(f_data.propPfx() + "msg.title")); setMessage(I18N.msg(f_data.propPfx() + "msg"), IMessageProvider.INFORMATION); }
From source file:com.telink.tc32eclipse.ui.dialogs.TCDBUserInputDialog.java
License:Open Source License
@Override public void create() { super.create(); setTitle("This is TCDB option dialog"); setMessage("This is a advanced options Dialog", IMessageProvider.INFORMATION); }
From source file:com.temenos.interaction.rimdsl.visualisation.views.TransitionForm.java
License:Open Source License
/** * Creates the header region of the form, with the search dialog, background * and title. It also sets up the error reporting * @param form//w ww . j a v a2s.c o m */ String createFormTextContent(IMessage[] messages) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); pw.println("<form>"); for (int i = 0; i < messages.length; i++) { IMessage message = messages[i]; pw.print("<li vspace=\"false\" style=\"image\" indent=\"16\" value=\""); switch (message.getMessageType()) { case IMessageProvider.ERROR: pw.print("error"); break; case IMessageProvider.WARNING: pw.print("warning"); break; case IMessageProvider.INFORMATION: pw.print("info"); break; } pw.print("\"> <a href=\""); pw.print(i + ""); pw.print("\">"); if (message.getPrefix() != null) { pw.print(message.getPrefix()); } pw.print(message.getMessage()); pw.println("</a></li>"); } pw.println("</form>"); pw.flush(); return sw.toString(); }
From source file:com.vectrace.MercurialEclipse.dialogs.AutoresolveRecapDialog.java
License:Open Source License
@Override protected Control createDialogArea(Composite parent) { super.createDialogArea(parent); Composite container = SWTWidgetHelper.createComposite(parent, 1); GridData gd = SWTWidgetHelper.getFillGD(400); gd.minimumWidth = 500;/*from w w w .j av a2s. c o m*/ container.setLayoutData(gd); CommitFilesChooser fileList = new CommitFilesChooser(container, false, resources, true, true, true); fileList.setLayoutData(new GridData(GridData.FILL_BOTH)); if (!allConflictsResolved) { SWTWidgetHelper.createLabel(container, Messages.getString("AutoresolveSummaryDialog.conflictsExist")); //$NON-NLS-1$ } getShell().setText(Messages.getString("AutoresolveSummaryDialog.windowTitle")); //$NON-NLS-1$ setTitle(Messages.getString("AutoresolveSummaryDialog.title")); //$NON-NLS-1$ if (resources.size() == 0) { setMessage(Messages.getString("AutoresolveSummaryDialog.noResourcesResolved"), //$NON-NLS-1$ IMessageProvider.WARNING); } else { setMessage(Messages.getString("AutoresolveSummaryDialog.message"), //$NON-NLS-1$ IMessageProvider.INFORMATION); } return container; }
From source file:com.versant.core.jdo.tools.eclipse.VOAConfigComposite.java
License:Open Source License
private void validateProject() { String projectPath = pc.getProjectFilePath(); if (projectPath == null || projectPath.length() == 0) { setMessage("Please select a VOA Project file.", IMessageProvider.ERROR); return;/* w ww .j a v a2 s .co m*/ } File file = new File(projectPath); String cPath = projectPath; try { cPath = file.getCanonicalPath(); } catch (IOException e1) { cPath = file.getAbsolutePath(); } if (!file.getAbsolutePath().equals(projectPath)) { file = new java.io.File(project.getLocation().toFile(), projectPath); } try { cPath = file.getCanonicalPath(); } catch (IOException e1) { cPath = file.getAbsolutePath(); } projectPath = cPath; pc.setProjectFilePath(projectPath); if (file != null && file.isDirectory()) { setMessage(projectPath + " is not a valid file.", IMessageProvider.ERROR); return; } if (file != null && file.exists() && !file.canWrite()) { setMessage("Project must be writable", IMessageProvider.ERROR); return; } boolean createFile = file == null || !file.exists(); if (createFile) { File source = null; try { source = Utils.getSrcFile(project); } catch (JavaModelException e) { source = project.getLocation().toFile(); } String jdoPathStr = source.getName() + "/" + project.getName() + ".jdo"; setMessage("Create Project file: " + file + "\nand .jdo file: " + jdoPathStr, IMessageProvider.WARNING); } else { setMessage("Project file found", IMessageProvider.INFORMATION); Properties props = new Properties(); InputStream in = null; try { in = new FileInputStream(file); props.load(in); } catch (Exception e) { e.printStackTrace(); try { in.close(); } catch (Exception x) { } } if (!props.containsKey("javax.jdo.option.ConnectionURL")) { setMessage("Project file(" + file.getName() + ") is not valid.\nIt does not contain the property:javax.jdo.option.ConnectionURL", IMessageProvider.ERROR); return; } } }
From source file:de.chdev.artools.reporter.ui.CreateReportDialog.java
License:Apache License
@Override protected Control createContents(Composite parent) { Control contents = super.createContents(parent); setTitle(Messages.CreateReportDialog_dialogTitle); ImageDescriptor imageDesc = Activator.getImageDescriptor("icons/k-chart-icon-48x48.png"); //$NON-NLS-1$ setTitleImage(imageDesc.createImage()); setMessage(Messages.CreateReportDialog_dialogInformation, IMessageProvider.INFORMATION); return contents; }
From source file:de.fu_berlin.inf.dpp.videosharing.preferences.ImageTileEncoderPreferencePage.java
License:Open Source License
public ImageTileEncoderPreferencePage() { super(FieldEditorPreferencePage.GRID); SarosPluginContext.initComponent(this); setPreferenceStore(saros.getPreferenceStore()); setDescription("Set up the image tile encoder.\nNote: Changing values here does not affect compression."); if (!getPreferenceStore().getString(PreferenceConstants.ENCODING_CODEC).equals(Codec.IMAGE.name())) setMessage("You should choose the Tile-Encoder on the encoder preference-page.", IMessageProvider.INFORMATION); }