Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.MessageBox


            }
          } else {
            parentShell.getDisplay().asyncExec(new Runnable() {
              @Override
              public void run() {
                MessageBox messageBox = new MessageBox(parentShell);
                messageBox.setText(Messages.LogicImpl_RESULT_FAILURE_TITLE);
                messageBox.setMessage(errorMessage);
                messageBox.open();
              }
            });
          }
        }
      };
View Full Code Here


      addPersonsToList(allConnections, person.getParents());
      addPersonsToList(allConnections, person.getPartner());
    }
    saveMailAddressList(mailAddresses);
    if (mailPersons.size() == 0) {
      MessageBox mb = new MessageBox(GUI.instance.shell, SWT.ICON_INFORMATION | SWT.OK);
      mb.setMessage("Leider konnte keine Person mit eingetragener E-Mail-Adresse\r\nund einer Verbindung zu "
          + currentPerson.getValue(Person.NAME) + " gefunden werden.");
      mb.setText("Nicht gefunden");
      mb.open();
      return;
    }
    PersonListSort.sort(mailPersons);

    // Shell erzeugen und anzeigen.
View Full Code Here

        bFound = true;
        break;
      }
    }
    if (!bFound) {
      MessageBox mb = new MessageBox(GUI.instance.shell, SWT.ICON_INFORMATION | SWT.OK);
      mb.setMessage("Es wurde keine Person ohne Verbindung gefunden; alle eingetragenen\r\nPersonen geh�ren der gleichen Familie an.");
      mb.setText("Nicht gefunden");
      mb.open();
      return;
    }

    // Shell erzeugen und anzeigen.
    PersonChoiceShell pcs = new PersonChoiceShell(GUI.instance.shell, "Personen ohne Verbindung", "Anzeigen", null, 1,
View Full Code Here

  public void handleEvent(Event arg0) {
    try {
      Family.instance.writePersons(LastOpenedFamilyFile.getLastOpenedFamilyFile());
    }
    catch (IOException exception) {
      MessageBox mb = new MessageBox(GUI.instance.shell, SWT.YES | SWT.NO | SWT.ICON_ERROR);
      mb.setMessage("Beim Speichern hat es einen Fehler gegeben!\r\n" + exception.getMessage()
          + "\r\nSoll das Programm dennoch beendet werden?");
      mb.setText("Dateifehler");
      if (mb.open() == SWT.NO) {
        return;
      }
    }
    GUI.instance.shell.dispose();
  }
View Full Code Here

    fd.setText("Unter welchem Dateinamen soll die Familiendatei gespeichert werden?");
    String result = fd.open();
    if (result != null) {
      File f = new File(result);
      if (f.exists()) {
        MessageBox mb = new MessageBox(GUI.instance.shell, SWT.YES | SWT.NO | SWT.ICON_QUESTION);
        mb.setMessage("Die angegebene Datei existiert schon.\r\nSoll sie �berschrieben werden?");
        mb.setText("Datei existiert");
        int answer = mb.open();
        if (answer == SWT.YES) {
          save(result);
        }
      }
      else {
View Full Code Here

      Family.saveMergeData();
      LastOpenedFamilyFile.setLastOpenedFamilyFile(filename);
      GUI.instance.setShellTitle();
    }
    catch (IOException exception) {
      MessageBox mb = new MessageBox(GUI.instance.shell, SWT.OK | SWT.ICON_ERROR);
      mb.setMessage("Beim Speichern hat es einen Fehler gegeben!\r\n" + exception.getMessage());
      mb.setText("Dateifehler");
      mb.open();
    }
  }
View Full Code Here

        sendMailError = true;
      }
      if (sendMailError) {
        Display.getDefault().syncExec(new Runnable() {
          public void run() {
            MessageBox mb;
            mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR | SWT.APPLICATION_MODAL);
            mb.setText("Fehler!");
            mb.setMessage("Es gab Probleme beim Versenden der E-Mail!");
            mb.open();
          }
        });
      }
    }
View Full Code Here

      private int askBeforeMailing(final Person p2, final String pdfDate) {
        if (OptionData.instance.getBoolean(OptionData.AUTOMATIC_MAIL_WITHOUT_QUESTIONS)) {
          return SWT.YES;
        }

        MessageBox mb = new MessageBox(GUI.instance.shell, SWT.YES | SWT.NO | SWT.CANCEL);
        String msg = p2.getValueView(Person.NAME);
        if (pdfDate.length() == 8) {
          msg += " hat die letzte E-Mail mit dem Familienstammbaum am ";
          msg += pdfDate.substring(6, 8) + "." + pdfDate.substring(4, 6) + "." + pdfDate.substring(0, 4) + " erhalten.";
        }
        else {
          msg += " hat bislang augenscheinlich noch keinen Familienstammbaum per E-Mail erhalten.";
        }
        msg += "\r\nSoll der Stammbaum erneut versendet werden?";
        mb.setMessage(msg);
        mb.setText("Erneut Stammbaum per Mail versenden?");
        return mb.open();
      }
    });
  }
View Full Code Here

          }
          Statics.mergeFamily = mergeFamily;
        }
        // *** unknown ***
        else {
          MessageBox mb = new MessageBox(GUI.instance.shell, SWT.OK | SWT.ICON_ERROR);
          mb.setMessage("Dateityp unbekannt!");
          mb.setText("Fehler!");
          mb.open();
          return;
        }
      }
      else {
        // Der User hat die Dateiauswahl abgebrochen.
View Full Code Here

    in.close();
    ged.fillFamily(mergeFamily);
  }

  private void messageBoxFileProblems(Exception exception) {
    MessageBox mb = new MessageBox(GUI.instance.shell, SWT.OK | SWT.ICON_ERROR);
    mb.setMessage("Problem beim Laden der Datei!\r\n" + exception.getMessage());
    mb.setText("Fehler!");
    mb.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.