Package de.chris_soft.fyllgen.data

Examples of de.chris_soft.fyllgen.data.Relationship


      listAllPersonComposites.add(null);

      // Mal schauen, wie die Person zur letzt hinzugef�gten Person steht.

      if (lastPerson != null) {
        Relationship relship = lastPerson.getRelationship(person);
        if (relship instanceof RelationshipParentChild) {
          if (relship.partner1 == lastPerson) {
            index++;
          }
          else {
View Full Code Here


    Color colorLineCurrentPerson = OptionData.instance.getColor(OptionData.COLOR_LINE_CURRENT_PERSON);
    Color colorLineOtherPerson = OptionData.instance.getColor(OptionData.COLOR_LINE_OTHER_PERSON);

    // Bei einer Ehe und einem leiblichen Kind wird die Linie durchgezeichnet,
    // sonst gestrichelt.
    Relationship relship = pc1.person.getRelationship(pc2.person);
    boolean bFullLine = relship.getValue(Relationship.TYPE, "option").equals(RelationshipPartners.MARRIAGE);
    bFullLine |= relship.getValue(Relationship.TYPE, "option").equals(RelationshipParentChild.BIOLOGICAL);

    // Grenzen der beiden Composites holen, die miteinander verbunden werden
    // sollen.
    Rectangle rc1 = pc1.getBounds();
    Rectangle rc2 = pc2.getBounds();

    // Die aktuelle Person sowie die ihr direkt zugeordneten blau zeichnen, die
    // anderen normal schwarz.
    if (pc1.person == currentMainPerson || pc2.person == currentMainPerson) {
      gc.setForeground(colorLineCurrentPerson);
    }
    else {
      gc.setForeground(colorLineOtherPerson);
    }

    // Strichart setzen.
    if (bFullLine) {
      gc.setLineStyle(SWT.LINE_SOLID);
    }
    else {
      gc.setLineStyle(SWT.LINE_DASH);
    }

    // Beziehungslinienstil setzen.
    String sLineStyle = Integer.toString(SWT.LINE_SOLID);
    String relType = relship.getType();
    if (relship instanceof RelationshipPartners) {
      if (relType.equals(RelationshipPartners.MARRIAGE)) {
        sLineStyle = OptionData.instance.getComboKey(OptionData.LINE_TYPE_PARTNER_MARRIAGE);
      }
      else if (relType.equals(RelationshipPartners.ENGAGEMENT)) {
View Full Code Here

      new File("Short Connections").mkdir();
      PrintStream out = new PrintStream(new FileOutputStream("Short Connections/" + Statics.getUniqueID() + ".txt"));
      Person lastPerson = null;
      for (Person person : listFound) {
        if (lastPerson != null) {
          Relationship relship = lastPerson.getRelationship(person);
          if (relship instanceof RelationshipParentChild) {
            if (relship.partner1 == lastPerson) {
              out.println("...ist Elternteil von...");
            }
            else {
View Full Code Here

      }

      // Partner.
      else {
        currPerson = nextPerson;
        Relationship relship = person.getRelationship(currPerson);
        if (person.isFemale()) {
          if (relship.getType().equals(RelationshipPartners.MARRIAGE)) {
            s = "Gattin";
          }
          else {
            s = "Partnerin";
          }
        }
        else if (person.isMale()) {
          if (relship.getType().equals(RelationshipPartners.MARRIAGE)) {
            s = "Gatte";
          }
          else {
            s = "Partner";
          }
View Full Code Here

      List<Person> personList2 = Arrays.asList(personList);
      PersonListSort.sortByMarriageDate(personList2, currPerson);
      for (int i = 0; i < personList.length; i++) {
        Person p0 = personList2.get(i);
        personList[i] = p0;
        Relationship relship = currPerson.getRelationship(p0);
        String relType = relship.getType();
        String marriageDate = relship.getValue(RelationshipPartners.STARTDATE);
        String marriageEnd = relship.getValue(RelationshipPartners.ENDDATE);

        if (relType.equals(RelationshipPartners.MARRIAGE)) {
          String divorceExtraText = "";
          if (i < personList.length - 1) { // Nicht die letzte Person.
            Relationship relship2 = currPerson.getRelationship(personList2.get(i + 1));
            String marriageDate2 = relship2.getValue(RelationshipPartners.STARTDATE);
            long lP0DeathDate = Statics.getMinYYYYMMDDlong(p0.getValueView(Person.DEATHDAY));
            if (Statics.getMinYYYYMMDDlong(marriageDate2) > lP0DeathDate && lP0DeathDate > 9999) {
              divorceExtraText = ", verwittwet";
            }
          }
View Full Code Here

   * http://www.fileformat.info/info/unicode/char/26ad/index.htm<br>
   * http://de.wikipedia.org/wiki/Genealogische_Zeichen
   */
  private String getNameExtension(Person person1, Person person2) {
    String nameExt = "";
    Relationship relship = person1.getRelationship(person2);
    if (relship != null) {
      String type = relship.getValue(Relationship.TYPE, "option");
      if (type != null) {
        boolean isMarriage = type.equals(RelationshipPartners.MARRIAGE);
        if (isMarriage) {
          // Funktioniert leider nicht... :-(
          // nameExt = " (\u26AD)";
View Full Code Here

          Statics.mergeFamily.removeFinishedMergePersons(listRemovedPersons, p);
        }
      }

      // Zuerst schauen, ob eine Beziehung zu Verkn�pfen ist.
      Relationship rel = getNextFullRelationship();
      if (rel != null) {
        bNext = mergeFullRelationship(rel);
      }

      else {
View Full Code Here

    else if (mcrpd.finishedNew) {
      MergePersonDialog mpd = new MergePersonDialog(GUI.instance.shell, null, mcrpd.otherPerson);
      mpd.open();
      if (mpd.finished) {
        Person originalPerson = Family.instance.getPersonFromXREFID(mcrpd.mergedPerson.getValue(Person.XREFID));
        Relationship newRelship;
        if (rel instanceof RelationshipParentChild) {
          if (rel.partner1 == mcrpd.mergedPerson) {
            newRelship = new RelationshipParentChild(originalPerson, mpd.oldPerson, rel.cloneProperties());
          }
          else {
View Full Code Here

  /**
   * Noch zu verkn�pfende Beziehung suchen. Ist recht einfach: Es m�ssen nur
   * beide Personen schon verkn�pft sein.
   */
  private Relationship getNextFullRelationship() {
    Relationship relship;
    for (Person person : Statics.mergeFamily.getPersonsArray()) {
      // Eltern und Partner pr�fen (Kind wird indirekt durch Eltern mit
      // gepr�ft).
      Relationship[] relships = person.getRelationships(Relationship.PARENTS);
      if ((relship = getGoodRelationship(relships)) != null) {
View Full Code Here

  /**
   * Noch zu verkn�pfende Beziehung suchen. Hier braucht nur eine der beiden
   * Personen �bernommen sein.
   */
  private Relationship getNextHalfRelationship() {
    Relationship relship;
    for (Person person : Statics.mergeFamily.getPersonsArray()) {
      // Eltern und Partner pr�fen (Kind wird indirekt durch Eltern mit
      // gepr�ft).
      Relationship[] relships = person.getRelationships(Relationship.PARENTS);
      if ((relship = getHalfGoodRelationship(relships)) != null) {
View Full Code Here

TOP

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

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.