Package de.chris_soft.fyllgen.data

Examples of de.chris_soft.fyllgen.data.Person


   * @param exporter
   * @return Document number.
   * @throws IOException
   */
  public static long createExportedFilesEntry(List<Person> persons, DataExporter exporter) throws IOException {
    Person person0 = persons.get(0);
    String person0Mail = person0.getValue(Person.MAIL);

    SimpleDateFormat dayForm = new SimpleDateFormat("dd.");
    SimpleDateFormat timeForm = new SimpleDateFormat("HH.mm");
    String day = dayForm.format(new Date());
    String date = day + " " + Statics.currentMonth + " " + Statics.currentYear;
    String time = timeForm.format(new Date());

    String person0Name = person0.getValueView(Person.NAME);
    String rem0 = "Erzeugt f�r " + person0Name;
    if (person0Mail != null && person0Mail.trim().length() > 0) {
      rem0 += " [" + person0Mail.trim() + "]";
    }
    String rem1 = "Erzeugt am " + date + ", " + time;
View Full Code Here


   */
  public void paintControl(PaintEvent e) {
    if (e.widget == canvasImage) {
      ScrollBar vBar = canvasImage.getVerticalBar();
      int scrollY = vBar.getSelection();
      Person person = Family.instance.getCurrentPerson();
      if (person != null) {
        List<File> imList = person.getImageList();
        for (int i = 0; i < imList.size(); i++) {
          try {
            File imagePath1 = imList.get(i);
            FileInputStream in = new FileInputStream(imagePath1);
            Image image = new Image(SwtConsts.display, new ImageData(in));
View Full Code Here

  public void mouseDoubleClick(MouseEvent e) {
    if (e.widget == canvasImage) {
      int y = e.y + canvasImage.getVerticalBar().getSelection();
      int id = y / (128 + 5);
      int re = y % (128 + 5);
      Person person = Family.instance.getCurrentPerson();
      if (person != null) {
        List<File> images = person.getImageList();
        int imageCount = images.size() + 1;
        if (id < imageCount && re < 128) {
          String quest = "Soll dieses Bild wirklich gel�scht werden?";
          if (SwtUtilities.askYesNo(GUI.instance.shell, quest, "L�schanfrage")) {
            person.deleteImage(images.get(id));
            Family.instance.review();
          }
        }
      }
    }
View Full Code Here

        List<Person> list2check = andSelected ? list : Family.instance.getPersonsList();
        int listSize = list2check.size();

        // Alle zu pr�fenden Personen durchgehen.
        for (int j = 0; j < listSize; j++) {
          Person p2 = list2check.get(j);
          fillAddDelLists(listDels, listAdds, ad, checkbox, p2);
        }

        if (andSelected) {
          list.removeAll(listDels);
View Full Code Here

      oldPerson = rightPersonList.get(rightSelectionIndex);
      shell.dispose();
      return;
    }
    else if (e.widget == buttonNew) {
      Person person = Statics.mergeFamily.getPersonFromIndex(leftSelectionIndex);
      Person personClone = person.clone();
      person.setValue(Person.XREFID, personClone.getValue(Person.XREFID));
      Family.instance.addNewPerson(personClone);
      Family.instance.setCurrentPerson(personClone, 2);
      shell.dispose();
      return;
    }
View Full Code Here

      list.add(person);
    }
    PersonListSort.sort(list);

    // Links angew�hlte Person holen.
    Person choice = listLeftPersons.get(listLeft.getSelectionIndex());
    String choiceName = " " + choice.getValueView(Person.NAME) + " ";
    String lowerChoice = choiceName.toLowerCase();

    // TODO - Die �hnlichsten Personen rechts nach oben schieben.

    // Identische Namen nach oben.
    int listsize = list.size();
    for (int i = 0; i < listsize; i++) {
      Person person = list.get(i);
      boolean bUp = true;
      String fullname = person.getValueView(Person.NAME).toLowerCase();
      StringTokenizer strtok = new StringTokenizer(fullname);
      while (strtok.hasMoreTokens()) {
        String partname = strtok.nextToken();
        bUp &= lowerChoice.indexOf(" " + partname + " ") >= 0;
      }
      if (bUp) {
        list.add(0, list.remove(i));
      }
    }

    // Personen in rechte Liste eintragen.
    for (Person person : list) {
      listRight.add(person.toString());
    }
    rightPersonList = list;
  }
View Full Code Here

  /**
   * Erzeugt intern die Liste der anzuzeigenden Personen (mit Reihenfolge).
   */
  private void createPersonsList(Relationship relship) {
    // Erstmal schon ohnehin zugeordnete Personen in die Liste werfen.
    Person originalPerson = Family.instance.getPersonFromXREFID(mergedPerson.getValue(Person.XREFID));
    Relationship[] relships;
    if (relship instanceof RelationshipParentChild) {
      if (relship.partner1 == mergedPerson) {
        relships = originalPerson.getChildRelationships();
      }
      else {
        relships = originalPerson.getParentRelationships();
      }
    }
    else {
      relships = originalPerson.getPartnerRelationships();
    }
    for (Relationship relationship : relships) {
      Person nextPerson = relationship.getOtherPerson(originalPerson);
      addPersonToList(nextPerson);
    }

    // Dann alle Personen einf�gen, die eine Namensgleichheit besitzen.
    String lowName = otherPersonName.toLowerCase();
View Full Code Here

   * @param mergedPerson
   * @param relship
   * @return Text f�r das Label.
   */
  private String getLabel1Text(Person mergedPerson, Relationship relship) {
    Person realMergedPerson = Family.instance.getPersonFromXREFID(mergedPerson.getXREFID());
    String realMergedPersonSex = realMergedPerson.getValueView(Person.SEX);
    String realMergedPersonName = realMergedPerson.toString();
    otherPerson = relship.getOtherPerson(mergedPerson);
    String otherPersonSex = otherPerson.getValueView(Person.SEX);
    otherPersonName = otherPerson.toString();

    String s;
View Full Code Here

TOP

Related Classes of de.chris_soft.fyllgen.data.Person

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.