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.


Fields inherited from class org.concord.biologica.ui.PedigreeObject
height, width, xLocation, yLocation
 
Constructor Summary
PedigreeOrganism(Organism anOrganism, int anXLocation, int aYLocation, int aWidth, int aHeight)
          Creates a new pedigree organism.
 
Method Summary
 Organism getOrganism()
          Get the organism for this PedigreeOrganism.
 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.
 
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
 

Constructor Detail

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 null
anXLocation - int - x location of organism in pedigree view
aYLocation - int - y location of organism in pedigree view
aWidth - int - width of organism cell
aHeight - int - height of organism cell
Method Detail

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 painting
pedigreeOrganismView - PedigreeOrganismView - the pedigree organism view
trait - Trait - the trait to show, may be null
fontHeight - int - the font height
selectionSet - SelectionSet - the view's selection set
highlightSet - SelectionSet - the view's highlight set