Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.MessageDialog.open()


  public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkboxText) {
    if (!isDialogEnabled(id))
      return OptionalMessageDialog.NOT_SHOWN;

    MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, checkboxText);
    return dialog.open();
  }

  protected OptionalMessageDialog(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
    this(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, CHECKBOX_TEXT);
  }
View Full Code Here


        public void run() {
          String title = XMLWizardsMessages.ExampleProjectCreationWizard_overwritequery_title;
          String msg = NLS.bind(XMLWizardsMessages.ExampleProjectCreationWizard_overwritequery_message, file);
          String[] options = {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL};
          MessageDialog dialog = new MessageDialog(getShell(), title, null, msg, MessageDialog.QUESTION, options, 0);
          result[0] = dialog.open();
        }
      });
      return result[0];
    }
View Full Code Here

            if ( this.currentPassword.verify( testPassword ) )
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verified sucessfully", MessageDialog.INFORMATION, new String[]
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
            else
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verification failed", MessageDialog.ERROR, new String[]
View Full Code Here

            else
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verification failed", MessageDialog.ERROR, new String[]
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
        }
    }

View Full Code Here

            if ( externalFile.exists() )
            {
                MessageDialog overwriteDialog = new MessageDialog( shell, "Overwrite", null, "Overwrite?",
                    MessageDialog.WARNING, new String[]
                        { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 1 ); // 'No' is the default
                if ( overwriteDialog.open() != Window.OK )
                {
                    if ( progressMonitor != null )
                    {
                        progressMonitor.setCanceled( true );
                        return;
View Full Code Here

                + this.client.getName()
                + " ��ģ����Ŀ "
                + plugin.getBundleDescription()
                    .getSymbolicName() + " �ľɰ汾���Ƿ������", 3,
            new String[] { "��", "��", "ȫ����", "ȫ����" }, 0);
        flag = dialog.open();
      }
    }
    switch (flag) {
    case 0:
      deleteHistoryVersion(plugin);
View Full Code Here

            if ( externalFile.exists() )
            {
                MessageDialog overwriteDialog = new MessageDialog( shell, "Overwrite", null, "Overwrite?",
                    MessageDialog.WARNING, new String[]
                        { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 1 ); // 'No' is the default
                if ( overwriteDialog.open() != Window.OK )
                {
                    if ( progressMonitor != null )
                    {
                        progressMonitor.setCanceled( true );
                        return;
View Full Code Here

                    String question = "The file '" + path
                        + "' already exists. Do you want to replace the existing file?";
                    MessageDialog overwriteDialog = new MessageDialog( shell, "Question", null, question,
                        MessageDialog.QUESTION, new String[]
                            { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 0 );
                    int overwrite = overwriteDialog.open();
                    switch ( overwrite )
                    {
                        case 0: // Yes
                            canOverwrite = true;
                            break;
View Full Code Here

            if ( currentPassword.verify( testPassword ) )
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verified sucessfully", MessageDialog.INFORMATION, new String[]
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
            else
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verification failed", MessageDialog.ERROR, new String[]
View Full Code Here

            else
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verification failed", MessageDialog.ERROR, new String[]
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
        }
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.