|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.concord.biologica.ui.PedigreeObject | +--org.concord.biologica.ui.PedigreeFamily
An object that manages the state for a family in the pedigree view.
Fields inherited from class org.concord.biologica.ui.PedigreeObject |
height, width, xLocation, yLocation |
Constructor Summary | |
PedigreeFamily(PedigreeOrganismView pedigreeOrganismView,
Family aFamily,
PedigreeOrganism aMotherPedigreeOrganism,
PedigreeOrganism aFatherPedigreeOrganism,
java.util.Vector aChildPedigreeOrganisms)
Creates a new pedigree family |
Method Summary | |
void |
addChildren(java.util.Vector newChildren,
PedigreeOrganismView aPedigreeOrganismView)
Add the given children to the family. |
boolean |
canSqueeze()
Can the family be squeezed any more? Enforces the maximum squeeze factor. |
boolean |
contains(PedigreeOrganism aPedigreeOrganism)
Does this family contain this pedigreeOrganism |
boolean |
containsOrganism(Organism anOrganism)
Does this family contain this Organism? |
PedigreeOrganism |
findPedigreeOrganism(Organism anOrganism)
Find the PedigreeOrganism given the Organism. |
PedigreeOrganism |
getBottomMostChild()
Get the bottommost child organism. |
java.util.Enumeration |
getChildPedigreeOrganisms()
Get an enumeration over the set of child pedigree organisms in this family |
Family |
getFamily()
Get the family for this PedigreeFamily. |
PedigreeOrganism |
getFatherPedigreeOrganism()
Get the father PedigreeOrganism |
PedigreeOrganism |
getLeftMostChild()
Get the leftmost child organism. |
int |
getLeftMostParentX()
Get the X location of the leftmost parent in this family. |
void |
getMinimumMaximum(java.awt.Point aMinPoint,
java.awt.Point aMaxPoint)
Get the minimum and maximum positions for children of this family. |
PedigreeOrganism |
getMotherPedigreeOrganism()
Get the mother PedigreeOrganism |
int |
getNumberOfChildren()
Get the number of children for this family. |
PedigreeOrganism |
getRightMostChild()
Get the rightmost child organism. |
int |
getRightMostParentX()
Get the X location of the rightmost parent in this family. |
int |
getSqueezeFactor()
Accessor for squeeze factor. |
PedigreeOrganism |
getTopMostChild()
Get the topmost child organism. |
boolean |
isEmpty()
Is this family empty? True if there are no children. |
void |
paint(java.awt.Graphics g,
PedigreeOrganismView aPedigreeOrganismView,
Trait trait,
int fontHeight,
SelectionSet selectionSet,
SelectionSet highlightSet)
Paint the Families and Organisms with the given Graphics object on the given PedigreeOrganismView. |
void |
paintConnections(java.awt.Graphics g,
PedigreeOrganismView aPedigreeOrganismView,
Trait trait,
int fontHeight,
SelectionSet selectionSet,
SelectionSet highlightSet)
Paint the connections with the given Graphics object on the given PedigreeOrganismView. |
boolean |
pickForSnip(int xPick,
int yPick)
Pick this object, determining if the given x,y location is on the object. |
java.awt.Dimension |
placeChildren()
Loop through the children and set their relative placement |
void |
placeConnections()
Place the connections. |
boolean |
removeChildPedigreeOrganism(PedigreeOrganism aChildPedigreeOrganism)
Remove a child pedigree organism, presumably because the child was deleted |
void |
removeChildren(PedigreeOrganismView aPedigreeOrganismView)
Remove the children of this family. |
void |
resetSqueezeFactor()
Accessor for resetting the squeeze factor. |
java.awt.Dimension |
squeeze()
Public interface for squeezing family and redoing the placement. |
void |
translate(int xDelta,
int yDelta)
Translate the family by the given amount. |
boolean |
within(int xTopLeft,
int yTopLeft,
int xBottomRight,
int yBottomRight)
Is this family within the given rectangle? We'll consider a family within the rectangle if the rectangle contains some portion of the child bar, parent bar or vertical bar. |
Methods inherited from class org.concord.biologica.ui.PedigreeObject |
getBottomMidPoint, getHeight, getTopLeftPoint, getTopMidPoint, getWidth, getXLocation, getYLocation, pick, setHeight, setWidth, setXLocation, setYLocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PedigreeFamily(PedigreeOrganismView pedigreeOrganismView, Family aFamily, PedigreeOrganism aMotherPedigreeOrganism, PedigreeOrganism aFatherPedigreeOrganism, java.util.Vector aChildPedigreeOrganisms)
pedigreeOrganismView
- PedigreeOrganismView - the viewaFamily
- Family - the family, may not be nullaMotherPedigreeOrganism
- PedigreeOrganism - mother pedigree organism, may not be nullaFatherPedigreeOrganism
- PedigreeOrganism - father pedigree organism, may not be nullaChildPedigreeOrganisms
- Vector - vector of child pedigree organisms, may not be nullMethod Detail |
public Family getFamily()
public PedigreeOrganism getMotherPedigreeOrganism()
public PedigreeOrganism getFatherPedigreeOrganism()
public int getLeftMostParentX()
getLeftMostParentX
in class PedigreeObject
public int getRightMostParentX()
getRightMostParentX
in class PedigreeObject
public PedigreeOrganism getLeftMostChild()
public PedigreeOrganism getRightMostChild()
public PedigreeOrganism getTopMostChild()
public PedigreeOrganism getBottomMostChild()
public void getMinimumMaximum(java.awt.Point aMinPoint, java.awt.Point aMaxPoint)
getMinimumMaximum
in class PedigreeObject
Point
- - minimum point. Point is set by this method.Point
- - maximum point. Point is set by this method.public java.util.Enumeration getChildPedigreeOrganisms()
public int getNumberOfChildren()
public boolean isEmpty()
public boolean contains(PedigreeOrganism aPedigreeOrganism)
aPedigreeOrganism
- PedigreeOrganism - the pedigree organism to findpublic boolean containsOrganism(Organism anOrganism)
anOrganism
- Organism - the organism to findpublic PedigreeOrganism findPedigreeOrganism(Organism anOrganism)
anOrganism
- Organism - the organism to findpublic void addChildren(java.util.Vector newChildren, PedigreeOrganismView aPedigreeOrganismView)
Current inconsistency: Didn't see the value in creating all the child pedigree organisms in the View, but I guess it's so to be able to add the listener and get the size info. Should move this logic back to the view, I guess.
newChildren
- Vector - the children to add to the family.aPedigreeOrganismView
- aPedigreeOrganismView - the viewpublic void removeChildren(PedigreeOrganismView aPedigreeOrganismView)
Current inconsistency: same as for add. This could be in the view.
aPedigreeOrganismView
- PedigreeOrganismView - the viewpublic boolean removeChildPedigreeOrganism(PedigreeOrganism aChildPedigreeOrganism)
aChildPedigreeOrganism
- PedigreeOrganism - the pedigree organism to removepublic void translate(int xDelta, int yDelta)
translate
in class PedigreeObject
xDelta
- int - x deltayDelta
- int - y deltapublic int getSqueezeFactor()
public void resetSqueezeFactor()
resetSqueezeFactor
in class PedigreeObject
public boolean canSqueeze()
canSqueeze
in class PedigreeObject
public java.awt.Dimension squeeze()
squeeze
in class PedigreeObject
public java.awt.Dimension placeChildren()
placeChildren
in class PedigreeObject
public void placeConnections()
placeConnections
in class PedigreeObject
public void paint(java.awt.Graphics g, PedigreeOrganismView aPedigreeOrganismView, Trait trait, int fontHeight, SelectionSet selectionSet, SelectionSet highlightSet)
The caller of this method must set the foreground and background colors of the Graphics object before calling this method.
paint
in class PedigreeObject
g
- Graphics - graphics object to use in paintingpedigreeOrganismView
- PedigreeOrganismView - the pedigree organism viewtrait
- Trait - the trait to show, may be nullfontHeight
- int - the font heightselectionSet
- SelectionSet - the view's selection sethighlightSet
- SelectionSet - the view's highlight setpublic void paintConnections(java.awt.Graphics g, PedigreeOrganismView aPedigreeOrganismView, Trait trait, int fontHeight, SelectionSet selectionSet, SelectionSet highlightSet)
Other positions - the ends of the bars and the locations of the lines drawn from the child and parents bars to the children and parents respectively are derived from the positions of the parents and children.
The caller of this method must set the foreground and background colors of the Graphics object before calling this method.
paintConnections
in class PedigreeObject
g
- Graphics - graphics object to use in paintingpedigreeOrganismView
- PedigreeOrganismView - the pedigree organism viewtrait
- Trait - the trait to show, may be nullfontHeight
- int - the font heightselectionSet
- SelectionSet - the view's selection sethighlightSet
- SelectionSet - the view's highlight setpublic boolean pickForSnip(int xPick, int yPick)
xPick
- int - x location of pickyPick
- int - y location of pickpublic boolean within(int xTopLeft, int yTopLeft, int xBottomRight, int yBottomRight)
within
in class PedigreeObject
xTopLeft
- int - x top left coordinateyTopLeft
- int - y top left coordinatexBottomRight
- int - x bottom right coordinateyBottomRight
- int - y bottom right coordinate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |