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

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

Introduction

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

Prototype

int NONE

To view the source code for org.eclipse.jface.dialogs MessageDialog NONE.

Click Source Link

Document

Constant for no image (value 0).

Usage

From source file:ca.uwaterloo.gp.fmp.provider.action.XMLExport.java

License:Open Source License

public void run() {
    StringBuffer output = new StringBuffer();

    // run recursion
    exportNode(output, object, 0);/*  w  ww.  j a  v a 2 s . c  o  m*/

    final String text = output.toString();

    //System.out.println(text);

    Dialog dialog = new MessageDialog(shell, "XML Export", null, null, MessageDialog.NONE,
            new String[] { "OK" }, 0) {
        protected Control createDialogArea(Composite parent) {
            Color white = shell.getDisplay().getSystemColor(SWT.COLOR_WHITE);
            parent.setBackground(white);
            // Composite composite = (Composite) super.createDialogArea(parent);
            // composite.setBackground(white);
            // Text field            
            fText = new Text(parent, SWT.MULTI);
            fText.setEditable(false);
            fText.setText(text);
            fText.selectAll();
            fText.setBackground(white);
            return fText;
        }
    };
    /*
     * Michal: unfortunately this only works in Eclipse 3.2
    PopupDialog dialog = new PopupDialog(shell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, true, false, false, false, 
    "XML Export", "Use <CTRL>-C to copy to clipboard, <ESC> to dismiss.") {
       protected Control createDialogArea(Composite parent) {
    Composite composite = (Composite) super.createDialogArea(parent);
    // Text field            
    fText= new Text(composite, SWT.MULTI);
    fText.setEditable(false);
    fText.setText(text);
    fText.selectAll();
    return composite;
       }
    };*/
    dialog.open();
}

From source file:com.amazonaws.eclipse.core.ui.MultiValueEditorDialog.java

License:Apache License

/**
 * Default constructor provides "OK" and "Cancel" buttons with an AWS logo.
 *///from www . j  a v  a2 s . com
public MultiValueEditorDialog(final Shell parentShell) {
    super(parentShell, "Edit values",
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON), "",
            MessageDialog.NONE, new String[] { "OK", "Cancel" }, 0);
}

From source file:com.amazonaws.eclipse.datatools.enablement.simpledb.ui.editor.MultiValueEditorDialog.java

License:Apache License

public MultiValueEditorDialog(final Shell parentShell, final SimpleDBItem item, final String attributeName) {
    super(parentShell, "Edit attribute values",
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON), "",
            MessageDialog.NONE, new String[] { "OK", "Cancel" }, 0);
    this.item = item;
    this.attributeName = attributeName;
    this.attributeValues = new ArrayList<String>();
    this.attributeValues.addAll(this.item.attributes.get(this.attributeName));
}

From source file:com.amazonaws.eclipse.dynamodb.AbstractAddNewAttributeDialog.java

License:Apache License

protected AbstractAddNewAttributeDialog() {
    super(Display.getCurrent().getActiveShell(), "Enter New Attribute Name", null, "Enter a new attribute name",
            MessageDialog.NONE, new String[] { "OK", "Cancel" }, 0);
}

From source file:com.amazonaws.eclipse.dynamodb.editor.MultiValueAttributeEditorDialog.java

License:Apache License

public MultiValueAttributeEditorDialog(final Shell parentShell, final AttributeValue attributeValue,
        int selectedType) {
    super(parentShell, "Edit values",
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON), "",
            MessageDialog.NONE, new String[] { "Save set", "Save single value", "Cancel" }, 0);
    this.values.addAll(AttributeValueUtil.getValuesFromAttribute(attributeValue));

    String dataTypeDescription;//from w  ww .jav a 2  s . com
    switch (selectedType) {
    case STRING:
        dataTypeDescription = "(String set)";
        scalarDataType = S;
        break;
    case NUMBER:
        dataTypeDescription = "(Number set)";
        scalarDataType = N;
        break;
    default:
        dataTypeDescription = "";
        break;
    }
    addColumnTextDescription(dataTypeDescription);
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.DeploymentInformationDialog.java

License:Apache License

public DeploymentInformationDialog(Shell parentShell, Environment environment, String launchMode,
        boolean enableDebugging, boolean warnAboutIngress) {
    super(parentShell, "Publishing to AWS Elastic Beanstalk",
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON),
            "Configure your environment deployment options", MessageDialog.NONE,
            new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);

    this.enableDebugging = enableDebugging;
    this.warnAboutIngress = warnAboutIngress;
    this.environment = environment;
    this.launchMode = launchMode;

    this.versionLabel = "v" + System.currentTimeMillis();
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.PublishDialog.java

License:Open Source License

public PublishDialog(Shell parentShell, String defaultVersionLabel) {
    super(parentShell, "Publishing to AWS Elastic Beanstalk",
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON),
            "Select a label for your new application version.", MessageDialog.NONE,
            new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
    this.versionLabel = defaultVersionLabel;

    if (ElasticBeanstalkPlugin.getDefault().getDialogSettings()
            .getSection(PUBLISH_DIALOG_SETTINGS_SECTION) == null) {
        publishDialogSettings = ElasticBeanstalkPlugin.getDefault().getDialogSettings()
                .addNewSection(PUBLISH_DIALOG_SETTINGS_SECTION);
    } else {//from  www  .  ja  v a2 s  . c  om
        publishDialogSettings = ElasticBeanstalkPlugin.getDefault().getDialogSettings()
                .getSection(PUBLISH_DIALOG_SETTINGS_SECTION);
    }
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.server.ui.configEditor.ExportTemplateDialog.java

License:Apache License

public ExportTemplateDialog(Shell parentShell, Collection<String> existingTemplateNames,
        String defaultTemplateName) {
    super(parentShell, "Export configuration template", null, "Choose a name and description for your template",
            MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
    this.templateName = defaultTemplateName;
    this.existingTemplateNames = existingTemplateNames;
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.server.ui.configEditor.ImportTemplateDialog.java

License:Apache License

public ImportTemplateDialog(Shell parentShell, Collection<String> existingTemplateNames) {
    super(parentShell, "Import configuration template", null,
            "Choose the configuration template to import into the editor.  "
                    + "This will overwrite any unsaved values in the editor.",
            MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
    this.existingTemplateNames = existingTemplateNames;
}

From source file:com.amazonaws.eclipse.explorer.dynamodb.TablePropertiesDialog.java

License:Apache License

protected TablePropertiesDialog(String tableName) {
    super(Display.getCurrent().getActiveShell(), "Table properties for " + tableName,
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON), null,
            MessageDialog.NONE, new String[] { "Update", "Cancel" }, 1);
    this.tableName = tableName;
    tableDescription = AwsToolkitCore.getClientFactory().getDynamoDBV2Client()
            .describeTable(new DescribeTableRequest().withTableName(tableName)).getTable();
    readCapacity = tableDescription.getProvisionedThroughput().getReadCapacityUnits();
    writeCapacity = tableDescription.getProvisionedThroughput().getWriteCapacityUnits();
    setShellStyle(getShellStyle() | SWT.RESIZE);

}