public class Marriage
extends java.lang.Object
Family
class was added as an extension
to this class. SILKin code normally uses Family instances, but uses the methods
that Family inherits from this class. Original KAES code, of course, directly
accesses Marriage objects.Modifier and Type | Class and Description |
---|---|
static class |
Marriage.BirthGroup
A BirthGroup contains all children from a single birth event;
(a single child, both twins, all 3 triplets).
|
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<Marriage.BirthGroup> |
birthGrps
This list holds all the
Marriage.BirthGroup objects in this family. |
java.util.ArrayList<java.lang.Object> |
children
children is an ArrayList |
java.lang.String |
dataAuthor
dataChangeDate is the last date that any field was changed for this person. |
java.lang.String |
dataChangeDate
dataChangeDate is the last date that any field was changed for this person. |
static int |
doLabel |
Individual |
husband |
static int |
INITIALS |
static java.util.ArrayList<Family> |
knots
An ArrayList of all Marriage instances ever created.
|
int |
lsize |
static int |
NAME |
static int |
NOLABEL |
static java.lang.String |
refYear |
static int |
size |
static int |
TERMS |
Individual |
wife |
Constructor and Description |
---|
Marriage() |
Modifier and Type | Method and Description |
---|---|
void |
addSib(Person p)
Add this person as a child in this marriage.
|
void |
addSpouse(Person p)
Add this person to the spouses list.
|
java.awt.Rectangle |
bounds() |
void |
delMarriage() |
void |
delSib(Person p)
Delete this person as a child in this marriage.
|
void |
delSpouse(Person p)
Remove this person from the spouse list.
|
void |
deltaMove(int dx,
int dy)
Change the location of this Union symbol, its parents, and its children
by dx and dy.
|
boolean |
divorced() |
void |
drawLines(java.awt.Graphics g,
java.awt.Rectangle myRect)
If the marriage symbol OR the symbol for a spouse or child
is within myRect, then draw the lines.
|
void |
drawSibLines(java.awt.Graphics g,
java.awt.Rectangle myRect,
boolean doIt) |
void |
drawSpouseLines(java.awt.Graphics g,
java.awt.Rectangle myRect,
boolean doIt) |
void |
drawSymbol(java.awt.Graphics g,
java.awt.Rectangle pbounds)
Call the symbol for this Union to draw itself.
|
void |
drawSymbol(java.awt.Graphics g,
java.awt.Rectangle pbounds,
java.awt.Color c)
Set up the call to drawSymbol.
|
java.lang.String |
eligibleSpouse(Person p)
Added for SILKin: enforces rule that a marriage must have at most 1
husband and 1 wife.
|
java.awt.Point |
getLocation() |
int |
getLocationX() |
int |
getLocationY() |
LinkedList |
getSibset() |
int |
getSize() |
LinkedList |
getSpouses() |
boolean |
hasBegun() |
boolean |
hasEnded() |
boolean |
isSib(Person p)
Is this person already a child in this family?
|
boolean |
isSpouse(Individual p) |
boolean |
isSpouse(Person p)
Is this person a spouse in this marriage?
|
void |
lineageDeltaMove(int dx,
int dy,
java.util.ArrayList<Individual> people,
java.util.ArrayList<Link> lynx)
Shift the symbols for every person in the family, and all their descendants,
by dx and dy.
|
static boolean |
readXML(XFile sFile) |
void |
setLocation(int x,
int y) |
void |
setLocation(java.awt.Point p) |
void |
setLocationX(int x)
Change the X-coordinate to x.
|
void |
setLocationY(int y)
Change the Y-coordinate to y.
|
void |
setSibset(LinkedList s) |
void |
setSize(int x) |
void |
setSpouses(LinkedList s) |
static void |
unionsToXML(PrintFormat pf) |
void |
unionToXML(PrintFormat pf) |
public static int size
public int lsize
public static java.lang.String refYear
public static java.util.ArrayList<Family> knots
public static final int NOLABEL
public static final int INITIALS
public static final int NAME
public static final int TERMS
public static int doLabel
public Individual husband
public Individual wife
public java.util.ArrayList<Marriage.BirthGroup> birthGrps
Marriage.BirthGroup
objects in this family.public java.util.ArrayList<java.lang.Object> children
children
is an ArrayListpublic java.lang.String dataChangeDate
dataChangeDate
is the last date that any field was changed for this person.public java.lang.String dataAuthor
dataChangeDate
is the last date that any field was changed for this person.public java.awt.Point getLocation()
public int getLocationX()
public int getLocationY()
public void setLocation(java.awt.Point p)
public void setLocation(int x, int y)
public void setLocationX(int x)
x
- the new X-coordinatepublic void setLocationY(int y)
y
- the new Y-coordinatepublic LinkedList getSpouses()
public void setSpouses(LinkedList s)
public boolean isSpouse(Individual p)
public boolean isSpouse(Person p)
p
- the person of interestpublic void addSpouse(Person p)
p
- person to be addedpublic void delSpouse(Person p)
p
- person to be deletedpublic java.lang.String eligibleSpouse(Person p)
p
- a person proposed to be added to this marriage.public boolean isSib(Person p)
p
- the person who may be a child in this familypublic void addSib(Person p)
p
- person to be addedpublic void delSib(Person p)
p
- person to be deletedpublic void delMarriage()
public void deltaMove(int dx, int dy)
Link
, change only the location of the link symbol; do not change the
location of the Person symbol pointed to by the link.dx
- the amount of change (in pixels) to the X-coordinatedy
- the amount of change (in pixels) to the Y-coordinatepublic void lineageDeltaMove(int dx, int dy, java.util.ArrayList<Individual> people, java.util.ArrayList<Link> lynx)
dx
- horizontal shift for all symbolsdy
- vertical shift for all symbolspeople
- ArrayList to be filled with all people who get movedlynx
- ArrayList to be filled with all links that get movedpublic LinkedList getSibset()
public void setSibset(LinkedList s)
public void drawSpouseLines(java.awt.Graphics g, java.awt.Rectangle myRect, boolean doIt)
public void drawSibLines(java.awt.Graphics g, java.awt.Rectangle myRect, boolean doIt)
public void drawLines(java.awt.Graphics g, java.awt.Rectangle myRect)
g
- the graphics object on which to drawmyRect
- the rectangle within which we are drawing on gpublic int getSize()
public void setSize(int x)
public java.awt.Rectangle bounds()
public void drawSymbol(java.awt.Graphics g, java.awt.Rectangle pbounds, java.awt.Color c)
g
- the graphics object on which to drawpbounds
- the boundaries within which to drawc
- the drawing colorpublic boolean hasBegun()
public boolean hasEnded()
public boolean divorced()
public void drawSymbol(java.awt.Graphics g, java.awt.Rectangle pbounds)
g
- the graphics object on which to drawpbounds
- the boundaries within which to drawpublic void unionToXML(PrintFormat pf)
public static void unionsToXML(PrintFormat pf)
public static boolean readXML(XFile sFile)