Example usage for org.eclipse.jface.dialogs IMessageProvider INFORMATION

List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IMessageProvider INFORMATION.

Prototype

int INFORMATION

To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.

Click Source Link

Document

Constant for an info message (value 1).

Usage

From source file:at.rc.tacos.client.view.RosterEntryForm.java

License:Open Source License

/**
 * Creates the dialog's contents/* www. ja v a  2s .c  o m*/
 * 
 * @param parent
 *            the parent composite
 * @return Control
 */
@Override
protected Control createContents(Composite parent) {
    Control contents = super.createContents(parent);
    setTitle("Dienstplaneintrag");
    setMessage("Hier knnen Sie einen neuen Dienstplaneintrag anlegen", IMessageProvider.INFORMATION);
    setTitleImage(ImageFactory.getInstance().getRegisteredImage("application.logo"));
    return contents;
}

From source file:at.rc.tacos.client.view.TransportForm.java

License:Open Source License

/**
 * Creates the dialog's contents/*from  w  ww .  j av  a2 s  .c  o m*/
 * 
 * @param parent
 *            the parent composite
 * @return Control
 */
protected Control createContents(Composite parent) {
    multiTransportProvider = new MultiTransportContentProvider();
    Control contents = super.createContents(parent);
    setTitle("Transport");
    setMessage("Hier knnen Sie einen neuen Transport anlegen", IMessageProvider.INFORMATION);
    setTitleImage(ImageFactory.getInstance().getRegisteredImage("application.logo"));
    // force redraw
    getShell().pack(true);
    setShellStyle(SWT.SYSTEM_MODAL);

    // add some listeners to this view
    ModelFactory.getInstance().getStaffManager().addPropertyChangeListener(this);
    ModelFactory.getInstance().getDiseaseManager().addPropertyChangeListener(this);
    ModelFactory.getInstance().getAddressManager().addPropertyChangeListener(this);
    ModelFactory.getInstance().getVehicleManager().addPropertyChangeListener(this);

    return contents;
}

From source file:at.rc.tacos.client.view.VehicleForm.java

License:Open Source License

/**
 * Creates the dialog's contents// w w  w. j  ava 2 s.  c o  m
 * 
 * @param parent
 *            the parent composite
 * @return Control
 */
@Override
protected Control createContents(Composite parent) {
    Control contents = super.createContents(parent);
    setTitle("Fahrzeugverwaltung");
    setMessage(FORM_DESCRIPTION, IMessageProvider.INFORMATION);
    setTitleImage(ImageFactory.getInstance().getRegisteredImage("application.logo"));
    return contents;
}

From source file:at.rc.tacos.client.view.VehicleForm.java

License:Open Source License

/**
 * Helper method to determine wheter all fields are valid
 *///  w  w  w . j  a  va2 s . c  o m
private void checkRequiredFields() {
    setErrorMessage(null);
    setMessage(FORM_DESCRIPTION, IMessageProvider.INFORMATION);
    // Check the crew
    if (driverComboViewer.getSelection().isEmpty()) {
        setErrorMessage("Dem Fahrzeug wurde noch kein Fahrer zugewiesen.");
        readyButton.setSelection(false);
        return;
    }
    if (medic1ComboViewer.getSelection().isEmpty()) {
        setMessage("Dem Fahrzeug wurde noch kein Sanitter zugewiesen.", IMessageProvider.WARNING);
        return;
    }
    if (medic2ComboViewer.getSelection().isEmpty()) {
        setMessage("Dem Fahrzeug fehlt ein Sanitter.", IMessageProvider.WARNING);
        return;
    }
}

From source file:at.rc.tacos.client.view.VehiclesSelectForm.java

License:Open Source License

/**
 * Creates the dialog's contents/*from  w  w  w .ja  v  a2  s. c o  m*/
 * 
 * @param parent
 *            the parent composite
 * @return Control
 */
@Override
protected Control createContents(Composite parent) {
    Control contents = super.createContents(parent);
    setTitle("Fahrzeugverwaltung");
    setMessage("Bitte whlen sie ein Fahrzeug aus", IMessageProvider.INFORMATION);
    setTitleImage(ImageFactory.getInstance().getRegisteredImage("application.logo"));
    return contents;
}

From source file:at.spardat.xma.gui.mapper.MapperDialog.java

License:Open Source License

/**
 * Responsible for graying and informing
 *//* w w  w  . j a v a  2  s . co  m*/
private void stateChanged() {
    if (mapGraphics_.getFocusedRelationship() != null) {
        setMessage("Hit <del> or <d> to delete this relationship.", IMessageProvider.INFORMATION);
    } else {
        setMessage(DEFAULT_MESSAGE);
    }
    // gray delete button
    Object[] selectedMdls = getSelectedBdMdls();
    boolean oneBDSelected = selectedMdls.length == 1 && selectedMdls[0] instanceof MdlBusinessObject;
    bdDeleteW.setEnabled(oneBDSelected);
    int indexOfBD = -1;
    if (selectedMdls.length > 0 && oneBDSelected) {
        indexOfBD = mdlRoot_.indexOf((MdlBusinessObject) selectedMdls[0]);
    }
    upW.setEnabled(oneBDSelected && mdlRoot_.size() > 1 && indexOfBD >= 1);
    downW.setEnabled(oneBDSelected && mdlRoot_.size() > 1 && indexOfBD <= mdlRoot_.size() - 2);
}

From source file:au.gov.ga.earthsci.bookmark.part.editor.BookmarkEditorDialog.java

License:Apache License

private void updateValidityIndicators(IBookmarkEditor editor, boolean valid,
        IBookmarkEditorMessage[] messages) {
    if (editor == null) {
        return;//from www  .  j ava2  s.  c om
    }
    if (valid || !currentEditorIncludedInBookmark()) {
        messageArea.restoreTitle();
        if (getButton(IDialogConstants.OK_ID) != null) {
            getButton(IDialogConstants.OK_ID).setEnabled(true);
        }
    } else if (!valid) {
        if (messages != null && messages.length > 0) {
            messageArea.updateText(messages[0].getMessage(),
                    messages[0].getLevel() == Level.ERROR ? IMessageProvider.ERROR
                            : messages[0].getLevel() == Level.WARNING ? IMessageProvider.WARNING
                                    : IMessageProvider.INFORMATION);
        }
        if (getButton(IDialogConstants.OK_ID) != null) {
            getButton(IDialogConstants.OK_ID).setEnabled(false);
        }
    }
}

From source file:bndtools.utils.MessagesPopupDialog.java

License:Open Source License

static Image getMessageImage(int messageType) {
    switch (messageType) {
    case IMessageProvider.INFORMATION:
        return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO);
    case IMessageProvider.WARNING:
        return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);
    case IMessageProvider.ERROR:
        return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR);
    default:// ww  w  .  j av a2s .  c  o  m
        return null;
    }
}

From source file:ca.mcgill.cs.swevo.qualyzer.handlers.ImportProjectHandler.java

License:Open Source License

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {

    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    ProjectImportWizard wizard = new ProjectImportWizard();
    WizardDialog wDialog = new WizardDialog(shell, wizard);
    wDialog.create();//ww  w  .  j a v a2  s. c om
    wDialog.setMessage(Messages.getString("wizards.ProjectImportWizard.title"), IMessageProvider.INFORMATION);
    wDialog.setBlockOnOpen(!fTesting);
    wDialog.open();
    fTester.execute(wDialog);

    return null;
}

From source file:ca.mcgill.cs.swevo.qualyzer.wizards.pages.ProjectExportWizardPage.java

License:Open Source License

/**
 * @param selection/*  w  w w. j ava 2  s.  c  o  m*/
 */
public ProjectExportWizardPage(IStructuredSelection selection) {
    super(selection);
    setMessage(Messages.getString("wizards.pages.ProjectExportWizardPage.title"), IMessageProvider.INFORMATION);
    //Save the dirty editors here. No longer done later, since it doesn't work there for some reason.
    saveDirtyEditors();
}