Example usage for org.eclipse.jface.dialogs MessageDialog setDefaultImage

List of usage examples for org.eclipse.jface.dialogs MessageDialog setDefaultImage

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs MessageDialog setDefaultImage.

Prototype

public static void setDefaultImage(Image image) 

Source Link

Document

Sets the default image.

Usage

From source file:org.pentaho.big.data.kettle.plugins.formats.impl.avro.output.AvroOutputDialog.java

License:Apache License

private MessageDialog getFieldsChoiceDialog(Shell shell, int existingFields, int newFields) {
    MessageDialog messageDialog = new MessageDialog(shell,
            BaseMessages.getString(PKG, "AvroOutputDialog.GetFieldsChoice.Title"), // "Warning!"
            null,/*from  w ww  .ja v  a  2 s.c  o m*/
            BaseMessages.getString(
                    PKG, "AvroOutputDialog.GetFieldsChoice.Message", "" + existingFields, "" + newFields),
            MessageDialog.WARNING,
            new String[] { BaseMessages.getString(PKG, "AvroOutputDialog.AddNew"),
                    BaseMessages.getString(PKG, "AvroOutputDialog.Add"),
                    BaseMessages.getString(PKG, "AvroOutputDialog.ClearAndAdd"),
                    BaseMessages.getString(PKG, "AvroOutputDialog.Cancel"), },
            0);
    MessageDialog.setDefaultImage(GUIResource.getInstance().getImageSpoon());
    return messageDialog;
}

From source file:org.pentaho.big.data.kettle.plugins.formats.impl.orc.output.OrcOutputDialog.java

License:Apache License

private MessageDialog getFieldsChoiceDialog(Shell shell, int existingFields, int newFields) {
    MessageDialog messageDialog = new MessageDialog(shell,
            BaseMessages.getString(PKG, "OrcOutputDialog.GetFieldsChoice.Title"), // "Warning!"
            null,//www  .  ja  v  a2 s.  c om
            BaseMessages.getString(
                    PKG, "OrcOutputDialog.GetFieldsChoice.Message", "" + existingFields, "" + newFields),
            MessageDialog.WARNING,
            new String[] { BaseMessages.getString(PKG, "OrcOutputDialog.AddNew"),
                    BaseMessages.getString(PKG, "OrcOutputDialog.Add"),
                    BaseMessages.getString(PKG, "OrcOutputDialog.ClearAndAdd"),
                    BaseMessages.getString(PKG, "OrcOutputDialog.Cancel"), },
            0);
    MessageDialog.setDefaultImage(GUIResource.getInstance().getImageSpoon());
    return messageDialog;
}

From source file:org.pentaho.big.data.kettle.plugins.formats.impl.parquet.input.ParquetInputDialog.java

License:Apache License

static MessageDialog getFieldsChoiceDialog(Shell shell, int newFields) {
    MessageDialog messageDialog = new MessageDialog(shell,
            BaseMessages.getString(PKG, "ParquetInput.GetFieldsChoice.Title"), // "Warning!"
            null, BaseMessages.getString(PKG, "ParquetInput.GetFieldsChoice.Message", "" + newFields),
            MessageDialog.WARNING,/*from  www.j a  va 2 s  .co m*/
            new String[] { BaseMessages.getString(PKG, "ParquetInput.GetFieldsChoice.AddNew"),
                    BaseMessages.getString(PKG, "ParquetInput.GetFieldsChoice.Add"),
                    BaseMessages.getString(PKG, "ParquetInput.GetFieldsChoice.ClearAndAdd"),
                    BaseMessages.getString(PKG, "ParquetInput.GetFieldsChoice.Cancel"), },
            0) {

        public void create() {
            super.create();
            getShell().setBackground(GUIResource.getInstance().getColorWhite());
        }

        protected Control createMessageArea(Composite composite) {
            Control control = super.createMessageArea(composite);
            imageLabel.setBackground(GUIResource.getInstance().getColorWhite());
            messageLabel.setBackground(GUIResource.getInstance().getColorWhite());
            return control;
        }

        protected Control createDialogArea(Composite parent) {
            Control control = super.createDialogArea(parent);
            control.setBackground(GUIResource.getInstance().getColorWhite());
            return control;
        }

        protected Control createButtonBar(Composite parent) {
            Control control = super.createButtonBar(parent);
            control.setBackground(GUIResource.getInstance().getColorWhite());
            return control;
        }
    };
    MessageDialog.setDefaultImage(GUIResource.getInstance().getImageSpoon());
    return messageDialog;
}

From source file:org.pentaho.big.data.kettle.plugins.formats.impl.parquet.output.ParquetOutputDialog.java

License:Apache License

static MessageDialog getFieldsChoiceDialog(Shell shell, int existingFields, int newFields) {
    MessageDialog messageDialog = new MessageDialog(shell,
            BaseMessages.getString(PKG, "ParquetOutput.GetFieldsChoice.Title"), // "Warning!"
            null, BaseMessages.getString(PKG, "ParquetOutput.GetFieldsChoice.Message", "" + newFields),
            MessageDialog.WARNING,// w  w w. j  a  v  a  2 s. c o  m
            new String[] { BaseMessages.getString(PKG, "ParquetOutput.GetFieldsChoice.AddNew"),
                    BaseMessages.getString(PKG, "ParquetOutput.GetFieldsChoice.Add"),
                    BaseMessages.getString(PKG, "ParquetOutput.GetFieldsChoice.ClearAndAdd"),
                    BaseMessages.getString(PKG, "ParquetOutput.GetFieldsChoice.Cancel"), },
            0) {

        public void create() {
            super.create();
            getShell().setBackground(GUIResource.getInstance().getColorWhite());
        }

        protected Control createMessageArea(Composite composite) {
            Control control = super.createMessageArea(composite);
            imageLabel.setBackground(GUIResource.getInstance().getColorWhite());
            messageLabel.setBackground(GUIResource.getInstance().getColorWhite());
            return control;
        }

        protected Control createDialogArea(Composite parent) {
            Control control = super.createDialogArea(parent);
            control.setBackground(GUIResource.getInstance().getColorWhite());
            return control;
        }

        protected Control createButtonBar(Composite parent) {
            Control control = super.createButtonBar(parent);
            control.setBackground(GUIResource.getInstance().getColorWhite());
            return control;
        }
    };
    MessageDialog.setDefaultImage(GUIResource.getInstance().getImageSpoon());
    return messageDialog;
}

From source file:org.pentaho.di.ui.trans.step.BaseStepDialog.java

License:Apache License

static MessageDialog getFieldsChoiceDialog(Shell shell, int existingFields, int newFields) {
    MessageDialog messageDialog = new MessageDialog(shell,
            BaseMessages.getString(PKG, "BaseStepDialog.GetFieldsChoice.Title"), // "Warning!"
            null,/*  w ww.ja  v a 2s .  c  om*/
            BaseMessages.getString(
                    PKG, "BaseStepDialog.GetFieldsChoice.Message", "" + existingFields, "" + newFields),
            MessageDialog.WARNING,
            new String[] { BaseMessages.getString(PKG, "BaseStepDialog.AddNew"),
                    BaseMessages.getString(PKG, "BaseStepDialog.Add"),
                    BaseMessages.getString(PKG, "BaseStepDialog.ClearAndAdd"),
                    BaseMessages.getString(PKG, "BaseStepDialog.Cancel"), },
            0);
    MessageDialog.setDefaultImage(GUIResource.getInstance().getImageSpoon());
    return messageDialog;
}