com.objex.panywhere
Class ProgenyAnywhere

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

public class ProgenyAnywhere
extends java.lang.Object

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);
    }
 
 

See Also:
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

SUBTEXT_SIBLING_LINE_GAP

public static final 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

See Also:
Constant Field Values

PROBAND_UPPER_LEFT

public static final java.lang.String PROBAND_UPPER_LEFT
See Also:
Constant Field Values

PROBAND_LOWER_LEFT

public static final java.lang.String PROBAND_LOWER_LEFT
See Also:
Constant Field Values

PROBAND_LOWER_RIGHT

public static final java.lang.String PROBAND_LOWER_RIGHT
See Also:
Constant Field Values

PROBAND_UPPER_RIGHT

public static final java.lang.String PROBAND_UPPER_RIGHT
See Also:
Constant Field Values

SUBTEXTLEGEND_GAP

public static final int SUBTEXTLEGEND_GAP
The gap between the leftmost Individual in a generation and the SubtextLegend if any is shown

See Also:
Constant Field Values

ALLELE_TEXT_OFFSET

public static final 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.

See Also:
Constant Field Values

ALLELE_TEXT_ICON_GAP

public static final 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

See Also:
Constant Field Values

PEDIGREE_MODE_VIEWONLY

public static final int PEDIGREE_MODE_VIEWONLY
The pedigree mode in which most of the operations on the Pedigree and/or Individual properties may not be changed. Programmatic changes to the Pedigree can still be done regardless of what view mode the Pedigree is in.

See Also:
Constant Field Values

PEDIGREE_MODE_VIEWANDMODIFY

public static final int PEDIGREE_MODE_VIEWANDMODIFY
The default pedigree mode in which all of the operations on the Pedigree and/or Individual properties are allowed

See Also:
Constant Field Values

m_canvas

public final javax.swing.JPanel m_canvas
The canvas on which the pedigree will be drawn

Constructor Detail

ProgenyAnywhere

public ProgenyAnywhere()
Create new ProgenyAnywhere instance.


ProgenyAnywhere

public ProgenyAnywhere(java.util.Locale aLocale)
Create new ProgenyAnywhere instance.

Parameters:
aLocale - The locale to be used for localization
Method Detail

setPageFormat

public void setPageFormat(javax.print.attribute.PrintRequestAttributeSet aPrintAttribSet)
Use this API method to set the dafeult page format for printing pedigrees.

Parameters:
aPrintAttribSet - The PrintRequest Attributes set that defines the page format for printing pedigrees.

getPageFormat

public java.awt.print.PageFormat getPageFormat()
Returns:
The current page format used for printing pedigrees.

setClientContactInfo

public static void setClientContactInfo(java.lang.String rhs)
Use this function to change the default contact information for problems with the JavaBean. You may want your clients to contact you first when they have problems with the software and for you to then contact progeny. If you do not change this contact information, the Progeny Software contact information will be displayed to them.

Parameters:
rhs - The client contact information

getAlleleDisplayWidth

public double getAlleleDisplayWidth()
Returns:
The maximum width about which to justify Allele text. This value is automatically calculated by the System and will be changed unless the value set by the external system is greater then than any value that may be derived from the calculation using current graphics context and the longest Allele text.

setAlleleDisplayWidth

public void setAlleleDisplayWidth(double aWidth)
Sets the maximum width about which to justify Allele text. This value is automatically calculated by the System and will be changed unless the value set by the external system is greater then than any value that may be derived from the calculation using current graphics context and the longest Allele text. Use this method if you want the Allele text to be wrapped/justified around a longer width than one that could be calculated by the system.

Parameters:
aWidth -

getMarkerDisplayHeight

public double getMarkerDisplayHeight()
Returns:
The display height of each marker in a haplotype bar

setMarkerDisplayHeight

public void setMarkerDisplayHeight(double aHeight)
Parameters:
aHeight - The new height

getMarkerDisplayWidth

public double getMarkerDisplayWidth()
Returns:
The display width of each marker in a haplotype bar

setMarkerDisplayWidth

public void setMarkerDisplayWidth(double aWidth)
Sets the display width of each marker in a haplotype bar

Parameters:
aWidth - The new width

setProbandArrowPos

public void setProbandArrowPos(java.lang.String as_pos)
Sets the position where the proband arrow must be drawn.

Parameters:
as_pos - The new position. Possible values are
  1. ProgenyAnywhere.PROBAND_UPPER_LEFT
  2. ProgenyAnywhere.PROBAND_LOWER_LEFT
  3. ProgenyAnywhere.PROBAND_LOWER_RIGHT
  4. ProgenyAnywhere.PROBAND_UPPER_RIGHT

getProbandArrowPos

public java.lang.String getProbandArrowPos()
Returns:
The current position where the proband arrow is drawn. Possible values are
  1. ProgenyAnywhere.PROBAND_UPPER_LEFT
  2. ProgenyAnywhere.PROBAND_LOWER_LEFT
  3. ProgenyAnywhere.PROBAND_LOWER_RIGHT
  4. ProgenyAnywhere.PROBAND_UPPER_RIGHT

isUseStandardProbandArrow

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

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"

setPedigreeViewMode

public 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. If Pedigree is in view-only mode, then certain operations cannot be performed like adding, deleting and/or changing symbols and iconsubtext. Basically all operations that would change the properties of the Individuals and the Pedigree, including deleting and/or adding relationships become prohibited. The Pedigree icons can still be moved around to make the visibility better. Programmatic changes to the Pedigree can still be done regardless of what view mode the Pedigree is in.

Parameters:
ai_mode - The new mode for the Progeny Anywhere control. Possible values are Pedigree.PEDIGREE_MODE_VIEWONLY and Pedigree.PEDIGREE_MODE_MODIFY
Since:
2.01

isModifiabable

public boolean isModifiabable()
Returns:
TRUE if pedigree is not in read-only mode.

isShowSubtextLegend

public boolean isShowSubtextLegend()
Returns:
True if the subtext legend is to be shown on the Pedigree and false otherwise

setShowSubtextLegend

public void setShowSubtextLegend(boolean rhs)
Set the new value for whether or not subtext legend must be shown


getSubtextLegend

public SubtextLegend getSubtextLegend()
Returns:
The subtext legend for this Pedigree viewer

setSubtextLegend

public void setSubtextLegend(SubtextLegend a_legend)
Sets a new subtext legend for this pedigree

Parameters:
a_legend - The new subtext legend

updateSubtext

public void updateSubtext()
Update subtext for all people in the pedigree. This method must be called if new Data is added to persons or if new subtext legend items are added to the pedigree


updateSubtext

public void updateSubtext(Individual a_person)
Update subtext for specified person. This method must be called if new custom data is added to person

Parameters:
a_person - The person for whom subtext item must be updated in preparation for rendering

updateSymbols

public void updateSymbols()
Assign the legend items in the symbols legend to all the relevant people. If the legend item has at least one condition specified, then only the people whose data matches the legend item condition will have this item assigned to their symbols


assignLegendItem

public void assignLegendItem(Individual a_person,
                             LegendItem a_legend_item)
Assign the legend item to the specified person. The way the legend item is assigned is as follows:-

  1. If the legend item has at least one condition specified, then only the people whose data matches the legend item condition will have this item assigned to their symbols
  2. If the legend item has no conditions specified, then the item will be assigned to every person's symbol

Parameters:
a_person - Person to assign the legend item to.
a_legend_item - The legend item to be assign to the person's symbol

setHideControlProgressMonitors

public void setHideControlProgressMonitors(boolean ab_hide)
Use this method to hide all the progress dialogs that come implemented by the Progeny Anywhere control. You would typically do this if you want to use custome progress monitors that may be specific to your application.

Parameters:
ab_hide - If TRUE then the progress dialogs implemented by this control will not be shown otherwise they will be shown

getDefLocale

public java.util.Locale getDefLocale()
Returns:
The Locale currently set for the control

setScaleHeader

public void setScaleHeader(boolean ab_scale)
Parameters:
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 pedigree

setPedigreescale

public void setPedigreescale(double scale)
Sets the drawing scale for the Pedigree the supplied value. If the operation is unsuccessful of the value former/current value is left unchanged. Scale may be any double value between 0 and 10.

Parameters:
scale - A double value is the drawing scale for this Pedigree

getPedigreescale

public double getPedigreescale()
Returns:
A double value which is current drawing scale within this Family. Default of "1" is returned if value is indeterminate.

setHeader

public void setHeader(java.lang.String rhs)
This function sets the text for the header. The header is displayed at the top left corner of every page.

Parameters:
rhs - The text to set header to

getHeader

public java.lang.String getHeader()
Returns:
Text String which is the footer

setFooter

public void setFooter(java.lang.String rhs)
This function sets the text for the footer. The footer is displayed at the bottom left corner of every page.

Parameters:
rhs - The text to set footer to

getFooter

public java.lang.String getFooter()
Returns:
the footer string if one exists or "" if none exists

setLinewidth

public void setLinewidth(float lwidth)
Sets the linewidth property value

Parameters:
lwidth - The line width specified as a floating point decimal

setLinewidth

public void setLinewidth(java.lang.String as_width)
Sets the linewidth property value. A bigger "lwidth" value causes the line thinkness of lines drawn on the Pedigree to increase.

Parameters:
as_width - The line width specified as a string

getLinewidth

public float getLinewidth()
Retrieves the line width used for drawing Pedigree objects

Returns:
A floating point number which is the line width

setHorizontalgridspacing

public void setHorizontalgridspacing(int gspace)
Set the space between horizontal points on the grid. The larger the horizontal grid spacing, the greater the �jumps� will be when dragging an individual that is snapping to the grid. Using a very small horizontal grid spacing can make the pedigree difficult to read when the grid is displayed. The default is 7.

Parameters:
gspace - The amount of space between stops on the horizontal grid specified as an integer value

setHorizontalgridspacing

public void setHorizontalgridspacing(java.lang.String gspace)
Set the space between horizontal points on the grid. The larger the horizontal grid spacing, the greater the �jumps� will be when dragging an individual that is snapping to the grid. Using a very small horizontal grid spacing can make the pedigree difficult to read when the grid is displayed. The default is 7.

Parameters:
gspace - The amount of space between stops on the horizontal grid specified as a string

setVerticalgridspacing

public void setVerticalgridspacing(java.lang.String gspace)
Set the space between vertical points on the grid. The larger the vertical grid spacing, the greater the �jumps� will be when dragging an individual that is snapping to the grid. Using a very small vertical grid spacing can make the pedigree difficult to read when the grid is displayed. The default is 27.

Parameters:
gspace - The amount of space between stops on the vertical grid speciefied as a string value

setVerticalgridspacing

public void setVerticalgridspacing(int gspace)
Set the space between vertical points on the grid. The larger the vertical grid spacing, the greater the �jumps� will be when dragging an individual that is snapping to the grid. Using a very small vertical grid spacing can make the pedigree difficult to read when the grid is displayed. The default is 27.

Parameters:
gspace - The amount of space between stops on the vertical grid speciefied as an Integer value

getVerticalgridspacing

public int getVerticalgridspacing()
Retrieves the Vertical grid spacing specified for this Pedigree

Returns:
int An integer value

getHorizontalgridspacing

public int getHorizontalgridspacing()
Retrieves the Horizontal grid spacing specified for this Pedigree

Returns:
int An integer value

setShowhooks

public void setShowhooks(boolean showhooks)
Set or unsets the flag proprty for shwoing hooks.

Parameters:
showhooks - Boolean value indicating whethere or not to show hooks

isShowhooks

public boolean isShowhooks()
Determines whether hooks should be shown or hidden as speciffied by the showhooks property

Returns:
True if hooks to be shown and false otherwise

setShowblueid

public void setShowblueid(boolean showid)
Set the blue ID number to visible or invisible for all the individuals in the pedigree. If turned on this number displays the left to right order of each individual within a generation. Currently, the UPN is dispalyed in place of the Blue ID Number.

Parameters:
showid - True if no is to be shown, false otherwise

isShowblueid

public boolean isShowblueid()
Returns:
True if BlueID is to be shown, false otherwise. Java control uses this field to show/hide The UPN of an Individual instead as it does not use a Blue ID number

setShowDate

public void setShowDate(boolean showdate)
Flag indicating whether or not to show the date in the top left corner of the pedigree. The date is displayed under the heading for the pedigree.

Parameters:
showdate - True if date is to be shown , false otherwise

isShowDate

public boolean isShowDate()
Returns:
True if date to be shown, false otherwise

setMatchspouses

public void setMatchspouses(boolean match)
Sets or unsets the flag indicating whether or not the spouses must be kept close together.

Parameters:
match - True if spouses are to be kept close to each other, false otherwise

isMatchspouses

public boolean isMatchspouses()
Returns:
True if spouses are to be kept together , false otherwise

setPulllonerelatives

public void setPulllonerelatives(boolean rhs)
Sets the new value of property "pulllonerelatives". Set this to true if siblings and spouses that have no other relationship must be pulled close together with their other spouses.


isPulllonerelatives

public boolean isPulllonerelatives()
Getter for property "pulllonerelatives".

Returns:
True if siblings and spouses that have no other relationship must be pulled close together with their other spouses/relatives.

setIconsubtextfont

public void setIconsubtextfont(java.awt.Font font)
Sets the font for the icon subtext.

Parameters:
font - The font to be used in drawing Icon subtext

getIconsubtextfont

public java.awt.Font getIconsubtextfont()
Returns:
Font The current value of the Icon subtext font property

setPedigreeSize

public void setPedigreeSize(java.awt.Dimension size)
Change the dimensions of the Pedigree canvas. This method is preferable to setSize() or setPreferredSize() methods inherited from the JPanel superclass of this class.

Parameters:
size - The new Dimension representing the size to which the the pedigree must be set

setMenuDelay

public void setMenuDelay(int rhs)
Sets the user prefences for the Menu Transition Delay. The menu transition delay is used to make transations from one element of the GUI (windows0 as smooth as possible byt allowing the Windows to be hidden before the next activity is executed.

Parameters:
rhs - The new value for the menu transition delay

getHomeDirectory

public java.lang.String getHomeDirectory()
Returns:
The current home directory / folder for the current user. If problems are encountered with the retrieval of the homedir, a default of the root folder of the system will be returned

setCurrentFileHandle

public void setCurrentFileHandle(java.io.File rhs)
Sets the current file handle to the new value

Parameters:
rhs - The new file handle or null

setImportFile

public void setImportFile(java.io.File a_file)
Sets the import file handle to the new value

Parameters:
a_file - The new file handle or null

savePedigree

public void savePedigree(java.io.File a_file)
Writes the current pedigree state to a file. Only those properties of the pedigree that are definitely required to reconstruct the state of the pedigree are
written/serialized to the file.

Parameters:
a_file - The output file object

savePedigree

public void savePedigree(java.lang.String as_filename)
Writes the current pedigree state to a file. Only those properties of the pedigree that are definitely required to reconstruct the state of the pedigree are
written/serialized to the file.

Parameters:
as_filename - The name of the output file

readPedigree

public 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)

Parameters:
a_file - The input file

getFamily

public Family getFamily()
Returns:
The family object for the current pedigree. Family object maintains alist all the people in the pedigree.

moveToIndividual

public void moveToIndividual(Individual a_person)
Scrolls the Pedigree viewport to the specified Individual if the Individual is not within view already. If Individual is already located within the view, the Icon is just highlighted but no scrolling actually happens.

Parameters:
a_person - The Individual to be brought into view

setLegend

public void setLegend(Legend legend)
Sets the new symbols legend

Parameters:
legend - The new symbols legend

getLegend

public Legend getLegend()
Gets the current symbols legend

Returns:
The current symbols legend

setCreationDate

public void setCreationDate(java.util.Date d)
Sets the date on which the Pedigree was created

Parameters:
d - The new date object

getCreationDate

public java.util.Date getCreationDate()
Gets the date on which the Pedigree was created

Returns:
The date on which the Pedigree was created

getChildlineheight

public double getChildlineheight()
Gets and returns the length of the child line for this Pedigree. Child line length (height) is always measured against the generational offset set for the Pedigree and increases or decreases as the generational offset increases or decreases.

Returns:
A double value representing the length of a child line

setChildlineheight

public void setChildlineheight(double clh)
Sets the value of childlineheight to a new value. This value determines where the sibling line will be rendered. By default, this value == generationoffset / 2 but can be changed to suit the environment. The minimum value is calculated as follows : (getIconheight()/2) <= clh <= (getGenerationoffset() - getIconheight())


setSubtextyvalue

public void setSubtextyvalue(double yvalue)
Sets the relative positioning of the Icon subtext. The value is measured from the to left corner of the icon representing an Individual.

Parameters:
yvalue - A double represeting the offset, measured from the icon top left corner.

getSubtextyvalue

public double getSubtextyvalue()
Retrieves the relative positioning of the Icon subtext. The value is measured from the top left corner of the icon representing an Individual.

Returns:
A double value which is the position of the subtext relative to the Individual Icon's position

getDepthoffset

public 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. This normally happens when a group of siblings from one family is enclosed within another family into which at one of the siblings ha married. In this case, the sibling line is dropped by the amount of depth offset to avoid the lines from being drawn co-linear with one another.


fitPedigreeToPage

public 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. The next print job soon after this command will be such that the pedigree is scaled down to fit on one page.

Parameters:
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 settings

getMinX

public double getMinX()
Returns the minimum X coordinate on which the left-most Individual's Icon is placed placed. By controlling this value, the programmer/user can determine the left margin for the Pedigree, ensuring that no Individual is placed on the left of the te left margin.

Returns:
The current value of the "minimumX" property

setMinY

public void setMinY(double min)
Sets the minimum Y coordinate on which the top most Individual's Icon can be placed. This coordinate ensures that the Icons are placed below such things as the Header, dates and legend which may be painted at the top of the Pedigree screen. If during adding and painting an Individual is placed at a Y-coordinate smaller than minimumY, then an adjustment of all Icons' Y coordinates follows to position the top most one at Minimum Y.

Parameters:
min - The new value for "minimumY" property

setMinX

public void setMinX(double min)
Sets the minimum X coordinate on which the left-most Individual's Icon is placed placed. By controlling this value, the programmer/user can determine the left margin for the Pedigree, ensuring that no Individual is placed on the left of the te left margin.
If an Individual's Icon is placed to the left of this value, all Individuals will be shifted to the right such that at the end of the shifting, the left most Individual is positioned at X-coordinate == "minumumX".

Parameters:
min - The new value for "minimumX" property

getMinY

public double getMinY()
Returns the minimum Y coordinate on which the top most Individual's Icon can be placed. This coordinate ensures that the Icons are placed below such things as the Header, dates and legend which may be painted at the top of the Pedigree screen. If an Individual is placed at a Y-coordinate smaller than minimumY, then all Individuals Icons are shifted downwards so that the top most Individual is positioned at Y-Coordinate == "minimumY".

Returns:
The current value of the property "minimumY"

getLastMouseLocation

public java.awt.geom.Point2D getLastMouseLocation()
Returns the lastest location of a mouse click.


setScale

public void setScale(double scalex,
                     double scaley)
Sets the drawing scale in the both the X and Y direction to the value supplied. The objects on the Pedigree will be scaled or transformed by the margins specified. The next time painting is performed, the scale will take effect. A scale of "1" means that objects will be drawn at the normal size. Smaller icon sizes can be achieved with fractional values of scale. For standard Pedigrees where the Individual icon is supposed to be a square, it is advisable to keep the y-Scale and the X-Scale the same.

Parameters:
scaley - The new scaling factor in the Y direction
scalex - The new scaling factor in the X direction

getScaleX

public double getScaleX()
Returns the current drawing scale in the X-direction. A scale of "1" means that objects will be drawn at the normal size. Smaller icon sizes can be achieved with fractional values of scale.

Returns:
The current scaling factor in the X direction

getScaleY

public double getScaleY()
Returns the current drawing scale in the Y-direction. A scale of "1" means that objects will be drawn at the normal size. Smaller icon sizes can be achieved with fractional values of scale.

Returns:
The current scaling factor in the Y direction

setShowfooter

public void setShowfooter(boolean show)
Sets or unsets the flag indicating whether or not to show the footer at the bottom of every page

Parameters:
show - The new flag. A value of True will set the flag, false will unset the flag.

isShowfooter

public boolean isShowfooter()
Returns:
True if the footer is to be shown/displayed at the bottom of each page, and false otherwise.If the software is in evaluation mode, then the return value will be true no matter what

setShowheader

public void setShowheader(boolean show)
Sets or unsets the flag indicating whether or not to show the header at the top of every page

Parameters:
show - The new flag. A value of True will set the flag, false will unset the flag.

isShowheader

public boolean isShowheader()
Returns:
True if the header is to be shown/displayed at the top of each page, and false otherwise. If the software is in evaluation mode, then the return value will be true no matter what

setShowhaplotypes

public void setShowhaplotypes(boolean ab_showhap)
Sets the property showhaplotypes to specified value. If set to TRUE then any haplotype data that the Individuals might have will be shown on the Pedigree.

Parameters:
ab_showhap - The new value for property showhaplotypes

isShowhaplotypes

public boolean isShowhaplotypes()
Returns:
True if Haplotypes must be shown and false if the haplotype bars must be hidden

setAutodraw

public void setAutodraw(boolean rhs)
Set the autodraw option to on or off. The autodraw option automatically runs a smartDraw() operation after adding an individual to the pedigree.

Parameters:
rhs - Boolean indicating whether or not to autodraw.

isAutodraw

public boolean isAutodraw()
Returns the current value of the autodraw property. If value returned is true, then smartDraw() algorithm is executed each time a new Individual is added to the Pedigree.

Returns:
True if auto draw is set, False otherwise.

setImportShadow

public void setImportShadow(boolean rhs)
Currently NOT USED


isImportShadow

public boolean isImportShadow()
Currently NOT USED


setShowgrid

public void setShowgrid(boolean value)
Sets or unsets the flag indicating whether or not grids must be displayed on the Pedigree. Note snapping to grid can still happen even if grids are not displayed.

Parameters:
value - A new value of the showgrid property. A value of "TRUE" will set it and false will unset the flag.

setOneclickadd

public void setOneclickadd(boolean value)
Set the �one click add� option to on or off. The one click-add option allows the user to add individuals to the pedigree via the mouse buttons without using the palette.

Parameters:
value - New indicator (True to set it on, false to shut it off)

isOneclickadd

public boolean isOneclickadd()
Gets the value of the �one click add�. The one click-add option allows the user to add individuals to the pedigree via the mouse buttons without using the palette.

Returns:
The value indicator (True if on and false othwerwise)

isShowgrid

public boolean isShowgrid()
Returns:
True if grids are to be shown, false otherwise

setSnaptogrid

public void setSnaptogrid(boolean value)
Sets "snaptogrid" property to true or false depending on the value passed. When set, this property causes Individuals to be drawn on the nearest grid. Note that snapping to grid may happen even if the grids are not shown / displayed.

Parameters:
value - If true then Icons will be snapped to the closest grid position during drawing

isSnaptogrid

public boolean isSnaptogrid()
Returns:
True if Icons are to be snapped to the closest grid during drawing and false otherwise.

setShowpagebreaks

public void setShowpagebreaks(boolean value)
When the control is first initialized, it examines the default printer and determines the page size. Using the page size, setShowpagebreaks() allows the user to display the page breaks on the screen. Blue dotted lines clearly show where one page ends and the next one begins. This can be helpful in getting a large pedigree to fit on single page or in insuring that no individual is split between two pages.

Parameters:
value - The flag indicating whether or not page breaks must be shown

isShowpagebreaks

public boolean isShowpagebreaks()
Returns:
A boolean indicating whether or not page breaks must be shown (True if pages breaks are to be shown, false otherwise)

setLivedragging

public void setLivedragging(boolean value)
Sets the "livedragging" property to true or on. If livedragging is set to on, then the Icons being dragged will be livedrawn -- Icons and lines will be shifted simultaneously with the dragging operation as opposed to the surrogates of Icons being drawn in potential Icon positions.

Parameters:
value - The new indicator (true to set live dragging on, false to set it off)

isLivedragging

public boolean isLivedragging()
Returns:
True if live dragging is on and false otherwise.

setShowlegend

public void setShowlegend(boolean value)
Turns the display of the legend on or off. If turned on, the legend will be displayed, otherwise no legend is diaplyed.

Parameters:
value - The new value (True = off (hide legend) False = on (show legend)

isShowlegend

public boolean isShowlegend()
Returns the current value of the property showlegend.

Returns:
The current value of the showlegend (True = off (hide legend) False = on (show legend) If there are no legend items, then showlegend will always return a value of false.

setIndividualoffset

public 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. This distance is measured from the top left createPedPrinter-coordinate of the Individual Icon's current location. Ceteris parabis, the next Individual in this generation will be placed at a position such that Icon.createPedPrinter = previous Individual's Icon.createPedPrinter + Individualoffset. This value may not be smaller than or equal to Icon width and any attempt to make it so will be ignored.

Parameters:
rhs - The new Individual offset

setGenerationoffset

public void setGenerationoffset(double rhs)
Sets the gap/distance between one generation and the next. Icons for Individuals in adjacent generations will be separated by the value set.

Parameters:
rhs - The new Generation Offset / Gap in pixels.

getGenerationoffset

public double getGenerationoffset()
Returns:
The current value of the generation offset. Icons for Individuals in adjacent generations will be separated by the value set.

getIndividualoffset

public double getIndividualoffset()
Returns the amount of space between one Individual and the next Individual within the same generation in the increasing X-direction. This distance is measured from the top left createPedPrinter-coordinate of the Individual Icon's current location. Ceteris parabis, the next Individual in this generation will be placed at a position such that Icon.createPedPrinter = previous Individual's Icon.createPedPrinter + Individualoffset.

Returns:
The current value of the Individualoffset property -- a double value

setIconwidth

public void setIconwidth(double width)
Sets the value of the current Icon width. All Icons will be drawn with the width specified until a new one is set.

Parameters:
width - The new width of the Icon

getIconwidth

public double getIconwidth()
Returns:
The current value of the Icon width. Individual Icons within the Pedigree are drawn using the current value returned by this method.

setIconheight

public void setIconheight(double height)
Sets the height of the Icon that represents an Individual in a Pedigree.

Parameters:
height - The new height of the Icon

getIconheight

public double getIconheight()
Returns:
The height of an Icon represeting an Individual within a Pedigree.

showPedigreeFileDialog

public 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. if the user selects files or saves into a folder other than the default home directory, the homedirectory preference for the control is automatically changed to be equal to this new folder.

Parameters:
flext - The file extension for which files to look for. All files with an extension of "flext" will be shown while the rest are filtered
open - Flag indicating whether the file selected is to be opened (read from ) or saved (written to)
Returns:
a File handle for the file chosen / selected or null

saveImage

public void saveImage(java.lang.String format)
This function saves the pedigree that the control currently holds to image format specified. It is similar to taking a screen shot of the pedigree and saving it to JPEG/PNG or GIF. The only difference is that if the pedigree extends off the screen, the save function will include the entire pedigree. The size of the image file depends on the size of the pedigree. If the size of the image is too big, it is scaled down to a width of 5 X 800 pixels wide and 5 * 800 pixes height to avoid running into memory problems.

Parameters:
format - The image file format to save to. Can be any one of (png, jpg, gif)

saveImageAsStream

public void saveImageAsStream(java.lang.String format,
                              java.io.OutputStream out)
This function saves the pedigree that the control currently holds to image format specified. It is similar to taking a screen shot of the pedigree and saving it to JPEG/PNG or GIF. The only difference is that if the pedigree extends off the screen, the save function will include
the entire pedigree. The size of the image file depends on the size of the pedigree. If the size of the image is too big, it is scaled down to a width of 5 X 800 pixels wide and 5 * 800 pixes height to avoid running into
memory problems. Note that the method returns immediately even before the image has been fully return to the stream. All that this method does is submit a request for the image to be written to the specified stream and it returns
immediately thereafter. It is highly recommended that the user checks if the stream has been closed and/or exhausted before assuming that the whole image has been received.

Parameters:
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.

getImage

public void getImage(java.awt.image.BufferedImage[] a_Image)
Generate an image and store it in the supplied one element Array. The invoker will of necessity supply the image array and extract the image from this array once the necessary events signifying the generation of the images have been received. When the image is available, a Pedigree ImageEvent is generated and the method imageGenerated is fired. Invokers of this method may therefore also get the generated image by invoking the method ImageEvent.getImage(). If the generation of the image failed, the ImageEvent method ImageEvent.imageFailed() is fired instead. Note: Method returns immediately hence monitoring of image availabililty may be done using the event system specified above.

Parameters:
a_Image - A one element array that into which the generated image will be deposited.

getImageZoomFactor

public double getImageZoomFactor()
Returns the current value for the largest image size zoom factor. The image zoom factor determines the largest image size that can be generated by the Pedigree depending on memory availabilty. The actual largest image size is found by the following formula:- size = Pedigree.getMinimumSize().width * imageZoomFactor If the system has more memory, it may be appropriate to increase the zoom factor so that larger pedigree images (jpeg, png etc) can be created. If the pedigree currently fills a component that is greater than the result of "size" detemined above, the pedigree image will be scaled down using the following formula :- image graphics scale = Pedigree.getSize().width / (Pedigree.getMinimumSize().width * imageZoomFactor) So when the painting is done, the graphics object Affine Transform or scale will be set to the scale factor determined above.

Returns:
A double value representing the current image zoom factor

setImageZoomFactor

public void setImageZoomFactor(double rhs)
Sets a new value for the largest image size zoom factor. The image zoom factor determines the largest image size that can be generated by the Pedigree depending on memory availabilty. The actual largest image size is found by the following formula:- size = Pedigree.getMinimumSize().width * imageZoomFactor If the system has more memory, it may be appropriate to increase the zoom factor so that larger pedigree images (jpeg, png etc) can be created. If the pedigree currently fills a component that is greater than the result of "size" detemined above, the pedigree image will be scaled down using the following formula :- image graphics scale = Pedigree.getSize().width / (Pedigree.getMinimumSize().width * imageZoomFactor) So when the painting is done, the graphics object Affine Transform or scale will be set to the scale factor determined above.

Parameters:
rhs - The new image zoom factor

fitPedigreeToScreen

public 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. The scale is only changed downwards if the size of the pedigree is greater than the size of the viewport at the time of executing this method. An automatic repaint is done after the scale has been set.


smartDraw

public void smartDraw()
This method excutes the drawing algorithm that calculates the most appropriate positions for each person in the pedigree. This internal smartDraw() is only executed iff the user of ProgenyAnywhere has notr created a custom smart draw service, otherwise the external smartdraw service will be used.

See Also:
SmartDrawService

setSmartCalcLegend

public void setSmartCalcLegend(boolean b)
Sets the property smartCalcLegend to supplied parameter. When set, the legend is positioned using a smart algorithm instead of just positioning it where it may.


smartHaplotyping

public void smartHaplotyping()
Runs the haplotying algorithm which assigns colors to Alleles starting at Root (no parent) Individuals going downwards to the descendants. This algorithm depends on the positions of Individuals having been calcualted
and assigned, hence must be done after the smartDraw() algorithm has been run. Adopted individuals are also considered as roots for the purposes of genetic inheritance


findAllele

public java.lang.String findAllele(java.awt.geom.Point2D point)
Finds an Alelle that is located at a location specified by argument "point"

Parameters:
point - The location at which an Allele Icon or Text are located
Returns:
A string that represents the UPN of the Individuals whose Allele was found, the Marker ID / name of the Marker that on which the found Allele exists, the Allele ID/Text, and a "0" if the point is closer to the Allele Text and a "1" of the if the point is inside the Allele Icon such Allele is found at the location. E.g. If the mouse was clicked on or near Allele Text/ID for an Allele with ID == "220" on marker with name "MAREKER1" and the Individual on whom the chromosome with such marker is found has a UPN of "100", the method will return the following string 100;CHROMOID1;MARKER1;220;0;Paternal If instead the Allele Icon was clicked the the return string would be 100;CHROMOID1;MARKER1;220;1;Paternal A NULL string is returned if no Allele was found at such location.
Since:
Introduced ver1.01

getToolBar

public javax.swing.JToolBar getToolBar()
Creates and/or gets a tool bar object that contains the common functions or actions buttons for the pedigree. If a toolbar object already exists, it is displayed else a new tool bar is created and then returned to the caller. This method is convenient in as far as it allows the programmer to call extract the fully constructed tool bar and display it in their application or to further extract the individual action buttons from the tool bar and then add them to a more generic tool bar for his/her application.

Returns:
A JToolBar object with the common pedigree action buttons

showPropertiesDialog

public void showPropertiesDialog(boolean show)
Creates and/or displays the properties dialog box

Parameters:
show - If true then dialog will be displayed else it will be created without displaying

showPaletteDialog

public void showPaletteDialog(boolean show)
Creates and /or displays the Palette dialog box

Parameters:
show - If true then dialog will be displayed else it will be created without displaying

showLegendDialog

public void showLegendDialog(boolean show)
Creates and /or displays the Legend Dialog dialog box

Parameters:
show - If true then dialog will be displayed else it will be created without displaying

showNewAddedText

public void showNewAddedText()
Creates a new AddedText in the client. It is not saved until text is entered and focus is lost.


getPopupMenuElements

public javax.swing.MenuElement[] getPopupMenuElements()
Returns:
An array of MenuElement items for the Main popup menu. This method is useful in situations where you need to customize the elements that must show or are hidden for the popup menu. You can traverse the array of menu elements and hide or show the respective menu elements as desired.

getIndividualPopupMenuElements

public javax.swing.MenuElement[] getIndividualPopupMenuElements()
Returns:
An array of MenuElement items for the Individual popup menu. This method is useful in situations where you need to customize the elements that must show or are hidden for the popup menu. You can traverse the array of menu elements and hide or show the respective menu elements as desired.

highlightPerson

public void highlightPerson(Individual aPerson)
Sets the Individual "aPerson"'s highlighted status to true. The next time the Pedigree is painted this Individual will be drawn highlighted

Parameters:
aPerson - The Individual to be highlighted

unhighlightPerson

public void unhighlightPerson(Individual aPerson)
Removes highlights from specified person. The next time the pedigree is painted this person's icon will be drawn without the yellow highlights

Parameters:
aPerson - The Individual to be un-highlighted

getOldestGeneration

public int getOldestGeneration()
Returns the generation of the Individual(s) that are at the highest level in the family tree. Note that the return value will be smaller than the return value returned by getYoungestGeneration() as those individuals lower in the family tree have a higher value for their generation.

Returns:
Generation for the highest level Individual(s) or -1

getYoungestGeneration

public int getYoungestGeneration()
Returns the generation of the Individual(s) that are at the lowest level in the pedigree. Note that the return value will be bigger than the return value returned by getOldestGeneration() as those individuals higher up in the family tree have a lower value for their generation.

Returns:
Generation for the lowest level Individual(s) or -1

deleteIndividual

public void deleteIndividual(Individual aPerson)
Delete an individual from a Pedigree and clears all his/her relationships. Must ideally be called from the event dispatch thread to avoid thread syncronization issues.

Parameters:
aPerson - The Individual to be deleted

addToFamily

public void addToFamily(Individual aPerson,
                        Individual a_toPerson)
Add Individual passed as parameter to the family. Whenever changes that must persist have been made to an Individual, this method must be called so that the Individual object's properties are saved.

Parameters:
aPerson - The Individual to be added to the Family

importDelimited

public 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. The data format and delimter text is to be specified as described below. The current pedigree is cleared before new data is imported.

Parameters:
file - The text file from which individuals will be imported
delimiter - 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
retrieved as specified in the table below. A value of -1 in any array position means that that field either does not exist in the input file or must be skipped even if it exists. The minimum
size for this array must be six hence the input file may not have less than six data columns. There is no maximum.
Element Field Type
-----------------
0 FamilyID
1 Unique Number (UPN)
2 Mother ID
3 Father ID
4 Gender
5 Deceased status
6+ Spouse ID


If any one of these fields does not exist or is to be skipped, a value of -1 must be slotted. aClickvent.g if there is no familyID field then the element 0 of the fields array must be -1. If an Individual has
three spouses then fields[6], fields[7] and fields[8] will have values other then -1. If the largest number of spouses is 3 then the fields array will be of length 8. The minimum length of array fields is
six (6) and there is no maximum since the rest of the length depends of number of spouses.

setGenerations

public 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. If person "a_start_person" has an ancestor, that ancestor will be obtained and then the setting of generations
for all the rest of the descendants is done relative to this ancestor. It calls method (updateKidsGen(lChild, generation)) which recursively sets the generations of the Descendents of "ind"'s root. Central to the functioning of this method is the fact that
before it is called, the Individuals "setTraversed()" method must be called on all Individuals to intialize this property to false. As the setting of generations progresses, the method "setTraversed()" is called with an argument of "true" to indicate that the generation has been set for that Individual.

Parameters:
a_start_person - The individual for whom generations is to be set.

getDefGenerationYPos

public double getDefGenerationYPos(int generation)
Get Y coordinate given a generation. After a smartDraw, the person's icon's position will have a Y coordinate identical to that of the generation marker.

Parameters:
generation - The generation for which a Y grid pos is to be found

addPerson

public 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. This method makes calls to the appropriate addXXX methods depending on the relationship specified where XXX may be any one of addParent(), addChild(), addSpouse(), addSibling() or addTwin().

Parameters:
as_personid - The Unique Person Number (UPN) of the Indivdiaul to whom a new relationship is to be added
deceased - 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 :-
  1. RelationshipConstants.MOTHER
  2. RelationshipConstants.FATHER
  3. RelationshipConstants.DAUGHTER
  4. RelationshipConstants.SON
  5. RelationshipConstants.SISTER
  6. RelationshipConstants.BROTHER
  7. RelationshipConstants.TWINSISTER
  8. RelationshipConstants.TWINBROTHER
  9. RelationshipConstants.SPOUSE
See Also:
RelationshipConstants

addParent

public Individual addParent(java.lang.String as_childid,
                            java.lang.String as_relationship,
                            boolean deceased)
Add a parent to an existing child. If child already had one parent prior to this operation, the new parent will necessarily become the lSpouse of the existing parent. If child had siblings prior to this operation, the new parent also becomes a parent to the existing siblings. An Individual may not have a 2nd mother and/or father added.

Parameters:
as_childid - The Unique Person Number (UPN) of the child
as_relationship - The type of relationship to the parent being added. This can be specified by the string RelationshipConstants.FATHER or RelationshipConstants.MOTHER
deceased - String indicating whether person is Dead or alive
Returns:
The new parent if added or null if operation was unsuccessful

addSpouse

public java.lang.String addSpouse(Individual a_person,
                                  boolean deceased)
Add a spouse to an existing Individual. If the lSpouse has existing children and no other lSpouse, then the lSpouse being added will become the second parent (mother or father depending on gender) to those children.

Parameters:
a_person - The Individual to whom a lSpouse is being added
deceased - The deceased status of the lSpouse being added
Returns:
The Unique Person Number (UPN) of added lSpouse or empty string if lSpouse was not successfully added for any reason

connectSpouse

public void connectSpouse(Individual to_spouse,
                          Individual a_connect_spouse,
                          boolean liberal)
Connects individuals existing in a pedigree to become each other's spouses. The two individuals may be in the same tree or in different trees. If the two Individuals are in different sub-trees, the operation results in the two subtrees being joined together into one tree. If the two Individuals being connected had kids and no other spouses prior to this operation, all their kids will become siblings, with the two connected spouses as their parents.

Parameters:
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 lSpouse
liberal - 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.

connectChild

public 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.

Parameters:
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.

connectParent

public 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.

Parameters:
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.

connectSibling

public 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. If the two Individuals are in same tree, the only permissible operation is adding them together as twins in which case they have to have been siblings prior to this this operation The sibling to whom the connection is being made may not have any parents at the time of connection.

Parameters:
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 otherwise
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.
Returns:
True if successful and false otherwise

addTwin

public Individual addTwin(Individual to_sibling,
                          java.lang.String as_relationship,
                          boolean deceased)
Add a twin brother or twin sister to an existing Individual.

Parameters:
to_sibling - The Individual to whom the twin brother or sister is being added
as_relationship - The relationship or sibling being added, sister or brother. This may be any one of : RelationshipConstants.TWINBROTHER or RelationshipConstants.TWINSISTER
deceased - Whether or not the Individual being added is deceased or alive
Returns:
The new Individual just added or null if operation was unsuccessful

addSibling

public 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. The following must happen - create a new sibling - update the details common to all siblings such as parents, generation etc for the sibling - update the parents and other relationships - update all the existing siblings relationships

Parameters:
as_sibling - The Individual to whom a new brother or sister is to be added
as_relationship - The relationship of the new sibling to the existing sibling. This may be any one of : RelationshipConstants.BROTHER or RelationshipConstants.SISTER
deceased - The deceased status of the sibling being added. True means deceased and False means alive
Returns:
The Unique Person Number (UPN) of the new sibling or an empty string if unsuccessful.

addChild

public 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

Parameters:
as_parentid - The unique Person Number of the parent to whom a child is to be added
as_relationship - The relationship of the child being added (Daughter / Son). This may be any one of RelationshipConstants.DAUGHTER or RelationshipConstants.SON
deceased - The deceased status of the child being added
Returns:
The new Individual just added as child or null if unsuccessful.

addUnconnected

public java.lang.String addUnconnected(java.lang.String gender,
                                       boolean deceased,
                                       double x,
                                       double y)
Add an unconnected Individual to the Pedigree. Each time this method is called, a new subtree is creaated and the Individual will be added to the highest generation available.

Parameters:
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_GENDER
deceased - The deceased status (dead or alive)
x - The X coordinate where the new Individual is to be located
y - The Y coordintae where the new Individual is to be located
Returns:
The Unique Person Number (UPN) of the new Individual just added or an empty string
Throws:
java.lang.Exception - When the add operation is unsuccessful, an exception is thrown which must be caught by the caller

addUnconnected

public 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. Each time this method is called, a new subtree is creaated and the Individual will be added to the highest generation available.

Parameters:
upn - The Unique Person Number (UPN) of the new Individual
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_GENDER
deceased - The deceased status (dead or alive)3
x - The X coordinate where the new Individual is to be located
y - The Y coordintae where the new Individual is to be located
Returns:
The Unique Person Number (UPN) of the new Individual just added or an empty string

showParents

public void showParents(Individual ind)
Highlights the Individual "ind's" parents

Parameters:
ind - The Individual whose parents are to be highlighted

showSpouses

public void showSpouses(Individual ind)
Highlights the Individual "ind's" spouses

Parameters:
ind - The Individual whose spouses are to be highlighted

showSiblings

public void showSiblings(Individual ind)
Highlights the Individual "ind's" siblings

Parameters:
ind - The Individual whose siblings are to be highlighted

showChildren

public void showChildren(Individual ind)
Highlights the children of Individual a_person

Parameters:
ind - The Individual whose kids are to be highlighted

highlightRelatives

public 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.
If the system is in One Click Add (OCA) mode, then the OCA handles will also be shown and may be used to add relations to the highlighted Individual.

Parameters:
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 highlighted

showUncles

public void showUncles(Individual ind)
Highlights all the relatives of this Individual depending on degree of relation chosen. Yellow highlight squares will be drawn around each relative's Icon.

Parameters:
ind - The Individual whose relatives are to be highlighted

highlightRelatives

public 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.
If the system is in One Click Add (OCA) mode, then the OCA handles will also be shown and may be used to add relations to the highlighted Individual.

Parameters:
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

showRelatives

public 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.

Parameters:
a_person - The individual whose relatives must be highlighted
degree - The degree of relation of relatives to be found. Negative "degree" value means all relatives must be shown
direction - The direction of search determined by the following codes:
Value Description
0 initial search
-1sideways while exploring siblings. No need to search for siblings or ancestors when a sibling is explored
1sideways while exploring siblings. No need to search for siblings or ancestors when a sibling is explored
2Updwards in search of ancestors -- No need to seek descendants
3Downwards in search of kids -- no need to go back looking for ancestors

showAncestorPath

public void showAncestorPath(Individual ind,
                             int degree)
Shows and highlights the specified Individual's ancestors at the degree of relation specified

Parameters:
ind - Individual for whom ancestors are to be shown or highlighted
degree - The degree of relation to search to aClickvent.g. 3rd degree ancestors

showAncestorPath

public void showAncestorPath(Individual ind)
Highlights all the ancestors of the specified individual -- showing the path from this individual to the top most ancestors.

Parameters:
ind - Individual for whom ancestors are to be shown or highlighted

showAll

public void showAll()
Highlights all individuals in the Pedigree.


reverseSelect

public void reverseSelect()
Un-highlights all the Individuals who may be highlighted and highlights those that are not highlighted. If there are no highlighted Individuals when this method is called, nothing happens. As with most other highlight functions, a repaint must be issued immediately after calling this method.


showDescendantsPath

public 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.

Parameters:
ind - Individual for whom ancestors are to be shown or highlighted
degree - The degree of relation to search to aClickvent.g. 3rd degree descendants

showDescendantsPath

public void showDescendantsPath(Individual ind)
Highlight all Descendants of Individual "ind"

Parameters:
ind - The individual whose descendants must be highlighted

highlightIndividuals

public boolean highlightIndividuals(java.awt.geom.Rectangle2D boundingRec)
Highlights those individuals whose Icons are wholy contained within a rectangular region defined by the rectangle boundingRec.

Parameters:
boundingRec - The bounding Rectangle that demarcates the area or region with Individuals that may be highlighted

setPrintService

public void setPrintService(javax.print.PrintService ps)

printPedigree

public void printPedigree(boolean showDialog)
Print the current pedigree. Conditionally display the standard printer options dialog. When the user confirms printing, a new print job is added to a print queuee and a new printing thread is forked that retrieves and prints the printing job independent of the current main thread.

Parameters:
showDialog - True indicates that dialog must be shown, False indicates �do not show dialog�.

pastePedigree

public 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. An ArrayList object is used to carry the Individual objects as they are copied into / from the clipboard. If the paste operation is successful, a call is made to the smartDraw algorithm.

Returns:
True if the paste operation was successful, false otherwise

copyWMF

public void copyWMF()
Copies the current Pedigree into a Windows MetaFile that is then placed in the System clipboard. This method sets the stage for copying the whole pedigree to clipboard to commence. It starts and shows a progress dialog which shows the progress as the copying of the current Pedigree prfoceeds


copyPedigree

public boolean copyPedigree()
Copies only the contents of the Pedigree that are strictly required to re-construct a Pedigree in the target system. The contents are dumped into a the clipBoard as an ArrayList object whose elements are populated as follows: 1. Element 0 - thru last will carry the Individual objects Only those individuals that are selected / highlighted are copied and a repaint is issued immediately after the the sucessful export to clipboard, using green highlights to show those Individuals that have been successfully copied to clipboard.

Returns:
True if the copying to clipboard operation was done successfully and false otherwise

getHighlightedindividuals

public java.util.Stack<Individual> getHighlightedindividuals()
Retrieves and returns a stacked list of highlighted / selected Individuals.

Returns:
A stack whose contents are Individual objects

getSelectedIndividuals

public java.lang.String getSelectedIndividuals()
Gets a string of UPN's for all highlited individuals. The UPN's in the list are separated / delimited by blank spaces

Returns:
A space delimited list (String) of currently highlighted Individuals UPN's

findPerson

public 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.

Parameters:
point - The location at which an Individual may be located
Returns:
An Individual whose Icon is currently located at the specified point or null if there is no Individual at that location.

clearHighlights

public void clearHighlights()
Clear any highlighted individuals and/or relationship lines.


getCount

public int getCount()
Returns:
The number of individuals in the pedigree. If there are shadows in the Pedigree, they will be included in this number.

clearPedigree

public void clearPedigree()
Clears the Pedigree creates a new empty Pedigree with no Individuals.


getXMLString

public 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.

Returns:
An XML string generated from current Pedigree.

getXMLString

public java.lang.String getXMLString(boolean includeSubtext)
                              throws com.objex.panywhere.PedigreeException
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.

Parameters:
includeSubtext - Flag indiicating whether or not Icon subtext must be included as part of the exported data.
Returns:
An XML string generated from current Pedigree.
Throws:
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.

exportXML

public void exportXML(java.io.File aXMLFile)
               throws com.objex.panywhere.PedigreeException
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.

Parameters:
aXMLFile - The xml file handle to which data has to be exported.
Throws:
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.

importXML

public void importXML(java.lang.String xmlFileName)
               throws com.objex.panywhere.PedigreeException
Imports dat from the file specified by "xmlFileName" and constructs a Pedigree from the imported data. Once the import is complete, a smartDraw() operation is performed to render the new Pedigree objects.

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:

  1. For files, read the first few lines of the XML file to see if the DOCTYPE was specified. Instantiate the validating parser if DOCTYPE is available in the document otherwise use non-validating parser
  2. For input XML strings, search the string for instance of DOCTYPE PROGENYPEDIGREE. Instantiate the validating parser if DOCTYPE is available in the string otherwise use non-validating parser

To specify which parser you wish to ProgenyAnywhere to employ, the system property com.objex.xml.parser must be set to either validating or non-validation. Example shown below:
  
   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)

Parameters:
xmlFileName - The String representing the absoulute pathname of the xml input file to import from.
Throws:
PedigreeException - If system is unable to create the XML output file or if the export procedure fails for one reason or another
See Also:
ImportListener

importXML

public void importXML(java.io.File xmlFile)
               throws com.objex.panywhere.PedigreeException
Creates a new pedigree with data imported from specified XML file.

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:

  1. For files, read the first few lines of the XML file to see if the DOCTYPE was specified. Instantiate the validating parser if DOCTYPE is available in the document otherwise use non-validating parser
  2. For input XML strings, search the string for instance of DOCTYPE PROGENYPEDIGREE. Instantiate the validating parser if DOCTYPE is available in the string otherwise use non-validating parser

To specify which parser you wish to ProgenyAnywhere to employ, the system property com.objex.xml.parser must be set to either validating or non-validation. Example shown below:
  
   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)

Parameters:
xmlFile - The XML input file handle
Throws:
PedigreeException - If system is unable to import from the specified XML file
See Also:
ImportListener

importXMLString

public void importXMLString(java.lang.String xmlString)
                     throws com.objex.panywhere.PedigreeException
Imports data from supplied XML String and parses that String to construct a Pedigree.

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:

  1. For files, read the first few lines of the XML file to see if the DOCTYPE was specified. Instantiate the validating parser if DOCTYPE is available in the document otherwise use non-validating parser
  2. For input XML strings, search the string for instance of DOCTYPE PROGENYPEDIGREE. Instantiate the validating parser if DOCTYPE is available in the string otherwise use non-validating parser

To specify which parser you wish for ProgenyAnywhere to employ, the system property com.objex.xml.parser must be set to either validating or non-validation. Example shown below:
  
   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)

Parameters:
xmlString - The string of XML data representing an XML document contents.
Throws:
PedigreeException - If system is unable to import from the specified XML string
See Also:
ImportListener

importAddedTexts

public void importAddedTexts(java.util.List<AddedText> a_addedTextList)

getDatadictionary

public DataDictionary getDatadictionary()
Returns:
Current DataDictionary.

setDatadictionary

public void setDatadictionary(DataDictionary rhs)
Setter for property datadictionary.

Parameters:
rhs - New value of property datadictionary.

getIndividualRenderer

public com.objex.panywhere.IndividualRenderer getIndividualRenderer()
Returns:
Current IndividualRenderer.

setIndividualRenderer

public void setIndividualRenderer(com.objex.panywhere.IndividualRenderer a_renderer)
Set the new IndividualRenderer. The Individual Renderer performs the painting of Indvidual Icons
on the Pedigree canvas. While not recommended, you may create a custom IndividualRenderer by subclassing
IndividualRenderer and overiding its public painting methods and then use this method to inform the Pedigree that
there is a new IndividualRenderer.

Parameters:
a_renderer - New value of property individualRenderer.

dispose

public void dispose()
This method is used to do garbage collection on some key objects used by the control. This is particularly useful when the control is used in a browser environment where the control may be embedded inside an applet. If the user refreshes the browser, it is possible for the new applet to instantiate a new Progeny Anywhere Control before the garbage collection of some of these key objects is completed, causing the control to go into an unstable state. It is highly advisable to call this method from the stop() and/or destroy methods of the applet so that you are guaranteed of the cleanup when the applet is destroyed and then recreated.


validateSiteLicense

public final boolean validateSiteLicense(java.applet.AppletContext aAppletContext,
                                         java.lang.String as_isv,
                                         int ai_cutomer_number)
                                  throws com.objex.panywhere.PedigreeException
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.

Parameters:
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 done
as_isv - The Independet Software Vendor Name that was allocated to when you were given a site license
ai_cutomer_number - The customer number that was allocated to you when the site license was allocated
Throws:
com.objex.panywhere.PedigreeException

addCustomIndividualSubMenu

public 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. It is imperative that any submenu added to the control
have the font set to the same menu used by the internal popup menu. This is based on the control font name of Font(BeanFontname, Font.PLAIN, 11))
where beanforntname is obtained from @link ProgenyAnywhere.setDefaultFontName() API function.

Parameters:
submenu - The submenu to be displayed
ab_showonreadonly - If false, the submenu will be added only if the pedigree viewer is running in read and modify mode
ab_add_separator - If true then a separator will be added before the submenu

getDefaultFontName

public java.lang.String getDefaultFontName()
Returns:
Default font name

setDefaultFontName

public void setDefaultFontName(java.lang.String fontname)
Sets Default font name

Parameters:
fontname - New default font name

addCustomIndividualMenuItem

public 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. It is imperative that any menuitem added to the control
have the font set to the same menu used by the internal popup menu. This is based on the control font name of Font(BeanFontname, Font.PLAIN, 11))
where beanforntname is obtained from @link ProgenyAnywhere.getDefaultFontName() API function.

Parameters:
menuitem - The menuitem to be displayed
ab_showonreadonly - If false, the menuitem will be added only if the pedigree viewer is running in read and modify mode
ab_add_separator - If true then a separator will be added before the menuitem

importSmartDrawPositions

public final 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.

Parameters:
am_upns - Array of UPN's for all the people in the pedigree
am_xc - Array of X coordinates. Array indices relate to the indices in upn array
am_yc - Array of Y coordinates. Array indices relate to the indices in upn array

addSmartDrawService

public void addSmartDrawService(SmartDrawService a_smartDrawService)
Use this method to replace the default smartdraw service used by ProgenyAnywhere with a new external one. When set, the default smartdraw algorithm used internaly by ProgenyAnywhere is superceded
meaning that any determination of the appropriate XY positions for the person icons is left to this external service provided by you.

The example below shows a rather rudiementary smartdraw algorithm that feeds ProgenyAnywhere with ready made XY positions for rendering the iocns.
 
 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;
        }
     }
 
 

Parameters:
a_smartDrawService - The new external smartdraw service

setGeneticdataManuallyAssigned

public 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. If TRUE then the haplotyping algorithm will not produce new haplotype bars but rather will use the manually assigned ones.

Parameters:
ab_manual - Whether or not the haplotype information was assigned manually or if it should be calculated using local algorithm

setMarkerLegend

public void setMarkerLegend(MarkerLegend a_legend)
Sets the new The marker legend for this pedigree

Parameters:
a_legend - The new marker legend containing names of all the markers on a haplotype.

getMarkerLegend

public MarkerLegend getMarkerLegend()
Returns:
The marker legend containing names of all the markers on a haplotype.

hidePopupMenuItem

public void hidePopupMenuItem(java.lang.String as_item_text_pattern)
Hide the menu item whose item text is specifed. If the menuitem is the only visible item enclosed by a separator, that separator will be hidden as well

Parameters:
as_item_text_pattern - The substring that is wholy contained in the menu item's item text

hideIndividualPopupMenuItem

public void hideIndividualPopupMenuItem(java.lang.String as_item_text_pattern)
Hide the menu item whose item text is specifed. If the menuitem is the only visible item enclosed by a separator, that separator will be hidden as well.

Parameters:
as_item_text_pattern - The substring that is wholy contained in the menu item's item text

repaint

public void repaint()
Repaint the pedigree


smartCalcIndividualSpace

public 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.


clearRepaintArea

public void clearRepaintArea()
Repaints or clears the current viewable part of the component (visible rectangle only)


addSpouseRelationshipChangeListener

public void addSpouseRelationshipChangeListener(SpouseRelationshipChangeListener listener)
Add a new relationship change listener

Parameters:
listener - The new SpouseRelationshipChangeListener

removeSpouseRelationshipChangeListener

public void removeSpouseRelationshipChangeListener(SpouseRelationshipChangeListener listener)
Removes the SpouseRelationshipChangeListener

Parameters:
listener - The SpouseRelationshipChangeListener to be removed

addTwinRelationshipChangeListener

public void addTwinRelationshipChangeListener(TwinRelationshipChangeListener listener)
Add a new relationship change listener

Parameters:
listener - The new TwinRelationshipChangeListener

addLegendListener

public void addLegendListener(LegendListener listener)
Add LegendListener

Parameters:
listener - The new legend listener

removeLegendListener

public void removeLegendListener(LegendListener listener)
Remove an LegendListener * @param listener The legend listener to be removed


removeTwinRelationshipChangeListener

public void removeTwinRelationshipChangeListener(TwinRelationshipChangeListener listener)
Removes a TwinRelationshipChangeListener

Parameters:
listener - The TwinRelationshipChangeListener to be removed

addIndividualListener

public void addIndividualListener(IndividualListener listener)
Add Individual listener

Parameters:
listener - New individual listener

removeIndividualListener

public void removeIndividualListener(IndividualListener listener)
Remove the Individual listener

Parameters:
listener - The IndividuaListener to be removed

addPedigreeListener

public void addPedigreeListener(PedigreeListener listener)
Adds a new PedigreeListener

Parameters:
listener - The new PedigreeListener

removePedigreeListener

public void removePedigreeListener(PedigreeListener listener)
Removes the PedigreeListener

Parameters:
listener - The PedigreeListener to be removed

addDrawingListener

public void addDrawingListener(DrawingListener listener)
Add a new DrawingListener listener

Parameters:
listener - DrawingListener

removeDrawingListener

public void removeDrawingListener(DrawingListener listener)
Remove the specified DrawingListener

Parameters:
listener - The DrawingListener to be removed

removeRelationshipListener

public void removeRelationshipListener(RelationshipListener listener)
Remove the RelationshipListener

Parameters:
listener - The RelationshipListener to be removed

addLineClickListener

public void addLineClickListener(LineClickListener listener)
Add the LineClickListener to handle line click events.

Parameters:
listener - The line click listener to be added

removeLineClickListener

public void removeLineClickListener(LineClickListener listener)
Remove or de-registser line click event listeners

Parameters:
listener - The line click listener to be removed

addImageListener

public void addImageListener(ImageListener listener)
Add a new ImageListener to handle image events for the control

Parameters:
listener - The new ImageListener

removeImageListener

public void removeImageListener(ImageListener listener)
Remove an ImageListener to handle image events for the control

Parameters:
listener - The ImageListener to be removed

addPedigreePrintListener

public void addPedigreePrintListener(PedigreePrintListener listener)
Add a new PedigreePrintListener to handle printing events.

Parameters:
listener - The new printing listener

removePedigreePrintListener

public void removePedigreePrintListener(PedigreePrintListener listener)
Remove the PedigreePrintListener and stop handling printing events.

Parameters:
listener - The printing listener to be removed

addImportListener

public void addImportListener(ImportListener listener)
Use this method to register for import events generated by the XML import parser

Parameters:
listener - The import listener through which import events are broadcast

removeImportListener

public void removeImportListener(ImportListener listener)
Use this method to de-register for import events generated by the XML import parser

Parameters:
listener - The import listener through which import events are broadcast

addExportListener

public void addExportListener(ExportListener listener)
Add an Export listener. All export events generated by the control will be channelled to this and other m_pedigree.listeners

Parameters:
listener - The export listener being added

removeExportListener

public void removeExportListener(ExportListener listener)
Remove ExportListener and sto handling export events

Parameters:
listener - The ExportListener to be removed

addIconClickListener

public void addIconClickListener(IconClickListener listener)
Add a new IconClickListener to handle icon click events

Parameters:
listener - The new IconClickListener to be added

removeIconClickListener

public void removeIconClickListener(IconClickListener listener)
Remove IconClickListener

Parameters:
listener - The IconClickListener to be removed

addAboutBoxListener

public void addAboutBoxListener(AboutBoxListener listener)
Add an about box listener

Parameters:
listener - The new AboutBox listener to be added

removeAboutBoxListener

public void removeAboutBoxListener(AboutBoxListener listener)
Remove an about box listener

Parameters:
listener - The AboutBoxListener to be removed

removeIconClickListeners

public void removeIconClickListeners()
Remove all registered icon click listeners


addRelationshipListener

public void addRelationshipListener(RelationshipListener listener)
Add a new RelationshipListener to handle relationship events

Parameters:
listener - The new relationship event being added

addIndividualAddListener

public void addIndividualAddListener(IndividualAddListener listener)
Allows interested objects to registser for receiving person add events

Parameters:
listener - The IndividualAddListener object to be added or registered

removeIndividualAddListener

public void removeIndividualAddListener(IndividualAddListener listener)
Removes tehe specified individual add event listener.

Parameters:
listener - The IndividualAddListener to be removed

removeIndividualDeleteListener

public void removeIndividualDeleteListener(IndividualDeleteListener listener)
Removes the delete listener and stop any delete events from being channeled here

Parameters:
listener - The individual delete listener to be removed.

addIndividualDeleteListener

public void addIndividualDeleteListener(IndividualDeleteListener listener)
Register a new individual delete listener to receive person delete events

Parameters:
listener - The new IndividualDeleteListener to be registered

setLegendChanged

public void setLegendChanged(boolean b)

isLegendChanged

public boolean isLegendChanged()

setBackgroundTemplate

public void setBackgroundTemplate(java.net.URL url)
Sets the URL for the location of a background image if one is to be used

Parameters:
url - The URL of the background template. May be null

setSubtextEditAllowed

public void setSubtextEditAllowed(boolean ab_allowed)
Enable or diable subtext edits by setting this property to true or false

Parameters:
ab_allowed - If TRUE then subtext can be edited. Otherwise subtext cannot be edited by clicking on the subtext line.

getCurrentXMLFile

public java.io.File getCurrentXMLFile()

setCurrentXMLFile

public void setCurrentXMLFile(java.io.File rhs)

removeAddedTextListener

public void removeAddedTextListener(AddedTextListener listener)
Removes the AddedText listener and stop any AddedText events from being channeled here

Parameters:
listener - The individual AddedText listener to be removed.

addAddedTextListener

public void addAddedTextListener(AddedTextListener listener)
Register a new AddedText listener to receive AddedText events

Parameters:
listener - The new AddedTextListener to be registered