|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.objex.panywhere.ProgenyAnywhere
public class ProgenyAnywhere
The ProgenyAnywhere class is the main class for the ProgenyAnywhere pedigree drawing control. It defines all the primary API methods and algorithms for pedigree drawing, making it a fully self contained
pedigree drawing, manipulation and data exchange tool all in one. As a programmer, all you need to do is to add an instance of the ProgenyAnywhere class to a container and you will be ready to start drawing
and manipulating pedigrees. Through this class the ProgenyAnywhere API exposes a multiplicity of API methods that make it easy for programmers to customize the way pedigree drawing is done at a programmatic level.
Customization can also be done at the user level using some of the controls and dialogs that have been provided as part of the control.
An instance of ProgenyAnywhere must be added to a scrollable container like JScrollPane or its equivalents in other environments, to allow the canvas to grow beyond the initial preferred size while providing a window to
view parts of a large pedigree in a scrollable window. An example of how to get started with creating pedigrees is shown below.
void createPedigreeViewerInstance() {
ProgenyAnywhere ped = new ProgenyAnywhere();
//Create a scroller with the newly created Pedigree bean as the view thus:
JScrollPane jsp = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
jsp.getViewport.setView(ped.m_canvas);
}
Legend,
SubtextLegend| Field Summary | |
|---|---|
static int |
ALLELE_TEXT_ICON_GAP
The amount of space between the Allele icon and the left or right edge of the Allele text Textlayout object |
static int |
ALLELE_TEXT_OFFSET
The amount of space between the center of the Individual's icon and the Allele text on either side of the Individual parentage. |
javax.swing.JPanel |
m_canvas
The canvas on which the pedigree will be drawn |
static int |
PEDIGREE_MODE_VIEWANDMODIFY
The default pedigree mode in which all of the operations on the Pedigree and/or Individual properties are allowed |
static int |
PEDIGREE_MODE_VIEWONLY
The pedigree mode in which most of the operations on the Pedigree and/or Individual properties may not be changed. |
static java.lang.String |
PROBAND_LOWER_LEFT
|
static java.lang.String |
PROBAND_LOWER_RIGHT
|
static java.lang.String |
PROBAND_UPPER_LEFT
|
static java.lang.String |
PROBAND_UPPER_RIGHT
|
static int |
SUBTEXT_SIBLING_LINE_GAP
The gap between the last subtext line or marker for Individuals in one generation and the sibling line position of the Individuals in the next generation |
static int |
SUBTEXTLEGEND_GAP
The gap between the leftmost Individual in a generation and the SubtextLegend if any is shown |
| Constructor Summary | |
|---|---|
ProgenyAnywhere()
Create new ProgenyAnywhere instance. |
|
ProgenyAnywhere(java.util.Locale aLocale)
Create new ProgenyAnywhere instance. |
|
| Method Summary | |
|---|---|
void |
addAboutBoxListener(AboutBoxListener listener)
Add an about box listener |
void |
addAddedTextListener(AddedTextListener listener)
Register a new AddedText listener to receive AddedText events |
Individual |
addChild(java.lang.String as_parentid,
java.lang.String as_relationship,
boolean deceased)
Add a child to an existing parent object Also check if the parent to whom the child is being added has a lSpouse in which case the child/parent indexes for the lSpouse have to updated |
void |
addCustomIndividualMenuItem(javax.swing.JMenuItem menuitem,
boolean ab_showonreadonly,
boolean ab_add_separator)
Add a programmer defined menuitem to be displayed when user right clicks on Individual icon. |
void |
addCustomIndividualSubMenu(javax.swing.JMenu submenu,
boolean ab_showonreadonly,
boolean ab_add_separator)
Add a programmer defined submenu to be displayed when user right clicks on Individual icon. |
void |
addDrawingListener(DrawingListener listener)
Add a new DrawingListener listener |
void |
addExportListener(ExportListener listener)
Add an Export listener. |
void |
addIconClickListener(IconClickListener listener)
Add a new IconClickListener to handle icon click events |
void |
addImageListener(ImageListener listener)
Add a new ImageListener to handle image events for the control |
void |
addImportListener(ImportListener listener)
Use this method to register for import events generated by the XML import parser |
void |
addIndividualAddListener(IndividualAddListener listener)
Allows interested objects to registser for receiving person add events |
void |
addIndividualDeleteListener(IndividualDeleteListener listener)
Register a new individual delete listener to receive person delete events |
void |
addIndividualListener(IndividualListener listener)
Add Individual listener |
void |
addLegendListener(LegendListener listener)
Add LegendListener |
void |
addLineClickListener(LineClickListener listener)
Add the LineClickListener to handle line click events. |
Individual |
addParent(java.lang.String as_childid,
java.lang.String as_relationship,
boolean deceased)
Add a parent to an existing child. |
void |
addPedigreeListener(PedigreeListener listener)
Adds a new PedigreeListener |
void |
addPedigreePrintListener(PedigreePrintListener listener)
Add a new PedigreePrintListener to handle printing events. |
void |
addPerson(java.lang.String as_personid,
java.lang.String as_relationship,
boolean deceased)
Adds an Individual to the pedigree by specifying the (UPN) of the Individual to be added and the relationship of the new Individual to the existing Individual. |
void |
addRelationshipListener(RelationshipListener listener)
Add a new RelationshipListener to handle relationship events |
java.lang.String |
addSibling(java.lang.String as_sibling,
java.lang.String as_relationship,
boolean deceased)
Add a brother or sister to an existing Individual. |
void |
addSmartDrawService(SmartDrawService a_smartDrawService)
Use this method to replace the default smartdraw service used by ProgenyAnywhere with a new external one. |
java.lang.String |
addSpouse(Individual a_person,
boolean deceased)
Add a spouse to an existing Individual. |
void |
addSpouseRelationshipChangeListener(SpouseRelationshipChangeListener listener)
Add a new relationship change listener |
void |
addToFamily(Individual aPerson,
Individual a_toPerson)
Add Individual passed as parameter to the family. |
Individual |
addTwin(Individual to_sibling,
java.lang.String as_relationship,
boolean deceased)
Add a twin brother or twin sister to an existing Individual. |
void |
addTwinRelationshipChangeListener(TwinRelationshipChangeListener listener)
Add a new relationship change listener |
java.lang.String |
addUnconnected(java.lang.String gender,
boolean deceased,
double x,
double y)
Add an unconnected Individual to the Pedigree. |
java.lang.String |
addUnconnected(java.lang.String upn,
java.lang.String gender,
boolean deceased,
double x,
double y)
Add an Unconnected Individual to the Pedigree. |
void |
assignLegendItem(Individual a_person,
LegendItem a_legend_item)
Assign the legend item to the specified person. |
void |
clearHighlights()
Clear any highlighted individuals and/or relationship lines. |
void |
clearPedigree()
Clears the Pedigree creates a new empty Pedigree with no Individuals. |
void |
clearRepaintArea()
Repaints or clears the current viewable part of the component (visible rectangle only) |
void |
connectChild(Individual a_parent,
Individual a_child,
boolean liberal)
Used to connect two Individuals who already exist in the Pedigree to one another as child and parent. |
void |
connectParent(Individual a_child,
Individual a_parent,
boolean liberal)
Used to connect two Individuals who already exist in the Pedigree to one another as child and parent. |
boolean |
connectSibling(Individual to_sibling,
Individual new_sibling,
boolean asTwin,
boolean liberal)
Connects two existing individuals to each other as normal siblings or as twins. |
void |
connectSpouse(Individual to_spouse,
Individual a_connect_spouse,
boolean liberal)
Connects individuals existing in a pedigree to become each other's spouses. |
boolean |
copyPedigree()
Copies only the contents of the Pedigree that are strictly required to re-construct a Pedigree in the target system. |
void |
copyWMF()
Copies the current Pedigree into a Windows MetaFile that is then placed in the System clipboard. |
void |
deleteIndividual(Individual aPerson)
Delete an individual from a Pedigree and clears all his/her relationships. |
void |
dispose()
This method is used to do garbage collection on some key objects used by the control. |
void |
exportXML(java.io.File aXMLFile)
Exports current Pedigree data in XML format defined by the Progeny XML grammar in the DTD located here A new file will be created or an existing one will be overwritten. |
java.lang.String |
findAllele(java.awt.geom.Point2D point)
Finds an Alelle that is located at a location specified by argument "point" |
Individual |
findPerson(java.awt.geom.Point2D point)
Finds an Individual whose Icon's bounding rectangle contains / encloses the point "point", passed as parameter to the method. |
void |
fitPedigreeToPage(boolean showDialog)
Forces the current pedigree to be printed on a sringle page given the current page and paper settings or one chosen by user. |
void |
fitPedigreeToScreen()
This method allows the developer to set the scale of the current pedigree such that the whole pedigree would fit to the current viewport. |
double |
getAlleleDisplayWidth()
|
double |
getChildlineheight()
Gets and returns the length of the child line for this Pedigree. |
int |
getCount()
|
java.util.Date |
getCreationDate()
Gets the date on which the Pedigree was created |
java.io.File |
getCurrentXMLFile()
|
DataDictionary |
getDatadictionary()
|
java.lang.String |
getDefaultFontName()
|
double |
getDefGenerationYPos(int generation)
Get Y coordinate given a generation. |
java.util.Locale |
getDefLocale()
|
static double |
getDepthoffset()
Retrieves and returns the amount by which child and/or sibling bars (lines connecting) siblings are to be offset by where more than one of these may be intersecting and colinear with sibling lines of other sibling groups. |
Family |
getFamily()
|
java.lang.String |
getFooter()
|
double |
getGenerationoffset()
|
java.lang.String |
getHeader()
|
java.util.Stack<Individual> |
getHighlightedindividuals()
Retrieves and returns a stacked list of highlighted / selected Individuals. |
java.lang.String |
getHomeDirectory()
|
int |
getHorizontalgridspacing()
Retrieves the Horizontal grid spacing specified for this Pedigree |
double |
getIconheight()
|
java.awt.Font |
getIconsubtextfont()
|
double |
getIconwidth()
|
void |
getImage(java.awt.image.BufferedImage[] a_Image)
Generate an image and store it in the supplied one element Array. |
double |
getImageZoomFactor()
Returns the current value for the largest image size zoom factor. |
double |
getIndividualoffset()
Returns the amount of space between one Individual and the next Individual within the same generation in the increasing X-direction. |
javax.swing.MenuElement[] |
getIndividualPopupMenuElements()
|
com.objex.panywhere.IndividualRenderer |
getIndividualRenderer()
|
java.awt.geom.Point2D |
getLastMouseLocation()
Returns the lastest location of a mouse click. |
Legend |
getLegend()
Gets the current symbols legend |
float |
getLinewidth()
Retrieves the line width used for drawing Pedigree objects |
double |
getMarkerDisplayHeight()
|
double |
getMarkerDisplayWidth()
|
MarkerLegend |
getMarkerLegend()
|
double |
getMinX()
Returns the minimum X coordinate on which the left-most Individual's Icon is placed placed. |
double |
getMinY()
Returns the minimum Y coordinate on which the top most Individual's Icon can be placed. |
int |
getOldestGeneration()
Returns the generation of the Individual(s) that are at the highest level in the family tree. |
java.awt.print.PageFormat |
getPageFormat()
|
double |
getPedigreescale()
|
javax.swing.MenuElement[] |
getPopupMenuElements()
|
java.lang.String |
getProbandArrowPos()
|
double |
getScaleX()
Returns the current drawing scale in the X-direction. |
double |
getScaleY()
Returns the current drawing scale in the Y-direction. |
java.lang.String |
getSelectedIndividuals()
Gets a string of UPN's for all highlited individuals. |
SubtextLegend |
getSubtextLegend()
|
double |
getSubtextyvalue()
Retrieves the relative positioning of the Icon subtext. |
javax.swing.JToolBar |
getToolBar()
Creates and/or gets a tool bar object that contains the common functions or actions buttons for the pedigree. |
int |
getVerticalgridspacing()
Retrieves the Vertical grid spacing specified for this Pedigree |
java.lang.String |
getXMLString()
Exports current Pedigree data in XML format defined by the Progeny XML grammar in the DTD located here The contents of the XML output is written to a string. |
java.lang.String |
getXMLString(boolean includeSubtext)
Exports current Pedigree data in XML format defined by the Progeny XML grammar in the DTD located here The contents of the XML output is written to a string. |
int |
getYoungestGeneration()
Returns the generation of the Individual(s) that are at the lowest level in the pedigree. |
void |
hideIndividualPopupMenuItem(java.lang.String as_item_text_pattern)
Hide the menu item whose item text is specifed. |
void |
hidePopupMenuItem(java.lang.String as_item_text_pattern)
Hide the menu item whose item text is specifed. |
boolean |
highlightIndividuals(java.awt.geom.Rectangle2D boundingRec)
Highlights those individuals whose Icons are wholy contained within a rectangular region defined by the rectangle boundingRec. |
void |
highlightPerson(Individual aPerson)
Sets the Individual "aPerson"'s highlighted status to true. |
void |
highlightRelatives(Individual a_person,
int degree)
Highlights all the relatives of this Individual up to and including the specified degree of relation. Highlighted icons will be drawn in highlighted yellow squares with black handles at appropriate positions of the Icon. |
void |
highlightRelatives(java.lang.String as_upn,
int degree)
Highlights all the relatives of this Individual up to and including the specified degree of relation. Highlighted icons will be drawn in highlighted yellow squares with black handles at appropriate positions of the Icon. |
void |
importAddedTexts(java.util.List<AddedText> a_addedTextList)
|
void |
importDelimited(java.io.File file,
java.lang.String delimiter,
int[] fields)
Method for importing character delimited text file of Individual data that forms a pedigree. |
void |
importSmartDrawPositions(java.lang.String[] am_upns,
double[] am_xc,
double[] am_yc)
Used internally to import XY positions for all the people in this pedigree that were generatted by an external SmartDawService. |
void |
importXML(java.io.File xmlFile)
Creates a new pedigree with data imported from specified XML file. |
void |
importXML(java.lang.String xmlFileName)
Imports dat from the file specified by "xmlFileName" and constructs a Pedigree from the imported data. |
void |
importXMLString(java.lang.String xmlString)
Imports data from supplied XML String and parses that String to construct a Pedigree. |
boolean |
isAutodraw()
Returns the current value of the autodraw property. |
boolean |
isImportShadow()
Currently NOT USED |
boolean |
isLegendChanged()
|
boolean |
isLivedragging()
|
boolean |
isMatchspouses()
|
boolean |
isModifiabable()
|
boolean |
isOneclickadd()
Gets the value of the �one click add�. |
boolean |
isPulllonerelatives()
Getter for property "pulllonerelatives". |
boolean |
isShowblueid()
|
boolean |
isShowDate()
|
boolean |
isShowfooter()
|
boolean |
isShowgrid()
|
boolean |
isShowhaplotypes()
|
boolean |
isShowheader()
|
boolean |
isShowhooks()
Determines whether hooks should be shown or hidden as speciffied by the showhooks property |
boolean |
isShowlegend()
Returns the current value of the property showlegend. |
boolean |
isShowpagebreaks()
|
boolean |
isShowSubtextLegend()
|
boolean |
isSnaptogrid()
|
boolean |
isUseStandardProbandArrow()
|
void |
moveToIndividual(Individual a_person)
Scrolls the Pedigree viewport to the specified Individual if the Individual is not within view already. |
boolean |
pastePedigree()
Pastes the contents of the clipBoard onto the Pedigree if indeed the data in the clipBoard matches that which is expected in the Control. |
void |
printPedigree(boolean showDialog)
Print the current pedigree. |
void |
readPedigree(java.io.File a_file)
Reads the saved state of a pedigree from file (usually with extension .pro or .xml for older serialized files) |
void |
removeAboutBoxListener(AboutBoxListener listener)
Remove an about box listener |
void |
removeAddedTextListener(AddedTextListener listener)
Removes the AddedText listener and stop any AddedText events from being channeled here |
void |
removeDrawingListener(DrawingListener listener)
Remove the specified DrawingListener |
void |
removeExportListener(ExportListener listener)
Remove ExportListener and sto handling export events |
void |
removeIconClickListener(IconClickListener listener)
Remove IconClickListener |
void |
removeIconClickListeners()
Remove all registered icon click listeners |
void |
removeImageListener(ImageListener listener)
Remove an ImageListener to handle image events for the control |
void |
removeImportListener(ImportListener listener)
Use this method to de-register for import events generated by the XML import parser |
void |
removeIndividualAddListener(IndividualAddListener listener)
Removes tehe specified individual add event listener. |
void |
removeIndividualDeleteListener(IndividualDeleteListener listener)
Removes the delete listener and stop any delete events from being channeled here |
void |
removeIndividualListener(IndividualListener listener)
Remove the Individual listener |
void |
removeLegendListener(LegendListener listener)
Remove an LegendListener * @param listener The legend listener to be removed |
void |
removeLineClickListener(LineClickListener listener)
Remove or de-registser line click event listeners |
void |
removePedigreeListener(PedigreeListener listener)
Removes the PedigreeListener |
void |
removePedigreePrintListener(PedigreePrintListener listener)
Remove the PedigreePrintListener and stop handling printing events. |
void |
removeRelationshipListener(RelationshipListener listener)
Remove the RelationshipListener |
void |
removeSpouseRelationshipChangeListener(SpouseRelationshipChangeListener listener)
Removes the SpouseRelationshipChangeListener |
void |
removeTwinRelationshipChangeListener(TwinRelationshipChangeListener listener)
Removes a TwinRelationshipChangeListener |
void |
repaint()
Repaint the pedigree |
void |
reverseSelect()
Un-highlights all the Individuals who may be highlighted and highlights those that are not highlighted. |
void |
saveImage(java.lang.String format)
This function saves the pedigree that the control currently holds to image format specified. |
void |
saveImageAsStream(java.lang.String format,
java.io.OutputStream out)
This function saves the pedigree that the control currently holds to image format specified. |
void |
savePedigree(java.io.File a_file)
Writes the current pedigree state to a file. |
void |
savePedigree(java.lang.String as_filename)
Writes the current pedigree state to a file. |
void |
setAlleleDisplayWidth(double aWidth)
Sets the maximum width about which to justify Allele text. |
void |
setAutodraw(boolean rhs)
Set the autodraw option to on or off. |
void |
setBackgroundTemplate(java.net.URL url)
Sets the URL for the location of a background image if one is to be used |
void |
setChildlineheight(double clh)
Sets the value of childlineheight to a new value. |
static void |
setClientContactInfo(java.lang.String rhs)
Use this function to change the default contact information for problems with the JavaBean. |
void |
setCreationDate(java.util.Date d)
Sets the date on which the Pedigree was created |
void |
setCurrentFileHandle(java.io.File rhs)
Sets the current file handle to the new value |
void |
setCurrentXMLFile(java.io.File rhs)
|
void |
setDatadictionary(DataDictionary rhs)
Setter for property datadictionary. |
void |
setDefaultFontName(java.lang.String fontname)
Sets Default font name |
void |
setFooter(java.lang.String rhs)
This function sets the text for the footer. |
void |
setGenerationoffset(double rhs)
Sets the gap/distance between one generation and the next. |
void |
setGenerations(Individual a_start_person)
This method traverses a family tree in which Individual "ind" is a member and sets the generations of Individuals appropriately. |
void |
setGeneticdataManuallyAssigned(boolean ab_manual)
Sets the flag indicating that the genetic data in this pedigree was calculated some place else and assigned manually to the pedigree. |
void |
setHeader(java.lang.String rhs)
This function sets the text for the header. |
void |
setHideControlProgressMonitors(boolean ab_hide)
Use this method to hide all the progress dialogs that come implemented by the Progeny Anywhere control. |
void |
setHorizontalgridspacing(int gspace)
Set the space between horizontal points on the grid. |
void |
setHorizontalgridspacing(java.lang.String gspace)
Set the space between horizontal points on the grid. |
void |
setIconheight(double height)
Sets the height of the Icon that represents an Individual in a Pedigree. |
void |
setIconsubtextfont(java.awt.Font font)
Sets the font for the icon subtext. |
void |
setIconwidth(double width)
Sets the value of the current Icon width. |
void |
setImageZoomFactor(double rhs)
Sets a new value for the largest image size zoom factor. |
void |
setImportFile(java.io.File a_file)
Sets the import file handle to the new value |
void |
setImportShadow(boolean rhs)
Currently NOT USED |
void |
setIndividualoffset(double rhs)
This function modifies the way SmartDraw operates by changing the amount of space between one Individual and the next Individual within the same generation in the increasing X-direction. |
void |
setIndividualRenderer(com.objex.panywhere.IndividualRenderer a_renderer)
Set the new IndividualRenderer. |
void |
setLegend(Legend legend)
Sets the new symbols legend |
void |
setLegendChanged(boolean b)
|
void |
setLinewidth(float lwidth)
Sets the linewidth property value |
void |
setLinewidth(java.lang.String as_width)
Sets the linewidth property value. |
void |
setLivedragging(boolean value)
Sets the "livedragging" property to true or on. |
void |
setMarkerDisplayHeight(double aHeight)
|
void |
setMarkerDisplayWidth(double aWidth)
Sets the display width of each marker in a haplotype bar |
void |
setMarkerLegend(MarkerLegend a_legend)
Sets the new The marker legend for this pedigree |
void |
setMatchspouses(boolean match)
Sets or unsets the flag indicating whether or not the spouses must be kept close together. |
void |
setMenuDelay(int rhs)
Sets the user prefences for the Menu Transition Delay. |
void |
setMinX(double min)
Sets the minimum X coordinate on which the left-most Individual's Icon is placed placed. |
void |
setMinY(double min)
Sets the minimum Y coordinate on which the top most Individual's Icon can be placed. |
void |
setOneclickadd(boolean value)
Set the �one click add� option to on or off. |
void |
setPageFormat(javax.print.attribute.PrintRequestAttributeSet aPrintAttribSet)
Use this API method to set the dafeult page format for printing pedigrees. |
void |
setPedigreescale(double scale)
Sets the drawing scale for the Pedigree the supplied value. |
void |
setPedigreeSize(java.awt.Dimension size)
Change the dimensions of the Pedigree canvas. |
void |
setPedigreeViewMode(int ai_mode)
Set the pedigree mode to one of Pedigree.VIEW_AND_CHANGE_MODE or Pedigree.VIEWONLY_MODE depending on the value of the parameter ab_viewonly. |
void |
setPrintService(javax.print.PrintService ps)
|
void |
setProbandArrowPos(java.lang.String as_pos)
Sets the position where the proband arrow must be drawn. |
void |
setPulllonerelatives(boolean rhs)
Sets the new value of property "pulllonerelatives". |
void |
setScale(double scalex,
double scaley)
Sets the drawing scale in the both the X and Y direction to the value supplied. |
void |
setScaleHeader(boolean ab_scale)
|
void |
setShowblueid(boolean showid)
Set the blue ID number to visible or invisible for all the individuals in the pedigree. |
void |
setShowDate(boolean showdate)
Flag indicating whether or not to show the date in the top left corner of the pedigree. |
void |
setShowfooter(boolean show)
Sets or unsets the flag indicating whether or not to show the footer at the bottom of every page |
void |
setShowgrid(boolean value)
Sets or unsets the flag indicating whether or not grids must be displayed on the Pedigree. |
void |
setShowhaplotypes(boolean ab_showhap)
Sets the property showhaplotypes to specified value. |
void |
setShowheader(boolean show)
Sets or unsets the flag indicating whether or not to show the header at the top of every page |
void |
setShowhooks(boolean showhooks)
Set or unsets the flag proprty for shwoing hooks. |
void |
setShowlegend(boolean value)
Turns the display of the legend on or off. |
void |
setShowpagebreaks(boolean value)
When the control is first initialized, it examines the default printer and determines the page size. |
void |
setShowSubtextLegend(boolean rhs)
Set the new value for whether or not subtext legend must be shown |
void |
setSmartCalcLegend(boolean b)
Sets the property smartCalcLegend to supplied parameter. |
void |
setSnaptogrid(boolean value)
Sets "snaptogrid" property to true or false depending on the value passed. |
void |
setSubtextEditAllowed(boolean ab_allowed)
Enable or diable subtext edits by setting this property to true or false |
void |
setSubtextLegend(SubtextLegend a_legend)
Sets a new subtext legend for this pedigree |
void |
setSubtextyvalue(double yvalue)
Sets the relative positioning of the Icon subtext. |
void |
setUseStandardProbandArrow(boolean ab_UseStandardProbandArrow)
Sets a new value for property "useStandardProbandArrow" which determines what type of proband indicator will be drawn |
void |
setVerticalgridspacing(int gspace)
Set the space between vertical points on the grid. |
void |
setVerticalgridspacing(java.lang.String gspace)
Set the space between vertical points on the grid. |
void |
showAll()
Highlights all individuals in the Pedigree. |
void |
showAncestorPath(Individual ind)
Highlights all the ancestors of the specified individual -- showing the path from this individual to the top most ancestors. |
void |
showAncestorPath(Individual ind,
int degree)
Shows and highlights the specified Individual's ancestors at the degree of relation specified |
void |
showChildren(Individual ind)
Highlights the children of Individual a_person |
void |
showDescendantsPath(Individual ind)
Highlight all Descendants of Individual "ind" |
void |
showDescendantsPath(Individual ind,
int degree)
Highlights all the descendants of the spciefied individual -- showing the path from this individual to all his / her descendants. |
void |
showLegendDialog(boolean show)
Creates and /or displays the Legend Dialog dialog box |
void |
showNewAddedText()
Creates a new AddedText in the client. |
void |
showPaletteDialog(boolean show)
Creates and /or displays the Palette dialog box |
void |
showParents(Individual ind)
Highlights the Individual "ind's" parents |
java.io.File |
showPedigreeFileDialog(java.lang.String flext,
boolean open)
Creates the most appropriate file handle depending on the file extension required (XML, JPG) etc. |
void |
showPropertiesDialog(boolean show)
Creates and/or displays the properties dialog box |
void |
showRelatives(Individual a_person,
int degree,
int direction)
Highlights all the relatives of this Individual up to and including the specified degree of relation. Highlighted icons will be drawn in highlighted yellow squares with black handles at appropriate positions of the Icon. |
void |
showSiblings(Individual ind)
Highlights the Individual "ind's" siblings |
void |
showSpouses(Individual ind)
Highlights the Individual "ind's" spouses |
void |
showUncles(Individual ind)
Highlights all the relatives of this Individual depending on degree of relation chosen. |
void |
smartCalcIndividualSpace()
Used internally to aid in detrmining how much space a person's icon needs to render non-overlapping subtext and markers below the icon. |
void |
smartDraw()
This method excutes the drawing algorithm that calculates the most appropriate positions for each person in the pedigree. |
void |
smartHaplotyping()
Runs the haplotying algorithm which assigns colors to Alleles starting at Root (no parent) Individuals going downwards to the descendants. |
void |
unhighlightPerson(Individual aPerson)
Removes highlights from specified person. |
void |
updateSubtext()
Update subtext for all people in the pedigree. |
void |
updateSubtext(Individual a_person)
Update subtext for specified person. |
void |
updateSymbols()
Assign the legend items in the symbols legend to all the relevant people. |
boolean |
validateSiteLicense(java.applet.AppletContext aAppletContext,
java.lang.String as_isv,
int ai_cutomer_number)
Users of the Progeny Anywhere Control with site Licenses for running the control inside applets on the web will have to use this method to validate their licenses. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SUBTEXT_SIBLING_LINE_GAP
public static final java.lang.String PROBAND_UPPER_LEFT
public static final java.lang.String PROBAND_LOWER_LEFT
public static final java.lang.String PROBAND_LOWER_RIGHT
public static final java.lang.String PROBAND_UPPER_RIGHT
public static final int SUBTEXTLEGEND_GAP
public static final int ALLELE_TEXT_OFFSET
public static final int ALLELE_TEXT_ICON_GAP
public static final int PEDIGREE_MODE_VIEWONLY
public static final int PEDIGREE_MODE_VIEWANDMODIFY
public final javax.swing.JPanel m_canvas
| Constructor Detail |
|---|
public ProgenyAnywhere()
public ProgenyAnywhere(java.util.Locale aLocale)
aLocale - The locale to be used for localization| Method Detail |
|---|
public void setPageFormat(javax.print.attribute.PrintRequestAttributeSet aPrintAttribSet)
aPrintAttribSet - The PrintRequest Attributes set that defines the page format for printing pedigrees.public java.awt.print.PageFormat getPageFormat()
public static void setClientContactInfo(java.lang.String rhs)
rhs - The client contact informationpublic double getAlleleDisplayWidth()
public void setAlleleDisplayWidth(double aWidth)
aWidth - public double getMarkerDisplayHeight()
public void setMarkerDisplayHeight(double aHeight)
aHeight - The new heightpublic double getMarkerDisplayWidth()
public void setMarkerDisplayWidth(double aWidth)
aWidth - The new widthpublic void setProbandArrowPos(java.lang.String as_pos)
as_pos - The new position. Possible values are
public java.lang.String getProbandArrowPos()
public boolean isUseStandardProbandArrow()
public void setUseStandardProbandArrow(boolean ab_UseStandardProbandArrow)
ab_UseStandardProbandArrow - The new value for the property "useStandardProbandArrow"public void setPedigreeViewMode(int ai_mode)
ai_mode - The new mode for the Progeny Anywhere control. Possible values are Pedigree.PEDIGREE_MODE_VIEWONLY and Pedigree.PEDIGREE_MODE_MODIFYpublic boolean isModifiabable()
public boolean isShowSubtextLegend()
public void setShowSubtextLegend(boolean rhs)
public SubtextLegend getSubtextLegend()
public void setSubtextLegend(SubtextLegend a_legend)
a_legend - The new subtext legendpublic void updateSubtext()
public void updateSubtext(Individual a_person)
a_person - The person for whom subtext item must be updated in preparation for renderingpublic void updateSymbols()
public void assignLegendItem(Individual a_person,
LegendItem a_legend_item)
a_person - Person to assign the legend item to.a_legend_item - The legend item to be assign to the person's symbolpublic void setHideControlProgressMonitors(boolean ab_hide)
ab_hide - If TRUE then the progress dialogs implemented by this control will not be shown otherwise they will be shownpublic java.util.Locale getDefLocale()
public void setScaleHeader(boolean ab_scale)
ab_scale - If true, the header and footer of the pedigree will be scaled along with the rest of the objects in the pedigree otherwise it is not scaled when the method setScale(sx, sy) is
applied on the pedigreepublic void setPedigreescale(double scale)
scale - A double value is the drawing scale for this Pedigreepublic double getPedigreescale()
public void setHeader(java.lang.String rhs)
rhs - The text to set header topublic java.lang.String getHeader()
public void setFooter(java.lang.String rhs)
rhs - The text to set footer topublic java.lang.String getFooter()
public void setLinewidth(float lwidth)
lwidth - The line width specified as a floating point decimalpublic void setLinewidth(java.lang.String as_width)
as_width - The line width specified as a stringpublic float getLinewidth()
public void setHorizontalgridspacing(int gspace)
gspace - The amount of space between stops on the horizontal grid specified as an integer valuepublic void setHorizontalgridspacing(java.lang.String gspace)
gspace - The amount of space between stops on the horizontal grid specified as a stringpublic void setVerticalgridspacing(java.lang.String gspace)
gspace - The amount of space between stops on the vertical grid speciefied as a string valuepublic void setVerticalgridspacing(int gspace)
gspace - The amount of space between stops on the vertical grid speciefied as an Integer valuepublic int getVerticalgridspacing()
public int getHorizontalgridspacing()
public void setShowhooks(boolean showhooks)
showhooks - Boolean value indicating whethere or not to show hookspublic boolean isShowhooks()
public void setShowblueid(boolean showid)
showid - True if no is to be shown, false otherwisepublic boolean isShowblueid()
public void setShowDate(boolean showdate)
showdate - True if date is to be shown , false otherwisepublic boolean isShowDate()
public void setMatchspouses(boolean match)
match - True if spouses are to be kept close to each other, false otherwisepublic boolean isMatchspouses()
public void setPulllonerelatives(boolean rhs)
public boolean isPulllonerelatives()
public void setIconsubtextfont(java.awt.Font font)
font - The font to be used in drawing Icon subtextpublic java.awt.Font getIconsubtextfont()
public void setPedigreeSize(java.awt.Dimension size)
size - The new Dimension representing the size to which the the pedigree must be setpublic void setMenuDelay(int rhs)
rhs - The new value for the menu transition delaypublic java.lang.String getHomeDirectory()
public void setCurrentFileHandle(java.io.File rhs)
rhs - The new file handle or nullpublic void setImportFile(java.io.File a_file)
a_file - The new file handle or nullpublic void savePedigree(java.io.File a_file)
a_file - The output file objectpublic void savePedigree(java.lang.String as_filename)
as_filename - The name of the output filepublic void readPedigree(java.io.File a_file)
a_file - The input filepublic Family getFamily()
public void moveToIndividual(Individual a_person)
a_person - The Individual to be brought into viewpublic void setLegend(Legend legend)
legend - The new symbols legendpublic Legend getLegend()
public void setCreationDate(java.util.Date d)
d - The new date objectpublic java.util.Date getCreationDate()
public double getChildlineheight()
public void setChildlineheight(double clh)
public void setSubtextyvalue(double yvalue)
yvalue - A double represeting the offset, measured from the icon top left corner.public double getSubtextyvalue()
public static double getDepthoffset()
public void fitPedigreeToPage(boolean showDialog)
showDialog - If true, a page format dialog will be displayed to allow user to choose
the most appropriate page settings, otherwise no dialog will be displayed
forcing the system to fit pedigree to page defined by current page settingspublic double getMinX()
public void setMinY(double min)
min - The new value for "minimumY" propertypublic void setMinX(double min)
min - The new value for "minimumX" propertypublic double getMinY()
public java.awt.geom.Point2D getLastMouseLocation()
public void setScale(double scalex,
double scaley)
scaley - The new scaling factor in the Y directionscalex - The new scaling factor in the X directionpublic double getScaleX()
public double getScaleY()
public void setShowfooter(boolean show)
show - The new flag. A value of True will set the flag, false will unset the flag.public boolean isShowfooter()
public void setShowheader(boolean show)
show - The new flag. A value of True will set the flag, false will unset the flag.public boolean isShowheader()
public void setShowhaplotypes(boolean ab_showhap)
ab_showhap - The new value for property showhaplotypespublic boolean isShowhaplotypes()
public void setAutodraw(boolean rhs)
rhs - Boolean indicating whether or not to autodraw.public boolean isAutodraw()
public void setImportShadow(boolean rhs)
public boolean isImportShadow()
public void setShowgrid(boolean value)
value - A new value of the showgrid property. A value of "TRUE" will set it and false will unset the flag.public void setOneclickadd(boolean value)
value - New indicator (True to set it on, false to shut it off)public boolean isOneclickadd()
public boolean isShowgrid()
public void setSnaptogrid(boolean value)
value - If true then Icons will be snapped to the closest grid position during drawingpublic boolean isSnaptogrid()
public void setShowpagebreaks(boolean value)
value - The flag indicating whether or not page breaks must be shownpublic boolean isShowpagebreaks()
public void setLivedragging(boolean value)
value - The new indicator (true to set live dragging on, false to set it off)public boolean isLivedragging()
public void setShowlegend(boolean value)
value - The new value (True = off (hide legend) False = on (show legend)public boolean isShowlegend()
public void setIndividualoffset(double rhs)
rhs - The new Individual offsetpublic void setGenerationoffset(double rhs)
rhs - The new Generation Offset / Gap in pixels.public double getGenerationoffset()
public double getIndividualoffset()
public void setIconwidth(double width)
width - The new width of the Iconpublic double getIconwidth()
public void setIconheight(double height)
height - The new height of the Iconpublic double getIconheight()
public java.io.File showPedigreeFileDialog(java.lang.String flext,
boolean open)
flext - The file extension for which files to look for. All files with an extension of "flext" will be shown while the rest are filteredopen - Flag indicating whether the file selected is to be opened (read from ) or saved (written to)
public void saveImage(java.lang.String format)
format - The image file format to save to. Can be any one of (png, jpg, gif)
public void saveImageAsStream(java.lang.String format,
java.io.OutputStream out)
format - The image file format to save to. Can be any one of (png, jpg, gif)out - The output stream into which you want the image to be written. If this is
a FileOutputStream, then the image will be written into the file making up
the stream.public void getImage(java.awt.image.BufferedImage[] a_Image)
a_Image - A one element array that into which the generated image will be deposited.public double getImageZoomFactor()
public void setImageZoomFactor(double rhs)
rhs - The new image zoom factorpublic void fitPedigreeToScreen()
public void smartDraw()
SmartDrawServicepublic void setSmartCalcLegend(boolean b)
public void smartHaplotyping()
public java.lang.String findAllele(java.awt.geom.Point2D point)
point - The location at which an Allele Icon or Text are located
public javax.swing.JToolBar getToolBar()
public void showPropertiesDialog(boolean show)
show - If true then dialog will be displayed else it will be created without displayingpublic void showPaletteDialog(boolean show)
show - If true then dialog will be displayed else it will be created without displayingpublic void showLegendDialog(boolean show)
show - If true then dialog will be displayed else it will be created without displayingpublic void showNewAddedText()
public javax.swing.MenuElement[] getPopupMenuElements()
public javax.swing.MenuElement[] getIndividualPopupMenuElements()
public void highlightPerson(Individual aPerson)
aPerson - The Individual to be highlightedpublic void unhighlightPerson(Individual aPerson)
aPerson - The Individual to be un-highlightedpublic int getOldestGeneration()
public int getYoungestGeneration()
public void deleteIndividual(Individual aPerson)
aPerson - The Individual to be deleted
public void addToFamily(Individual aPerson,
Individual a_toPerson)
aPerson - The Individual to be added to the Family
public void importDelimited(java.io.File file,
java.lang.String delimiter,
int[] fields)
file - The text file from which individuals will be importeddelimiter - The character used as field delimiter in the text file.fields - An Array of integers which maps the different data fields positions in the input file. Each
integer value or array index is a pointer to the position or column number for the field to be| Element | Field Type |
|---|---|
| ------- | ---------- |
| 0 | FamilyID |
| 1 | Unique Number (UPN) |
| 2 | Mother ID |
| 3 | Father ID |
| 4 | Gender |
| 5 | Deceased status |
| 6+ | Spouse ID |
public void setGenerations(Individual a_start_person)
a_start_person - The individual for whom generations is to be set.public double getDefGenerationYPos(int generation)
generation - The generation for which a Y grid pos is to be found
public void addPerson(java.lang.String as_personid,
java.lang.String as_relationship,
boolean deceased)
as_personid - The Unique Person Number (UPN) of the Indivdiaul to whom a new relationship is to be addeddeceased - The deceased status of the new Individual to be added. (True = Deceased, False = Alive)as_relationship - The relationship of the Individual being added. It may be any one of :-
RelationshipConstants
public Individual addParent(java.lang.String as_childid,
java.lang.String as_relationship,
boolean deceased)
as_childid - The Unique Person Number (UPN) of the childas_relationship - The type of relationship to the parent being added. This can be specified by the
string RelationshipConstants.FATHER or RelationshipConstants.MOTHERdeceased - String indicating whether person is Dead or alive
public java.lang.String addSpouse(Individual a_person,
boolean deceased)
a_person - The Individual to whom a lSpouse is being addeddeceased - The deceased status of the lSpouse being added
public void connectSpouse(Individual to_spouse,
Individual a_connect_spouse,
boolean liberal)
to_spouse - The lSpouse from whom the operation was initiated. If this method is being called in response
to a mouse drag gesture, this would be the Individual from whose Icon the mouse was dragged.a_connect_spouse - The lSpouse to whom a connection is being made or the 2nd lSpouseliberal - No relationship checking is done if this paremeter is set to true. This may
be necessary when importing data from an external database or source where exception checking
may result in superfluous error checking.
public void connectChild(Individual a_parent,
Individual a_child,
boolean liberal)
a_parent - The parent to whom the child is being connected. If this method is called in response
to a mouse drag gesture, this Individual would be the one from whose Icon the mouse was
dragged.a_child - The Individual to be connected as a child. If this method is called in response
to a mouse drag gesture, this Individual would be the one on whose Icon the mouse was
dropped.liberal - True if no relationship validation is to be done and false otherwise. It may be
important to use liberal when importing data from an external source or database
as the excessive relationship checking during imports may cause unnessary exceptions
to be thrown.
public void connectParent(Individual a_child,
Individual a_parent,
boolean liberal)
a_child - The child to whom a parent is being connected. If this method is called in response
to a mouse drag gesture, this Individual would be the one from whose Icon the mouse was
dragged.a_parent - The parent to whom a child is being connected. If this method is called in response
to a mouse drag gesture, this Individual would be the one on whose Icon the mouse was
dropped.liberal - True if no relationship validation is to be done and false otherwise. It may be
important to use liberal when importing data from an external source or database
as the execssive relationship checking during imports may cause unnessary exceptions
to be thrown.
public boolean connectSibling(Individual to_sibling,
Individual new_sibling,
boolean asTwin,
boolean liberal)
to_sibling - The sibling from whom the connection operation was initiated. If this method is called in response
to a mouse drag gesture, this Individual would be the one from whose Icon the mouse was
dragged.new_sibling - The sibling to whom a connection is being made. If this method is called in response
to a mouse drag gesture, this Individual would be the one on whose Icon the mouse was
dropped.asTwin - True if the Individuals are to be connected as twins, false otherwiseliberal - True if no relationship validation is to be done and false otherwise. It may be
important to use liberal when importing data from an external source or database
as the execssive relationship checking during imports may cause unnessary exceptions
to be thrown.
public Individual addTwin(Individual to_sibling,
java.lang.String as_relationship,
boolean deceased)
to_sibling - The Individual to whom the twin brother or sister is being addedas_relationship - The relationship or sibling being added, sister or brother. This may be any one of :
RelationshipConstants.TWINBROTHER or RelationshipConstants.TWINSISTERdeceased - Whether or not the Individual being added is deceased or alive
public java.lang.String addSibling(java.lang.String as_sibling,
java.lang.String as_relationship,
boolean deceased)
as_sibling - The Individual to whom a new brother or sister is to be addedas_relationship - The relationship of the new sibling to the existing sibling. This may be any one of :
RelationshipConstants.BROTHER or RelationshipConstants.SISTERdeceased - The deceased status of the sibling being added. True means deceased and False means alive
public Individual addChild(java.lang.String as_parentid,
java.lang.String as_relationship,
boolean deceased)
as_parentid - The unique Person Number of the parent to whom a child is to be addedas_relationship - The relationship of the child being added (Daughter / Son). This may be any one of
RelationshipConstants.DAUGHTER or RelationshipConstants.SONdeceased - The deceased status of the child being added
public java.lang.String addUnconnected(java.lang.String gender,
boolean deceased,
double x,
double y)
gender - The gender of the person being added onto the pedigree. This may be any one of
RelationshipConstants.FEMALE_GENDER, RelationshipConstants.MALE_GENDER or
RelationshipConstants.UNKNOWN_GENDERdeceased - The deceased status (dead or alive)x - The X coordinate where the new Individual is to be locatedy - The Y coordintae where the new Individual is to be located
java.lang.Exception - When the add operation is unsuccessful, an exception is thrown which must be caught by the caller
public java.lang.String addUnconnected(java.lang.String upn,
java.lang.String gender,
boolean deceased,
double x,
double y)
upn - The Unique Person Number (UPN) of the new Individualgender - The gender of the person being added onto the pedigree. This may be any one of
RelationshipConstants.FEMALE_GENDER, RelationshipConstants.MALE_GENDER or
RelationshipConstants.UNKNOWN_GENDERdeceased - The deceased status (dead or alive)3x - The X coordinate where the new Individual is to be locatedy - The Y coordintae where the new Individual is to be located
public void showParents(Individual ind)
ind - The Individual whose parents are to be highlightedpublic void showSpouses(Individual ind)
ind - The Individual whose spouses are to be highlightedpublic void showSiblings(Individual ind)
ind - The Individual whose siblings are to be highlightedpublic void showChildren(Individual ind)
ind - The Individual whose kids are to be highlighted
public void highlightRelatives(Individual a_person,
int degree)
a_person - The Individual whose relatives are to be highlighted.degree - The degree of relation or number of hops from specified Individual to the relative. A negative value for "degree" means all relatives will be highlightedpublic void showUncles(Individual ind)
ind - The Individual whose relatives are to be highlighted
public void highlightRelatives(java.lang.String as_upn,
int degree)
as_upn - The UPN of the person whose relatives are to be highlighted.degree - The degree of relation or number of hops from specified Individual to the relative. A negative value for "degree" means all relatives will be highlighted
public void showRelatives(Individual a_person,
int degree,
int direction)
a_person - The individual whose relatives must be highlighteddegree - The degree of relation of relatives to be found. Negative "degree" value means all relatives must
be showndirection - The direction of search determined by the following codes:
| Value | Description |
|---|---|
| 0 | initial search |
| -1 | sideways while exploring siblings. No need to search for siblings or ancestors when a sibling is explored |
| 1 | sideways while exploring siblings. No need to search for siblings or ancestors when a sibling is explored |
| 2 | Updwards in search of ancestors -- No need to seek descendants |
| 3 | Downwards in search of kids -- no need to go back looking for ancestors |
public void showAncestorPath(Individual ind,
int degree)
ind - Individual for whom ancestors are to be shown or highlighteddegree - The degree of relation to search to aClickvent.g. 3rd degree ancestorspublic void showAncestorPath(Individual ind)
ind - Individual for whom ancestors are to be shown or highlightedpublic void showAll()
public void reverseSelect()
public void showDescendantsPath(Individual ind,
int degree)
ind - Individual for whom ancestors are to be shown or highlighteddegree - The degree of relation to search to aClickvent.g. 3rd degree descendantspublic void showDescendantsPath(Individual ind)
ind - The individual whose descendants must be highlightedpublic boolean highlightIndividuals(java.awt.geom.Rectangle2D boundingRec)
boundingRec - The bounding Rectangle that demarcates the area or region with Individuals that may be highlightedpublic void setPrintService(javax.print.PrintService ps)
public void printPedigree(boolean showDialog)
showDialog - True indicates that dialog must be shown, False indicates �do not show dialog�.public boolean pastePedigree()
public void copyWMF()
public boolean copyPedigree()
public java.util.Stack<Individual> getHighlightedindividuals()
public java.lang.String getSelectedIndividuals()
public Individual findPerson(java.awt.geom.Point2D point)
point - The location at which an Individual may be located
public void clearHighlights()
public int getCount()
public void clearPedigree()
public java.lang.String getXMLString()
public java.lang.String getXMLString(boolean includeSubtext)
throws com.objex.panywhere.PedigreeException
includeSubtext - Flag indiicating whether or not Icon subtext must be included as part of the
exported data.
PedigreeException - If system is unable to create the xml output file or if the export procedure fails for one reason or another. Also thrown when XML output that would violate the Progeny XML grammar.
br> then a Pedigree exception will be thrown.
public void exportXML(java.io.File aXMLFile)
throws com.objex.panywhere.PedigreeException
aXMLFile - The xml file handle to which data has to be exported.
PedigreeException - If system is unable to create the xml output file or if the export procedure fails for one reason or another. Also thrown when XML output that would violate the Progeny XML grammar.
public void importXML(java.lang.String xmlFileName)
throws com.objex.panywhere.PedigreeException
ProgenyAnywhere employs two parsers to parse the XML document, a validating parser that expects strict adherence to the grammar provided by the Progeny XML Document Type Definition (DTD), and a non-validating
parser that does not use the external DTD to enforce conformance. For most older xml files generated by ProgenyAnywhere before version 5.0, it is advised that you use the non-validating parser.
If the programmer does not specify whether or not to use the validationg parser, the parser used will be determined as follows:
static {
System.setProperty("com.objex.xml.parser", "non-validating"); //to use non validating parser
}
If you wish to keep track of import events as they happen, register for import events using Pedigree.addImportListener(ImportListener listener)
xmlFileName - The String representing the absoulute pathname of the xml input file to import from.
PedigreeException - If system is unable to create the XML output file or if the export procedure fails for one reason or anotherImportListener
public void importXML(java.io.File xmlFile)
throws com.objex.panywhere.PedigreeException
ProgenyAnywhere employs two parsers to parse the XML document, a validating parser that expects strict adherence to the grammar provided by the Progeny XML Document Type Definition (DTD), and a non-validating
parser that does not use the external DTD to enforce conformance. For most older xml files generated by ProgenyAnywhere before version 5.0, it is advised that you use the non-validating parser.
If the programmer does not specify whether or not to use the validationg parser, the parser used will be determined as follows:
static {
System.setProperty("com.objex.xml.parser", "non-validating"); //to use non validating parser
}
If you wish to keep track of import events as they happen, register for import events using Pedigree.addImportListener(ImportListener listener)
xmlFile - The XML input file handle
PedigreeException - If system is unable to import from the specified XML fileImportListener
public void importXMLString(java.lang.String xmlString)
throws com.objex.panywhere.PedigreeException
ProgenyAnywhere employs two parsers to parse the XML document, a validating parser that expects strict adherence to the grammar provided by the Progeny XML Document Type Definition (DTD), and a non-validating
parser that does not use the external DTD to enforce conformance. For most older xml files generated by ProgenyAnywhere before version 5.0, it is advised that you use the non-validating parser.
If the programmer does not specify whether or not to use the validationg parser, the parser used will be determined as follows:
static {
System.setProperty("com.objex.xml.parser", "non-validating"); //to use non validating parser
}
If you wish to keep track of import events as they happen, register for import events using Pedigree.addImportListener(ImportListener listener)
xmlString - The string of XML data representing an XML document contents.
PedigreeException - If system is unable to import from the specified XML stringImportListenerpublic void importAddedTexts(java.util.List<AddedText> a_addedTextList)
public DataDictionary getDatadictionary()
public void setDatadictionary(DataDictionary rhs)
rhs - New value of property datadictionary.public com.objex.panywhere.IndividualRenderer getIndividualRenderer()
public void setIndividualRenderer(com.objex.panywhere.IndividualRenderer a_renderer)
a_renderer - New value of property individualRenderer.public void dispose()
public final boolean validateSiteLicense(java.applet.AppletContext aAppletContext,
java.lang.String as_isv,
int ai_cutomer_number)
throws com.objex.panywhere.PedigreeException
aAppletContext - The applet Context of the applet from which you are running the control. This has to be provided necessarily for License validation to be successfully doneas_isv - The Independet Software Vendor Name that was allocated to when you were given a site licenseai_cutomer_number - The customer number that was allocated to you when the site license was allocated
com.objex.panywhere.PedigreeException
public void addCustomIndividualSubMenu(javax.swing.JMenu submenu,
boolean ab_showonreadonly,
boolean ab_add_separator)
submenu - The submenu to be displayedab_showonreadonly - If false, the submenu will be added only if the pedigree viewer is running in read and modify modeab_add_separator - If true then a separator will be added before the submenupublic java.lang.String getDefaultFontName()
public void setDefaultFontName(java.lang.String fontname)
fontname - New default font name
public void addCustomIndividualMenuItem(javax.swing.JMenuItem menuitem,
boolean ab_showonreadonly,
boolean ab_add_separator)
menuitem - The menuitem to be displayedab_showonreadonly - If false, the menuitem will be added only if the pedigree viewer is running in read and modify modeab_add_separator - If true then a separator will be added before the menuitem
public final void importSmartDrawPositions(java.lang.String[] am_upns,
double[] am_xc,
double[] am_yc)
am_upns - Array of UPN's for all the people in the pedigreeam_xc - Array of X coordinates. Array indices relate to the indices in upn arrayam_yc - Array of Y coordinates. Array indices relate to the indices in upn arraypublic void addSmartDrawService(SmartDrawService a_smartDrawService)
class ExternalSmartDrawService extends SmartDrawService {
private ProgenyAnywhere m_anywhere;
public ExternalSmartDrawService(ProgenyAnywhere a_anywhere) {
super(a_anywhere);
m_anywhere= a_anywhere;
}
public Map smartDraw() {
if (m_anywhere.getCount() == 0) {//no persons in the pedigree
Map map = new Hashtable();
map.put(1, new String[]{});
map.put(2, new double[]{});
map.put(3, new double[]{});
return map;
}
//Run some algorithm that returns XY positions for the persons in the pedigree
Map map = new Hashtable();
int PERSON_COUNT = 10;
double lm_xd[] = new double[PERSON_COUNT]; //array of x coordinates
double lm_yd[] = new double[PERSON_COUNT]; //array of y coordinates
String lm_local_upns[] = new String[PERSON_COUNT]; //array of person UPNs
for (int xx = 0; xx < lm_local_upns.length; xx++) {
lm_local_upns[xx] = (xx + 1) + ""; //UPN
lm_xd[xx] = xx; //x coordinate determined by my algorithm
lm_yd[xx] = xx + 10; //y coordinate determined by my algorithm
}
map.put(1, lm_local_upns);
map.put(2, lm_xd);
map.put(3, lm_yd);
return map;
}
}
a_smartDrawService - The new external smartdraw servicepublic void setGeneticdataManuallyAssigned(boolean ab_manual)
ab_manual - Whether or not the haplotype information was assigned manually or if it should be calculated using local algorithmpublic void setMarkerLegend(MarkerLegend a_legend)
a_legend - The new marker legend containing names of all the markers on a haplotype.public MarkerLegend getMarkerLegend()
public void hidePopupMenuItem(java.lang.String as_item_text_pattern)
as_item_text_pattern - The substring that is wholy contained in the menu item's item textpublic void hideIndividualPopupMenuItem(java.lang.String as_item_text_pattern)
as_item_text_pattern - The substring that is wholy contained in the menu item's item textpublic void repaint()
public void smartCalcIndividualSpace()
public void clearRepaintArea()
public void addSpouseRelationshipChangeListener(SpouseRelationshipChangeListener listener)
listener - The new SpouseRelationshipChangeListenerpublic void removeSpouseRelationshipChangeListener(SpouseRelationshipChangeListener listener)
listener - The SpouseRelationshipChangeListener to be removedpublic void addTwinRelationshipChangeListener(TwinRelationshipChangeListener listener)
listener - The new TwinRelationshipChangeListenerpublic void addLegendListener(LegendListener listener)
listener - The new legend listenerpublic void removeLegendListener(LegendListener listener)
public void removeTwinRelationshipChangeListener(TwinRelationshipChangeListener listener)
listener - The TwinRelationshipChangeListener to be removedpublic void addIndividualListener(IndividualListener listener)
listener - New individual listenerpublic void removeIndividualListener(IndividualListener listener)
listener - The IndividuaListener to be removedpublic void addPedigreeListener(PedigreeListener listener)
listener - The new PedigreeListenerpublic void removePedigreeListener(PedigreeListener listener)
listener - The PedigreeListener to be removedpublic void addDrawingListener(DrawingListener listener)
listener - DrawingListenerpublic void removeDrawingListener(DrawingListener listener)
listener - The DrawingListener to be removedpublic void removeRelationshipListener(RelationshipListener listener)
listener - The RelationshipListener to be removedpublic void addLineClickListener(LineClickListener listener)
listener - The line click listener to be addedpublic void removeLineClickListener(LineClickListener listener)
listener - The line click listener to be removedpublic void addImageListener(ImageListener listener)
listener - The new ImageListenerpublic void removeImageListener(ImageListener listener)
listener - The ImageListener to be removedpublic void addPedigreePrintListener(PedigreePrintListener listener)
listener - The new printing listenerpublic void removePedigreePrintListener(PedigreePrintListener listener)
listener - The printing listener to be removedpublic void addImportListener(ImportListener listener)
listener - The import listener through which import events are broadcastpublic void removeImportListener(ImportListener listener)
listener - The import listener through which import events are broadcastpublic void addExportListener(ExportListener listener)
listener - The export listener being addedpublic void removeExportListener(ExportListener listener)
listener - The ExportListener to be removedpublic void addIconClickListener(IconClickListener listener)
listener - The new IconClickListener to be addedpublic void removeIconClickListener(IconClickListener listener)
listener - The IconClickListener to be removedpublic void addAboutBoxListener(AboutBoxListener listener)
listener - The new AboutBox listener to be addedpublic void removeAboutBoxListener(AboutBoxListener listener)
listener - The AboutBoxListener to be removedpublic void removeIconClickListeners()
public void addRelationshipListener(RelationshipListener listener)
listener - The new relationship event being addedpublic void addIndividualAddListener(IndividualAddListener listener)
listener - The IndividualAddListener object to be added or registeredpublic void removeIndividualAddListener(IndividualAddListener listener)
listener - The IndividualAddListener to be removedpublic void removeIndividualDeleteListener(IndividualDeleteListener listener)
listener - The individual delete listener to be removed.public void addIndividualDeleteListener(IndividualDeleteListener listener)
listener - The new IndividualDeleteListener to be registeredpublic void setLegendChanged(boolean b)
public boolean isLegendChanged()
public void setBackgroundTemplate(java.net.URL url)
url - The URL of the background template. May be nullpublic void setSubtextEditAllowed(boolean ab_allowed)
ab_allowed - If TRUE then subtext can be edited. Otherwise subtext cannot be edited by clicking on the subtext line.public java.io.File getCurrentXMLFile()
public void setCurrentXMLFile(java.io.File rhs)
public void removeAddedTextListener(AddedTextListener listener)
listener - The individual AddedText listener to be removed.public void addAddedTextListener(AddedTextListener listener)
listener - The new AddedTextListener to be registered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||