public class Person
extends java.lang.Object
Individual
class was added as an extension
to this class. SILKin code normally uses Individual instances, but uses the methods
that Individual inherits from this class. Original KAES code, of course, directly
accesses Person objects.Modifier and Type | Field and Description |
---|---|
boolean |
drawn |
static int |
FIRST |
static java.util.ArrayList<Individual> |
folks
An ArrayList of all the Person instances ever made.
|
static int |
id_no |
static int |
INITIALS |
static int |
KINTERMADR |
static int |
kinTermLabel |
static int |
KINTERMREF |
static int |
LAST |
static int |
LETTERADR |
static int |
LETTERREF |
java.awt.Point |
location |
static int |
maxx |
static int |
maxy |
static int |
minx |
static int |
miny |
static int |
nameLabel |
static int |
NOKINTERM |
static int |
NOLABEL |
static java.lang.String |
refYear |
boolean |
selected |
static int |
size |
static int |
WHOLE |
Modifier and Type | Method and Description |
---|---|
void |
addMarriage(Family f) |
void |
addMarriage(Marriage p) |
java.awt.Rectangle |
bounds() |
void |
delMarriage(Marriage p) |
void |
delPerson() |
void |
drawLabel(java.awt.Graphics g,
java.awt.Rectangle theBounds)
This is the method that writes a Person's name (or initials, or nothing)
and kin term (or a letter, or nothing) beneath their symbol.
|
void |
drawSymbol(java.awt.Graphics g,
java.awt.Rectangle pbounds)
Call the symbol for this Person's sex to draw itself.
|
void |
drawSymbol(java.awt.Graphics g,
java.awt.Rectangle pbounds,
java.awt.Color c)
Set up the call to drawSymbol.
|
static int |
findPerson(int x,
int y) |
java.awt.Point |
getLocation() |
int |
getLocationX() |
int |
getLocationY() |
LinkedList |
getMarriages() |
Family |
getParents() |
int |
getSize() |
boolean |
hasEnded()
Modified this method for SILKin, since refYear is
not used.
|
void |
marryTo(Person p) |
static void |
personsToXML(PrintFormat pf) |
void |
personToXML(PrintFormat pf) |
static Individual |
readXML(XFile sFile) |
void |
setLocation(int x,
int y)
Change the location of this Person to a new point (x,y).
|
void |
setLocation(java.awt.Point p)
Change the location of this Person to a new point.
|
void |
setLocationX(int x) |
void |
setLocationY(int y) |
void |
setMarriages(LinkedList m) |
void |
setParents(Marriage p) |
void |
setSize(int x) |
public static int id_no
public static int size
public static java.lang.String refYear
public static java.util.ArrayList<Individual> folks
public static int maxx
public static int maxy
public static int minx
public static int miny
public boolean drawn
public java.awt.Point location
public boolean selected
public static final int NOLABEL
public static final int INITIALS
public static final int FIRST
public static final int LAST
public static final int WHOLE
public static final int NOKINTERM
public static final int KINTERMREF
public static final int KINTERMADR
public static final int LETTERREF
public static final int LETTERADR
public static int nameLabel
public static int kinTermLabel
public java.awt.Point getLocation()
public int getLocationX()
public int getLocationY()
public void setLocation(java.awt.Point p)
p
- the Point whose X and Y are the new coordinates.public void setLocation(int x, int y)
x
- the new X.y
- the new Y.public void setLocationX(int x)
public void setLocationY(int y)
public LinkedList getMarriages()
public void setMarriages(LinkedList m)
public void addMarriage(Family f)
public void addMarriage(Marriage p)
public void delMarriage(Marriage p)
public void setParents(Marriage p)
public Family getParents()
public void delPerson()
public void marryTo(Person p)
public 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 drawpublic boolean hasEnded()
if (!deathYY.equals("") && !refYear.equals(""))
return(deathYY.compareTo(refYear) <= 0);
else return false;
public void drawLabel(java.awt.Graphics g, java.awt.Rectangle theBounds)
g
- the Graphics object on which to drawtheBounds
- the boundaries within which to drawpublic 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 personToXML(PrintFormat pf)
public static void personsToXML(PrintFormat pf)
public static Individual readXML(XFile sFile)
public static int findPerson(int x, int y)