List of usage examples for org.eclipse.jface.dialogs IMessageProvider NONE
int NONE
To view the source code for org.eclipse.jface.dialogs IMessageProvider NONE.
Click Source Link
From source file:org.kalypso.model.wspm.tuhh.ui.imports.WProfImportFilePage.java
License:Open Source License
@Override public void createControl(final Composite parent) { final Composite panel = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(panel); final Control fileControl = createFileControl(panel); fileControl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); final Control srsControl = createSrsControl(panel); srsControl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); final Control charsetControl = createCharsetControl(panel); charsetControl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); m_imageChooser = createContextControl("imageContext"); //$NON-NLS-1$ createChooserControl(panel, m_imageChooser, Messages.getString("WProfImportFilePage_0"), //$NON-NLS-1$ new GridData(SWT.FILL, SWT.CENTER, true, false)); m_pdfChooser = createContextControl("pdfContext"); //$NON-NLS-1$ createChooserControl(panel, m_pdfChooser, Messages.getString("WProfImportFilePage_1"), //$NON-NLS-1$ new GridData(SWT.FILL, SWT.CENTER, true, false)); setControl(panel);// ww w . j a v a 2 s.c om setMessage(null, IMessageProvider.NONE); }
From source file:org.kalypso.model.wspm.tuhh.ui.imports.WProfImportFilePage.java
License:Open Source License
protected void inputChanged() { final IMessageProvider message = checkInput(); setMessage(message.getMessage(), message.getMessageType()); setPageComplete(message.getMessageType() == IMessageProvider.NONE); }
From source file:org.kalypso.model.wspm.tuhh.ui.imports.WProfImportFilePage.java
License:Open Source License
private IMessageProvider checkInput() { final File wprofFile = m_shapeChooser.getFile(); if (wprofFile == null) return new MessageProvider(Messages.getString("WProfImportFilePage_8"), IMessageProvider.ERROR); //$NON-NLS-1$ if (!wprofFile.exists()) return new MessageProvider(Messages.getString("WProfImportFilePage_9"), IMessageProvider.ERROR); //$NON-NLS-1$ final String selectedCRS = m_crsPanel == null ? null : m_crsPanel.getSelectedCRS(); if (selectedCRS == null) return new MessageProvider(Messages.getString("WProfImportFilePage_10"), IMessageProvider.ERROR); //$NON-NLS-1$ return new MessageProvider(null, IMessageProvider.NONE); }
From source file:org.kalypso.model.wspm.tuhh.ui.imports.WProfOptionsPage.java
License:Open Source License
public void validate() { final IMessageProvider markerMessage = m_markerOptions.validate(); if (markerMessage != null) { setMessage(markerMessage.getMessage(), markerMessage.getMessageType()); } else {/* w w w. j a va 2 s . co m*/ setMessage(null, IMessageProvider.NONE); } }
From source file:org.kalypso.model.wspm.ui.view.chart.ProfilChartViewPart.java
License:Open Source License
private void updateMessages(final IProfile newProfile) { if (newProfile == null) { setFormMessage(Messages.getString("org.kalypso.model.wspm.ui.view.chart.ChartView.0"), //$NON-NLS-1$ IMessageProvider.INFORMATION); setPartNames(Messages.getString("org.kalypso.model.wspm.ui.view.AbstractProfilViewPart_1"), //$NON-NLS-1$ Messages.getString("org.kalypso.model.wspm.ui.view.AbstractProfilViewPart_2")); //$NON-NLS-1$ } else {//from w w w .j a v a2 s . c o m setFormMessage(null, IMessageProvider.NONE); setPartNames(Messages.getString("ProfilChartViewPart.1", newProfile.getStation()), //$NON-NLS-1$ newProfile.getDescription()); } }
From source file:org.kalypso.ui.wizard.shape.ImportShapeFileImportPage.java
License:Open Source License
@Override public void createControl(final Composite parent) { m_binding = new DatabindingWizardPage(this, null); initializeDialogUnits(parent);/* w w w . ja v a 2s . c o m*/ final Composite panel = new Composite(parent, SWT.NULL); GridLayoutFactory.swtDefaults().applyTo(panel); panel.setFont(parent.getFont()); createSourceGroup(panel); createStyleGroup(panel); setControl(panel); setMessage(null, IMessageProvider.NONE); setErrorMessage(null); }
From source file:org.kalypso.util.themes.image.controls.ImageComposite.java
License:Open Source License
/** * This function updates the composite.// w ww . j ava 2 s.com * * @param status * A status, containing a message, which should be displayed in the upper area of the view. May be null. */ protected void update(final IStatus status) { /* Update nothing, when no form or no content is defined. */ /* In this case the composite was never correct initialized. */ if (m_main == null || m_content == null) return; /* Update the message. */ if (status != null && !status.isOK()) m_main.setMessage(status.getMessage(), MessageUtilitites.convertStatusSeverity(status.getSeverity())); else m_main.setMessage(null, IMessageProvider.NONE); /* Dispose the content of the composite. */ if (!m_content.isDisposed()) m_content.dispose(); /* Redraw the content of the composite. */ m_content = createContentComposite(m_main.getBody()); m_content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); /* Do a reflow. */ m_main.layout(true, true); }
From source file:org.kalypso.util.themes.position.controls.PositionComposite.java
License:Open Source License
/** * This function updates the composite.//from w w w. j a v a 2s. c om * * @param status * A status, containing a message, which should be displayed in the upper area of the view. May be null. */ protected void update(final IStatus status) { /* Update nothing, when no form or no content is defined. */ /* In this case the composite was never correct initialized. */ if (m_main == null || m_content == null) return; /* Dispose the content of the composite. */ if (!m_content.isDisposed()) m_content.dispose(); /* Update the message. */ if (status != null && !status.isOK()) m_main.setMessage(status.getMessage(), MessageUtilitites.convertStatusSeverity(status.getSeverity())); else m_main.setMessage(null, IMessageProvider.NONE); /* Redraw the content of the composite. */ m_content = createContentComposite(m_main.getBody()); m_content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); /* Do a reflow. */ m_main.layout(true, true); }
From source file:org.mailster.gui.prefs.ConfigurationDialog.java
License:Open Source License
/** * Updates the message./*from w w w . j av a 2 s . c o m*/ * * @see org.eclipse.jface.preference.IPreferencePageContainer#updateMessage() */ public void updateMessage() { String message = null; String errorMessage = null; boolean showingError = false; IPreferencePage currentPage = this.getCurrentPage(); if (currentPage != null) { message = currentPage.getMessage(); errorMessage = currentPage.getErrorMessage(); } int messageType = IMessageProvider.NONE; if (message != null && currentPage instanceof IMessageProvider) { messageType = ((IMessageProvider) currentPage).getMessageType(); } if (errorMessage == null) { if (showingError) { // we were previously showing an error showingError = false; } } else { message = errorMessage; messageType = IMessageProvider.ERROR; if (!showingError) { // we were not previously showing an error showingError = true; } } this.messageArea.updateText(message, messageType); }
From source file:org.mailster.gui.prefs.widgets.DialogMessageArea.java
License:Open Source License
/** * Enables the title and disable the message text and image. */// w w w. j a va2s . co m public void restoreTitle() { this.titleLabel.setVisible(true); this.messageComposite.setVisible(false); this.lastMessageText = null; this.lastMessageType = IMessageProvider.NONE; }