com.objex.panywhere
Class DrawingContext

java.lang.Object
  extended by com.objex.panywhere.DrawingContext

public class DrawingContext
extends java.lang.Object

This object is used to transport the drawing attributes used by IndividualRenderer, SymbolRenderer and Allele Renderers during their rendering process, from the PedigreeViewer to the renderers. The renderers then use this drawing context object to peek at the ruling drawing attributes set by the PedigreeViewer and hence use them to do the rendering of the objects.


Constructor Summary
DrawingContext(double iconwidth, double iconheight, double childlineheight, double ioffset, double goffset, double suby, boolean sh, boolean sid, java.awt.Font subtextFont, boolean ab_UseStandardProbandArrow)
          Creates a new Pedigree DrawingContext with the specified attributes/properties
 
Method Summary
 double getAlleleTextWidth()
           
 double getChildLineHeight()
          Gets the current drawing context's child line height.
 double getGenerationOffset()
          Gets the current drawing context's generation offset.
 java.awt.Color getHlColor()
           
 double getIconheight()
          Gets the current drawing context's iconheight.
 double getIconwidth()
          Gets the current drawing context's iconwidth.
 double getIndividualOffset()
          Gets the current drawing context's individual offset.
 double getMarkerDisplayHeight()
           
 double getMarkerDisplayWidth()
           
 java.awt.Font getSubtextFont()
          Gets the current drawing context's subtext and AlleleText font.
 double getSubtextYValue()
          Gets the current drawing context's subtextYValue.
 boolean isShowblueid()
          Gets the current drawing context's showBlueid property.
 boolean isUseStandardProbandArrow()
           
 void setAlleleTextWidth(double alleleTextWidth)
           
 void setChildLineHeight(double rhs)
          Sets the current drawing context's child line height.
 void setGenerationOffset(double rhs)
          Sets the current drawing context's generation offset.
 void setHlColor(java.awt.Color hlColor)
          Set the highlight color to be used for highlighted icons
 void setIconheight(double rhs)
          Gets the current drawing context's iconheight.
 void setIconwidth(double rhs)
          Sets the current drawing context's iconwidth.
 void setIndividualOffset(double rhs)
          Sets the current drawing context's individual offset.
 void setMarkerDisplayHeight(double markerDisplayHeight)
           
 void setMarkerDisplayWidth(double markerDisplayWidth)
           
 void setShowblueid(boolean rhs)
          Sets the current drawing context's showBlueid property.
 void setShowhaplotype(boolean rhs)
          Sets the current drawing context's showHaplotype property.
 void setSubtextFont(java.awt.Font f)
          Sets the current drawing context's subtext and AlleleText font.
 void setSubtextYValue(double rhs)
          Sets the current drawing context's subtextYValue.
 void setUseStandardProbandArrow(boolean ab_UseStandardProbandArrow)
          Sets a new value for property "useStandardProbandArrow" which determines what type of proband indicator will be drawn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawingContext

public DrawingContext(double iconwidth,
                      double iconheight,
                      double childlineheight,
                      double ioffset,
                      double goffset,
                      double suby,
                      boolean sh,
                      boolean sid,
                      java.awt.Font subtextFont,
                      boolean ab_UseStandardProbandArrow)
Creates a new Pedigree DrawingContext with the specified attributes/properties

Parameters:
iconwidth - The icon width that will be used to render individual icons
iconheight - The icon height that will be used to render individual icons
childlineheight - The child line height that will be used to render individual icons
ioffset - The individual offset that will be used to render individual icons
goffset - The generation offset that will be used to render individual icons
suby - The subtext Y Value that will be used to render individual icons
sh - The flag indicating whether or not the haplotype bars will be drawn for each icon
sid - The flag indicating whether or not the generational ID's will be drawn for each icon
subtextFont - The font taht will be used to render iconsubtext as well as Allele text
Method Detail

setIconwidth

public void setIconwidth(double rhs)
Sets the current drawing context's iconwidth. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


getIconwidth

public double getIconwidth()
Gets the current drawing context's iconwidth. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setChildLineHeight

public void setChildLineHeight(double rhs)
Sets the current drawing context's child line height. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


getChildLineHeight

public double getChildLineHeight()
Gets the current drawing context's child line height. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setIconheight

public void setIconheight(double rhs)
Gets the current drawing context's iconheight. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


getIconheight

public double getIconheight()
Gets the current drawing context's iconheight. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setIndividualOffset

public void setIndividualOffset(double rhs)
Sets the current drawing context's individual offset. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


getIndividualOffset

public double getIndividualOffset()
Gets the current drawing context's individual offset. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setGenerationOffset

public void setGenerationOffset(double rhs)
Sets the current drawing context's generation offset. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


getGenerationOffset

public double getGenerationOffset()
Gets the current drawing context's generation offset. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setSubtextYValue

public void setSubtextYValue(double rhs)
Sets the current drawing context's subtextYValue. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


getSubtextYValue

public double getSubtextYValue()
Gets the current drawing context's subtextYValue. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setShowhaplotype

public void setShowhaplotype(boolean rhs)
Sets the current drawing context's showHaplotype property. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setShowblueid

public void setShowblueid(boolean rhs)
Sets the current drawing context's showBlueid property. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


isShowblueid

public boolean isShowblueid()
Gets the current drawing context's showBlueid property. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


setSubtextFont

public void setSubtextFont(java.awt.Font f)
Sets the current drawing context's subtext and AlleleText font. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


getSubtextFont

public java.awt.Font getSubtextFont()
Gets the current drawing context's subtext and AlleleText font. This will be used to draw all Individual icons using the renderer to which this drawing context is passed.


isUseStandardProbandArrow

public boolean isUseStandardProbandArrow()
Returns:
True If the Pedigree Viewer has been set to use the standard Progeny Proband Arrow and false otherwise
Since:
2.01

setUseStandardProbandArrow

public void setUseStandardProbandArrow(boolean ab_UseStandardProbandArrow)
Sets a new value for property "useStandardProbandArrow" which determines what type of proband indicator will be drawn

Parameters:
ab_UseStandardProbandArrow - The new value for the property "useStandardProbandArrow"
Since:
2.01

getHlColor

public java.awt.Color getHlColor()
Returns:
The highlight color to be used for highlighted icons

setHlColor

public void setHlColor(java.awt.Color hlColor)
Set the highlight color to be used for highlighted icons

Parameters:
hlColor - The new highlight color

getAlleleTextWidth

public double getAlleleTextWidth()

setAlleleTextWidth

public void setAlleleTextWidth(double alleleTextWidth)

getMarkerDisplayWidth

public double getMarkerDisplayWidth()

setMarkerDisplayWidth

public void setMarkerDisplayWidth(double markerDisplayWidth)

getMarkerDisplayHeight

public double getMarkerDisplayHeight()

setMarkerDisplayHeight

public void setMarkerDisplayHeight(double markerDisplayHeight)