Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.MessageBox.open()


          MessageBox messageBox = new MessageBox(PlatformUI
              .getWorkbench().getActiveWorkbenchWindow()
              .getShell(), SWT.ICON_ERROR);
          String message = "Can't open LinkWizard. No config for link rules found!";
          messageBox.setMessage(message);
          messageBox.open();
          return;
        }

        if (!linkedText.getCPListProvider().getExecuted())
          linkedText.getCPListProvider().run();
View Full Code Here


    if(factorTable.getType() != CategoryType.PRODUCT){
      MessageBox messageBox = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.ICON_ERROR);
      String message = "Table Type must be \"Product\"!";
      messageBox.setMessage(message);
      messageBox.open();
    }else{
      new SetFactorTableProductFactorsFromURNCommand(factorTable).runAsJob();
    }
    return null;
  }
View Full Code Here

          displayedMessage+= "[...]";
          break;
        }
      }
      messageBox.setMessage(displayedMessage);
      messageBox.open();
      }
    }
 
  /**
   *  displays the collected error messages
View Full Code Here

    if (factorTable.getType() != CategoryType.PRODUCT) {
      MessageBox messageBox = new MessageBox(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell());
      String message = "Table Type must be \"Product\"!";
      messageBox.setMessage(message);
      messageBox.open();
      return;
    } else {

      getGoals(factorTable, project);
View Full Code Here

        } catch (SWTException swte) {
            box = new MessageBox(new Shell(), SWT.OK);
        }
    box.setText(title);
    box.setMessage(msg);
    box.open();
        if(state == STATE.OPENING) IndeterminateLoadingSplash.openSplash(getDisplay());
    }
    protected boolean confirm(String title, String msg) {
        if(state == STATE.OPENING) IndeterminateLoadingSplash.closeSplash();
        MessageBox box;
View Full Code Here

        } catch (SWTException swte) {
            box = new MessageBox(new Shell(), SWT.OK|SWT.CANCEL);
        }
    box.setText(title);
    box.setMessage(msg);
        int ret = box.open();
        if(state == STATE.OPENING) IndeterminateLoadingSplash.openSplash(getDisplay());
        return (ret == SWT.OK);
    }
    protected String prompt(String title, String msg) {
        Prompt.PromptListener promptListener = new Prompt.PromptListener();
View Full Code Here

        addListener(new Listener() {
            @Override public void handleError(LoadingTask task) {
                MessageBox alert = new MessageBox(new Shell(), SWT.ERROR);
                alert.setMessage("Unable to execute loading tasks...");
                alert.setText(task.getError().getMessage()+"\n\n"+task.getError());
                alert.open();
            }
            @Override public void handleSuccess() {
                splash.getDisplay().syncExec(new Runnable() {
                    public void run() {
                        splash.close();
View Full Code Here

  }

  public void errorAlert(String message) {
    MessageBox alert = new MessageBox(getSite().getShell(), SWT.OK | SWT.ICON_ERROR);
    alert.setMessage(message);
    alert.open();
  }

  public boolean yesNoAlert(String message) {
    MessageBox alert = new MessageBox(getSite().getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
    alert.setMessage(message);
View Full Code Here

  }

  public boolean yesNoAlert(String message) {
    MessageBox alert = new MessageBox(getSite().getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
    alert.setMessage(message);
    int result = alert.open();
    return result == SWT.OK; // THIS DOES NOT WORK IN OS X !!??
  }

  public void onStartStopPressed() {
    if (TextRulerController.isRunning()) {
View Full Code Here

   */
  public static void openAlertDialog(String message){
    MessageBox box = new MessageBox(Display.getCurrent().getActiveShell(),SWT.NULL|SWT.ICON_ERROR);
    box.setMessage(message);
    box.setText(getResourceString("ErrorDialog.Caption"));
    box.open();
  }
 
  /**
   * Generates a message from a template and parameters.
   * Replace template {0}{1}.. with parameters�B
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.