Examples of MessageBox


Examples of org.eclipse.swt.widgets.MessageBox

      try {
        File file = new File(string);

        /* Ask for Confirmation if file exists */
        if (file.exists()) {
          MessageBox box = new MessageBox(fShell, SWT.ICON_WARNING | SWT.YES | SWT.NO);
          box.setMessage("The folder already contains a file named '" + file.getName() + "'.\n\nReplace the existing file?");
          box.setText("Confirm Replace");
          if (box.open() != SWT.YES)
            return;
        }

        /* Proceed Exporting */
        Long selectedRootFolderID = DynamicDAO.getDAO(IPreferenceDAO.class).load(BookMarkExplorer.PREF_SELECTED_BOOKMARK_SET).getLong();
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

      try {
        File file = new File(string);

        /* Ask for Confirmation if file exists */
        if (file.exists()) {
          MessageBox box = new MessageBox(fShell, SWT.ICON_WARNING | SWT.YES | SWT.NO);
          box.setMessage("The folder already contains a file named '" + file.getName() + "'.\n\nReplace the existing file?");
          box.setText("Confirm Replace");
          if (box.open() != SWT.YES)
            return;
        }

        /* Proceed Exporting */
        Set<IFolder> rootFolders = Controller.getDefault().getCacheService().getRootFolders();
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

    if (window == null)
      return;

    JobRunner.runInUIThread(window.getShell(), new Runnable() {
      public void run() {
        MessageBox box = new MessageBox(window.getShell(), SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
        box.setText(Messages.BrowserUtils_ERROR_LAUNCH_BROWSER);
        box.setMessage(Messages.BrowserUtils_ERROR_LAUNCH_BROWSER_MSG);

        if (box.open() == SWT.OK)
          PreferencesUtil.createPreferenceDialogOn(window.getShell(), BrowserPreferencePage.ID, null, null).open();
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

    fEclipsePreferences = Owl.getPreferenceService().getEclipseScope();
    fDisableXulrunner= System.getProperty(DISABLE_XULRUNNER) != null;
    try {
      fBrowser = createBrowser(parent, style);
    } catch (SWTError e) {
      MessageBox box = new MessageBox(parent.getShell(), SWT.ICON_ERROR | SWT.OK | SWT.CANCEL);
      box.setText(Messages.CBrowser_ERROR_CREATE_BROWSER);
      box.setMessage(Messages.CBrowser_ERROR_CREATE_BROWSER_MSG);
      if (box.open() == SWT.OK)
        BrowserUtils.openLinkExternal("http://www.rssowl.org/help"); //$NON-NLS-1$

      throw e;
    }
    fLinkHandler = new HashMap<String, ILinkHandler>();
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

              boolean doit = true;
              IWorkbenchPage page = OwlUI.getPage();
              if (page != null) {
                IEditorReference[] editorReferences = page.getEditorReferences();
                if (editorReferences.length > 1) {
                  MessageBox confirmDialog = new MessageBox(page.getWorkbenchWindow().getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
                  confirmDialog.setText(Messages.ApplicationActionBarAdvisor_DISABLE_TABBED_BROWSING);
                  confirmDialog.setMessage(NLS.bind(Messages.ApplicationActionBarAdvisor_TABS_MESSAGE, editorReferences.length));
                  if (confirmDialog.open() == SWT.YES)
                    OwlUI.closeOtherEditors();
                  else
                    doit = false;
                }
              }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

        } else if (dialogType == ERROR) {
          type = SWT.ICON_ERROR;
        } else if (dialogType == WARNING) {
          type = SWT.ICON_WARNING;
        }
        MessageBox messageBox = new MessageBox(shell, type | SWT.OK | (cancelText != null ? SWT.CANCEL : 0));
        messageBox.setText(title);
        messageBox.setMessage(message);
        int buttonID = messageBox.open();
        switch (buttonID) {
          case SWT.OK:
            l.add(Boolean.TRUE);
          default:
            l.add(Boolean.FALSE);
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

  public static int message(String message, int style) {
    Shell s_ = shell;
    if(s_ == null)
      s_ = new Shell();
     
    MessageBox mb = new MessageBox(s_, style);
    mb.setMessage(message);

    String title = "Message";
    if ((style & SWT.ICON_ERROR) != 0)
      title = "Error";
    else if ((style & SWT.ICON_INFORMATION) != 0)
      title = "Information";
    else if ((style & SWT.ICON_QUESTION) != 0)
      title = "Question";
    else if ((style & SWT.ICON_WARNING) != 0)
      title = "Warning";
    mb.setText(title);

    return mb.open();
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

   
  }


  public int message(String message, int style) {
    MessageBox mb = new MessageBox(_tree.getShell(), style);
    mb.setMessage(message);
    return mb.open();
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

    return message(getSShell(), message, style);   
  }


  public static int message(Shell shell, String message, int style) {
    MessageBox mb = new MessageBox(shell, style);
    mb.setMessage(message);

    String title = "Message";
    if ((style & SWT.ICON_ERROR) != 0)
      title = "Error";
    else if ((style & SWT.ICON_INFORMATION) != 0)
      title = "Information";
    else if ((style & SWT.ICON_QUESTION) != 0)
      title = "Question";
    else if ((style & SWT.ICON_WARNING) != 0)
      title = "Warning";
    mb.setText(title);

    return mb.open();
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

    createMenu();
  }


  public int message(String message, int style) {
    MessageBox mb = new MessageBox(_combo.getShell(), style);
    mb.setMessage(message);
    return mb.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.