Examples of MessageBox


Examples of org.eclipse.swt.widgets.MessageBox

     */
    public static boolean showDecidableQuestion(final Shell s, final String question,
            final String title) {
        boolean b;
        try {
            final MessageBox mb = new MessageBox(s, SWT.ICON_WARNING | SWT.YES | SWT.NO);
            mb.setMessage(question);
            mb.setText(title);
            final int response = mb.open();
            if (response == SWT.YES) {
                b = true;
            } else {
                b = false;
            }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

       * @see org.eclipse.swt.events.ShellAdapter#shellClosed(org.eclipse.swt.events.ShellEvent)
       */
      @Override
      public void shellClosed(ShellEvent e) {
        int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO;
        MessageBox messageBox = new MessageBox(getShell(), style);
        messageBox.setText("Leave table");
        messageBox.setMessage("Are you sure you want to leave this table?");
        e.doit = messageBox.open() == SWT.YES;
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

              aboutMenuItem.setText("About");
              aboutMenuItem.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent evt) {
                  MessageBox aboutInfo = new MessageBox(getShell());
                  aboutInfo.setMessage("CSPoker SWT Client 0.1");
                  aboutInfo.setText("About");
                  aboutInfo.open();
                }
              });
            }
            helpMenuItem.setMenu(helpMenu);
          }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

       * @see org.eclipse.swt.events.ShellAdapter#shellClosed(org.eclipse.swt.events.ShellEvent)
       */
      @Override
      public void shellClosed(ShellEvent e) {
        int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO;
        MessageBox messageBox = new MessageBox(getShell(), style);
        messageBox.setText("Close Window");
        messageBox.setMessage("Are you sure you want to exit?");
        e.doit = messageBox.open() == SWT.YES;
        // Lobby has been closed
        // Dispose of the display entirely so all GameWindows are closed
        // as well
        if (e.doit){
          exit();
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

   *            info)
   * @return {@link MessageBox#open()}
   */
  public static int displayMessage(String title, String message, int style) {
    logger.info(message);
    MessageBox infoBox = new MessageBox(new Shell(Display.getCurrent()), style | SWT.OK);
    infoBox.setText(title);
    infoBox.setMessage(message);
    return infoBox.open();
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

        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

Examples of org.focusns.model.msg.MessageBox

    @Autowired
    private MessageBoxService messageBoxService;

    @Test
    public void testCreateMessageBox() {
        MessageBox messageBox = new MessageBox();
        messageBox.setLabel("收件箱");
        messageBox.setType(MessageBox.TYPE_IN);
        messageBox.setProjectId(1);
        messageBox.setCreateAt(new Date());
        messageBox.setCreateById(1);
        messageBoxService.createMessageBox(messageBox);
    }
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.