Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.MessageBox


   */
  @Override
  public void doRun() {

    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


    public void addWindowListener(WindowListener l) { this.listeners.add(l); }

    protected void alert(String title, String msg) {
        if(state == STATE.OPENING) IndeterminateLoadingSplash.closeSplash();
        MessageBox box;
        try {
            box = new MessageBox(getShell(), SWT.OK);
        } 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());
    }
View Full Code Here

    box.open();
        if(state == STATE.OPENING) IndeterminateLoadingSplash.openSplash(getDisplay());
    }
    protected boolean confirm(String title, String msg) {
        if(state == STATE.OPENING) IndeterminateLoadingSplash.closeSplash();
        MessageBox box;
        try {
            box = new MessageBox(getShell(), SWT.OK|SWT.CANCEL);
        } 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);
    }
View Full Code Here

    private static URI backgroundImage;

    public IndeterminateLoadingSplash2() {
        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 TextRulerView() {
    super();
  }

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

    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);
    int result = alert.open();
    return result == SWT.OK; // THIS DOES NOT WORK IN OS X !!??
  }
View Full Code Here

  /**
   * Open the alert dialog.
   * @param message message
   */
  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();
  }
View Full Code Here

        return shell;
    }

    private static int showBox(String title, String message, int icon)
    {
        MessageBox messageBox = new MessageBox(getShell(), icon);
        messageBox.setMessage(message);
        messageBox.setText(title);

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

        winner = Constants.BOTHWIN;
      } else {
        winner = Storage.getInstance().getEnemyName();
      }

      MessageBox winnerMessage = new MessageBox(Display.getCurrent()
          .getActiveShell(), SWT.OK | SWT.APPLICATION_MODAL
          | SWT.ICON_INFORMATION);

      winnerMessage.setText(Constants.WINNERTITLE);
      if (winner.equals(Constants.BOTHWIN)) {
        winnerMessage.setMessage(Constants.BOTHWIN);
      } else {
        winnerMessage.setMessage(Constants.WINNERIS + winner);
      }
      winnerMessage.open();

    }
  }
View Full Code Here

public class InfoBoxListener extends SelectionAdapter {

  @Override
  public void widgetSelected(SelectionEvent arg0) {

    MessageBox infoBox = new MessageBox(Display.getCurrent()
        .getActiveShell(), SWT.OK | SWT.APPLICATION_MODAL
        | SWT.ICON_INFORMATION);

    infoBox.setText(Constants.INFORMATION);
    infoBox.setMessage(Constants.DEVELOPER);

    infoBox.open();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.MessageBox

Copyright © 2018 www.massapicom. 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.