|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.objex.panywhere.Allele
public class Allele
Defines an Allele object as it relates to the Markers on a chromosome. An allele can be inherited from the mother or from the father. If a full set of Alleles on a marker is inherited from one parent then it is a Haplotype. The Allele class defines all the properties and methods that an Allele may have including how it can be rendered on a Pedigree canvas based on the its properties.
| Field Summary | |
|---|---|
static java.lang.String |
MATERNAL
Represents Allele inherited from the Mother |
static java.lang.String |
PATERNAL
Represents Allele inherited from the Father |
| Constructor Summary | |
|---|---|
Allele()
Creates a new Instance of an Allele class |
|
| Method Summary | |
|---|---|
protected double |
calcAlleleTextWidth(java.awt.Graphics2D g2d,
DrawingContext dc)
|
Allele |
cloneAllele()
Creates and returns a new Allele with the same properties as this Allele. |
protected void |
draw(java.awt.Graphics2D g2d,
double xc,
double yc,
boolean onFirstMarker,
boolean onLastMarker,
boolean showHaplotypeBars,
java.awt.Font subtextfont)
Deprecated. Renders the Allele Icon and the Allele ID on the Pedigree surface at a position relative to the Individual Icon and determined by many factors among which is the value of Pedigree.getSubtextYValue(). |
protected void |
draw(java.awt.Graphics2D g2d,
double xc,
double yc,
boolean onFirstMarker,
boolean onLastMarker,
DrawingContext dc)
Paints the Allele text and the icon for chromosomes that are being displayed in the Pedigree. |
java.awt.Paint |
getColor()
Getter for property color. |
double |
getHeight()
Getter for property height. |
java.lang.String |
getID()
Getter for property ID. |
static int |
getMaxChars()
Deprecated. Get the maximum number of Characters for the Allele ID or text. This class variabale can become important when the number of characters in the Allele Text/ID is heigher than the defualt of 3 chars and hennce needs to be factored in for proper rendering of the Allele Text and Icon |
java.lang.String |
getPaternity()
Getter for property paternity. |
protected double |
getTextHeight()
Getter for property textHeight. |
protected double |
getTextWidth()
Getter for property textWidth. |
protected double |
getTextX()
Getter for property textX. |
protected double |
getTextY()
Getter for property textY. |
java.lang.String |
getType()
Getter for property type. |
double |
getWidth()
Getter for property width. |
double |
getX()
Getter for property x. |
double |
getY()
Getter for property y. |
boolean |
isBottomBar()
Getter for property bottomBar. |
protected boolean |
isColorManuallyAssigned()
Getter for property colorManuallyAssigned. |
boolean |
isTopBar()
Getter for property topBar. |
void |
setBottomBar(boolean bottomBar)
Setter for property bottomBar. |
void |
setColor(java.awt.Paint color)
Setter for property color. |
protected void |
setColorManuallyAssigned(boolean rhs)
Setter for property colorManuallyAssigned. |
void |
setHeight(double rhs)
Setter for property height. |
void |
setID(java.lang.String ID)
Setter for property ID. |
static void |
setMaxChars(int max)
Deprecated. Sets the maximum number of Characters for the Allele ID or text. This class variabale can become important when the number of characters in the Allele Text/ID is heigher than the defualt of 3 chars and hennce needs to be factored in for proper rendering of the Allele Text and Icon |
void |
setPaternity(java.lang.String paternity)
Setter for property paternity. |
protected void |
setTextHeight(double textHeight)
Setter for property textHeight. |
protected void |
setTextWidth(double textWidth)
Setter for property textWidth. |
protected void |
setTextX(double textX)
Setter for property textX. |
protected void |
setTextY(double textY)
Setter for property textY. |
void |
setTopBar(boolean topBar)
Setter for property topBar. |
void |
setType(java.lang.String type)
Setter for property type. |
void |
setWidth(double aWidth)
Setter for property width. |
void |
setX(double x)
Setter for property x. |
void |
setY(double y)
Setter for property y. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MATERNAL
public static final java.lang.String PATERNAL
| Constructor Detail |
|---|
public Allele()
| Method Detail |
|---|
public static void setMaxChars(int max)
public static int getMaxChars()
public java.lang.String getID()
public void setID(java.lang.String ID)
ID - New value of property ID.
protected void draw(java.awt.Graphics2D g2d,
double xc,
double yc,
boolean onFirstMarker,
boolean onLastMarker,
boolean showHaplotypeBars,
java.awt.Font subtextfont)
throws java.lang.Exception
xc - The XCoordinate of the middle of the bottom edge of the Person Icon. This is where the Allele and Haplotype
bars and text will be drawn from.yc - The YCoordinate of Allele Icon top left corneronFirstMarker - True if the Allele in question is on the first Marker in the sequence (set) False otherwise. This flag
if used to determine whether or not to draw a full outline around the Allele box.onLastMarker - True if the Allele in question is on the last Marker in the sequence (set) False otherwise. This flag
if used to determine whether or not to draw a full outline around the Allele box.showHaplotypeBars - If true then the Haplotype bars must be displayed otherwise only the Allele text is drawn.
java.lang.Exceptionpublic java.lang.String getType()
public void setType(java.lang.String type)
type - New value of property type.public java.lang.String getPaternity()
public void setPaternity(java.lang.String paternity)
paternity - New value of property paternity.public double getY()
public void setY(double y)
y - New value of property y.public double getX()
public void setX(double x)
x - New value of property x.public double getHeight()
public void setHeight(double rhs)
rhs - New value of property height.public double getWidth()
public void setWidth(double aWidth)
aWidth - New value of property width.public java.awt.Paint getColor()
public void setColor(java.awt.Paint color)
color - New value of property color.public boolean isTopBar()
public void setTopBar(boolean topBar)
topBar - New value of property topBar.public boolean isBottomBar()
public void setBottomBar(boolean bottomBar)
bottomBar - New value of property bottomBar.protected double getTextY()
protected void setTextY(double textY)
textY - New value of property textY.protected double getTextX()
protected void setTextX(double textX)
textX - New value of property textX.protected double getTextWidth()
protected void setTextWidth(double textWidth)
textWidth - New value of property textWidth.protected double getTextHeight()
protected void setTextHeight(double textHeight)
textHeight - New value of property textHeight.protected boolean isColorManuallyAssigned()
protected void setColorManuallyAssigned(boolean rhs)
rhs - New value of property colorManuallyAssigned.public Allele cloneAllele()
protected void draw(java.awt.Graphics2D g2d,
double xc,
double yc,
boolean onFirstMarker,
boolean onLastMarker,
DrawingContext dc)
xc - The X-Coordinate of the Individual's iconyc - The Y-Coordinate on which the left corner of the Allele Icon will be drawndc - The control's drawing context with some atributes used in rendering. Of importance to the Allele painting is the dc.dlleleTextWidth, dc.markerDisplayWIdth and dc.markerDisplayHeight among others. These
properties must have been predetermined before this method is called in order for the Allele Icons and text to be painted properly and to fit. @see calcAlleleTextWidth(Graphics2D, DrawingContext)onFirstMarker - True if the Allele in question is on the first Marker in the sequence (set) False otherwise. This flag
if used to determine whether or not to draw a full outline around the Allele box.onLastMarker - True if the Allele in question is on the last Marker in the sequence (set) False otherwise. This flag
if used to determine whether or not to draw a full outline around the Allele box.
protected double calcAlleleTextWidth(java.awt.Graphics2D g2d,
DrawingContext dc)
g2d - The current graphics contextdc - The Drawing context from which the properties to that will be used to render this Allele are obtained.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||