org.concord.biologica.ui
Class PedigreeOrganism
java.lang.Object
|
+--org.concord.biologica.ui.PedigreeObject
|
+--org.concord.biologica.ui.PedigreeOrganism
- public final class PedigreeOrganism
- extends PedigreeObject
An object that manages the state for an organism in the pedigree view.
Constructor Summary |
PedigreeOrganism(Organism anOrganism,
int anXLocation,
int aYLocation,
int aWidth,
int aHeight)
Creates a new pedigree organism. |
Methods inherited from class org.concord.biologica.ui.PedigreeObject |
canSqueeze, getBottomMidPoint, getHeight, getLeftMostParentX, getMinimumMaximum, getRightMostParentX, getTopLeftPoint, getTopMidPoint, getWidth, getXLocation, getYLocation, paintConnections, pick, placeChildren, placeConnections, resetSqueezeFactor, setHeight, setWidth, setXLocation, setYLocation, squeeze, translate, within |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PedigreeOrganism
public PedigreeOrganism(Organism anOrganism,
int anXLocation,
int aYLocation,
int aWidth,
int aHeight)
- Creates a new pedigree organism.
Note: X and Y locations are now ignored. Placement is done via new
PedigreeLevel class. This interface should be changed.
- Parameters:
anOrganism
- Organism - the organism, may be nullanXLocation
- int - x location of organism in pedigree viewaYLocation
- int - y location of organism in pedigree viewaWidth
- int - width of organism cellaHeight
- int - height of organism cell
getOrganism
public Organism getOrganism()
- Get the organism for this PedigreeOrganism.
- Returns:
- Organism - the organism
paint
public void paint(java.awt.Graphics g,
PedigreeOrganismView aPedigreeOrganismView,
Trait trait,
int fontHeight,
SelectionSet selectionSet,
SelectionSet highlightSet)
- Paint the object with the given Graphics object on the
given PedigreeOrganismView.
The vertical positions of the 2 bars (yChildBar and yParentBar) and the horizontal
position of the vertical bar (xVerticalBar) are given values and may only be modified
by the user by clicking and dragging those bars with the mouse.
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.
- Overrides:
paint
in class PedigreeObject
- Parameters:
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 set