com.objex.panywhere
Class Pedigree

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.objex.panywhere.Pedigree
All Implemented Interfaces:
RelationshipConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable

public class Pedigree
extends javax.swing.JPanel
implements java.io.Serializable, RelationshipConstants, java.awt.print.Printable, javax.swing.Scrollable

The Pedigree class defines all the API methods and algorithms for pedigree drawing, making it a fully self contained genogram drawing bean. All you need to do is to add the pedigree to a container and you will be ready to start drawing and manipulating Pedigrees. The Pedigree javabean exposes a multiplicity of API methods that make it easy for programmers to customize the way pedigree drawing is done at a programmatic level. A lot of the customization can also be done at the user level using some of the controls and dialogs that have been provided with the javabean. To live up to its promise as a 100% pure JavaBean that conforms to the JavaBeans specification, the pedigree javabean can be added or installed into any integrated developent environment (IDE) that is JavaBeans aware. In these environments, once installed / added to the IDE's component palette, the API methods become available for use and can even be added onto the code completion databases of most IDE's to help the programmer with using the available methods. Environments that are ActiveX compatible can use the Pedigree bean by integrating it with the JavaBeans-ActiveX Bridge from Sun MicroSystems. The Pedigree javabean is also extensible and hence can be extended and some of its methods overidden. If overiding is done, it is important not to override the paintComponent() method because that will basically mean they will be re-writing the drawing capabilities from scratch instead of leveraging Progreny's proven Pedigree drawing algorithms. It is important to note that the javabean must of necessity 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. A typical use of the Pedigree class is shown below :- Instantiate the Pedigree Bean thus :- Pedigree ped = new Pedigree(); 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); The Pedigree bean makes use of a Individual painter called IndividualRenderer, a SymbolRenderer class for painting Individual Symbol views. You may extend each of the Rendering classes to customize the way the Individual Icons and Symbols are rendered on the Pediree canvas. We do not recommend for you to do that as it basically means that you lose the ability to leverage the algorithms that we have implemented in the rendering of Pedigrees but it is perfectly possible. For instance to create one's own custom IndividualRenderer, you create a subclass of IndividualRenderer (called CustomRenderer) and overide the render() methods. You would then need to inform the Pedigree bean that you are using a custom renderer/painter for Individuals by executing the method Pedigree.setIndividualRenderer(CustomRenderer).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
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.
static boolean DEBUG
           
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
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.objex.panywhere.RelationshipConstants
BROTHER, DAUGHTER, FATHER, FEMALE_GENDER, MALE_GENDER, MOTHER, SISTER, SON, SPOUSE, TWINBROTHER, TWINSISTER, UNKNOWN_GENDER
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Pedigree()
          No Argument Constructor to create new Pedigree instance.
Pedigree(java.util.Locale aLocale)
           
 
Method Summary
 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 addDimensionsListener(com.objex.panywhere.DimensionsListener listener)
          Allows users of Pedigree Java Bean to registser for Dimensions Change Events.
 void addIconClickListener(IconClickListener listener)
          Allows users of Pedigree Java Bean to registser for Icon Click Events.
 void addImageListener(ImageListener listener)
          Allows users of Pedigree Java Bean to registser for Pedigree Image Events.
 void addImportListener(ImportListener listener)
          Allows users of Pedigree Java Bean to de-registser for Pedigree Import Events.
 void addLineClickListener(LineClickListener listener)
          Allows users of Pedigree Java Bean to registser for 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 addPedigreePrintListener(PedigreePrintListener listener)
          Allows users of Pedigree Java Bean to registser for Pedigree 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 addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)
          Enables Pedigree to add / register for and receieve property change 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.
 java.lang.String addSpouse(Individual aSpouse, boolean deceased)
          Add a lSpouse to an existing Individual.
 void addToFamily(Individual aPerson)
          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.
 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 clearHighlights()
          Clear any highlighted individuals and/or relationship lines.
 void clearPedigree()
          Clears the Pedigree creates a new empty Pedigree with no Individuals.
 void clearPrintJobs()
          Clears / zaps all print jobs that are currently in the Print Queue and have not yet been seubmitted to the printing subsystem for the platform on which the Bean is being used.
 void connectChild(Individual as_parent, Individual as_child, boolean liberal)
          Used to connect two Individuals who already exist in the Pedigree to one another as child and parent.
 void connectParent(Individual as_child, Individual as_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 aSpouse, 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 and writes contents into an output stream specified by "xmlFile".
 void finalize()
           
 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 fireDimensionsChanged(com.objex.panywhere.DimensionsEvent evt)
          Fires Dimensions Change events for the Pedigree.
 void fireFinishedPrinting(PedigreePrintEvent evt)
          Fires the finishedPrinting event when the pedigree has been completely submitted to the printer.
 void fireIconClicked(IconClickEvent evt)
          Fires the iconClicked method implemented by all objects that have registered for IconClickEvent events generated by the Pedigree.
 void fireImageFailed(ImageEvent evt)
          Fires the imageFailed method implemented by all objects that have registered for ImageEvent events generated by the Pedigree when an image of the pedigree is requested.
 void fireImageGenerated(ImageEvent evt)
          Fires the imageGenerated method implemented by all objects that have registered for ImageEvent events generated by the Pedigree when an image of the pedigree is requested
 void fireImageLoading(ImageEvent evt)
          Fires the imageLoading method implemented by all objects that have registered for ImageEvent events generated by the Pedigree when an image of the pedigree is requested
 void fireImportAborted(ImportEvent evt)
          Fires the importAborted event when the XML import is aborted due to an error
 void fireImportFinished(ImportEvent evt)
          Fires the importFinished event when the XML import has been completed.
 void fireImportTriggered(ImportEvent evt)
          Fires the importTriggered method implemented by all objects that have registered for ImportEvent events generated by the Pedigree when a data import into the Pedigree control has been started
 void fireIndividualImported(ImportEvent evt)
          Fires the individualImported event
 void fireLineClicked(LineClickEvent evt)
          Fires the lickClicked method implemented by all objects that have registered for LineClick events generated by the Pedigree.
 void firePagePrinted(PedigreePrintEvent evt)
          Fires the pagePrinted event when a pedigree page has been printed successfuly.
 void firePreparsingImportFile(ImportEvent evt)
          Fires the preparsing import event
 void firePrintingAborted(PedigreePrintEvent evt)
          Fires the printingAborted event when a pedigree print job has been aborted
 void firePrintingTriggered(PedigreePrintEvent evt)
          Fires the printingTriggered event when a print job has been submitted to the Progeny Anywhere system
 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()
           
protected  java.lang.String getBeanfontname()
          Getter for property beanfontname.
 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
 DataDictionary getDatadictionary()
          Getter for property datadictionary.
 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()
           
 java.awt.image.BufferedImage getImage()
          Deprecated. since ver2.0
 void getImage(java.awt.image.BufferedImage[] lBilImage)
          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.
 IndividualRenderer getIndividualRenderer()
          Getter for property individualRenderer.
 java.awt.geom.Point2D getLastMouseLocation()
          Returns the lastest location of a mouse click.
 Legend getLegend()
          Gets the current Pedigree's Legend items
 float getLinewidth()
          Retrieves the line width used for drawing Pedigree objects
 double getMarkerDisplayHeight()
           
 double getMarkerDisplayWidth()
           
 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.
 double getPedigreescale()
           
 java.lang.String getPreferredLAF(java.lang.String def)
          This static method, which can be used before the Pedigree object is created, is used to retrieve the preferred look and feel that the user has set in their preferences.
 java.awt.Dimension getPreferredScrollableViewportSize()
           
 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.
 int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
           
 boolean getScrollableTracksViewportHeight()
           
 boolean getScrollableTracksViewportWidth()
           
 int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
          A JScrollPane object will use this method to determine the number of pixels to move this component by when scrolling with a viewport.
 java.lang.String getSelectedIndividuals()
          Gets a UPN list of 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.
 java.lang.String getUPNFromTag(java.lang.String tag)
          Returns The UPN of an Individual whose tag or external key is specified
 int getVerticalgridspacing()
          Retrieves the Vertical grid spacing specified for this Pedigree
 java.lang.String getXMLString()
          Generates an XML string from the current Pedigree data and returns a String whose contents are the XML data.
 java.lang.String getXMLString(boolean includeSubtext)
          Generates an XML string from the current Pedigree data and returns a String whose contents are the XML data.
 int getYoungestGeneration()
          Returns the generation of the Individual(s) that are at the lowest level in the pedigree.
 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.
 Individual highlightPerson(Individual aPerson, java.awt.Graphics2D g2d)
          Deprecated. Sets the Individual "aPerson"'s highlighted status to true. The next time the Pedigree is painted this Individual's icon will be drawn highlighted
 Individual highlightPerson(Individual as_person, java.awt.Graphics2D g2d, boolean showarrow)
          Deprecated. Sets the Individual "aPerson"'s highlighted status to true. The next time the Pedigree is painted this Individual's icon will be drawn highlighted
 void highlightRelatives(Individual ind, int degree, java.awt.Graphics2D g2d)
          Highlights all the relatives of this Individual depending on degree of relation chosen.
 void highlightRelatives(java.lang.String as_upn, int degree, java.awt.Graphics2D g2d)
          Highlights all the relatives of this Individual depending on degree of relation chosen.
 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 importXML(java.io.File xmlFile)
          Import data from an XML input stream (File or string )and constructs a Pedigree from the imported data.Smart draw follows the completion of the import.
 void importXML(java.lang.String xmlFileName)
          Imports data from an XML input stream from the file specified by "xmlFileName" and constructs a Pedigree from the imported data.
 void importXMLString(java.lang.String xmlString)
          Imports data from a supplied XML String and parses that String to construct a Pedigree.
 boolean isAutodraw()
          Returns the current value of the autodraw property.
 boolean isChanged()
          Currently NOT USED
 boolean isChangeverticalpos()
          Not ussed
 boolean isImportShadow()
          Currently NOT USED
 boolean isLivedragging()
           
 boolean isMatchspouses()
           
 boolean isOneclickadd()
          Gets the value of the “one click add”.
 boolean isOpaque()
          Force the component's opaque property to true by always returning a value of true
static boolean isPopupEnabled()
          Gets property or flag that enables the popup menus to be shown or hidden.
 boolean isPulllonerelatives()
          Getter for property "pulllonerelatives".
 boolean isRecalculatepos()
          Not used
 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 aPerson)
          Scrolls the Pedigree viewport to the specified Individual if the Individual is not within view already.
 void paintComponent(java.awt.Graphics g)
          Custom paint method draws Pedigree objects on the canvas each time a call is issued to the painting engine.
 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.
 int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int ai_page)
          Called by the printing susbsystem to render a page of Pedigree data on a printer device.
 void printPedigree(boolean showDialog)
          Print the current pedigree.
 void readPedigree(java.io.File iFile)
          Reads the saved state of a Pedigree from XML stream encapsulated in a file passed as parameter to the method.
 void removeDimensionsListener(com.objex.panywhere.DimensionsListener listener)
          Allows users of Pedigree Java Bean to de-registser Dimensions Change Events listeners
 void removeIconClickListener(IconClickListener listener)
          Allows users of Pedigree Java Bean to de-registser Icon Cick Events.
 void removeImageListener(ImageListener listener)
          Allows users of Pedigree Java Bean to de-register Pedigree Image Events.
 void removeImportListener(ImportListener listener)
          Allows users of Pedigree Java Bean to register Pedigree Import Events.
 void removeLineClickListener(LineClickListener listener)
          Allows users of Pedigree Java Bean to de-registser Line Cick Event listeners.
 void removePedigreePrintListener(PedigreePrintListener listener)
          Use this method to add a pedigree print listener if you wish to be informed of the progress in the pedigree printing process.
 void removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)
          Enables Pedigree to remove property change events listeners and stop receiving property change events
 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 oFile)
          Writes the current Pedigree state to an XML Stream encapsulated in file passed as paramener.
 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.
protected  void setBeanfontname(java.lang.String beanfontname)
          Setter for property beanfontname.
 void setChanged(boolean value)
          Currently NOT USED
 void setChangeverticalpos(boolean changevertical)
          Not ussed
 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 setDatadictionary(DataDictionary rhs)
          Setter for property datadictionary.
 void setFamily(Family fam)
          Sets the current family to specified value.
 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 ind)
          This method traverses a family tree in which Individual "ind" is a member and sets the generations of Individuals appropriately.
 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 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(IndividualRenderer individualRenderer)
          Setter for property individualRenderer.
 void setLegend(Legend legend)
          Sets the legend property for this Pedigree.
 void setLinewidth(float lwidth)
          Sets the linewidth property value
 void setLinewidth(java.lang.String lwidth)
          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 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 setNextTreeID(int treeid)
          Sets the next available TREEID for use in creating an new Family
 void setNextupn(int n)
          Sets the supplied parameter as the Pedigree's next UPN.
 void setOneclickadd(boolean value)
          Set the “one click add” option to on or off.
 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.
static void setPopupEnabled(boolean rhs)
          Sets or unsets the property or flag that enables the popup menus to be shown or hidden.
 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 setRecalculatepos(boolean recalc)
          Not used
 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 setSnaptogrid(boolean value)
          Sets "snaptogrid" property to true or false depending on the value passed.
 void setSubtextLegend(SubtextLegend aLegend)
          Sets a new subtext legend for this Pedigree viewer
 void setSubtextyvalue(double yvalue)
          Sets the relative positioning of the Icon subtext.
 void setSymbolsBasedOnData(boolean ab_basedondata)
          Set this property to TRUE if you wish to calculate the eligibility of each Symbol setting based on the Data that is held by the Individual of which that Symbol is a property.
 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 Individual "ind's" kids
 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 showPaletteDialog(boolean show)
          Creates and /or displays the Palette dialog box
 void showParents(Individual ind)
          Highlights the Individual "ind's" parents
 void showPropertiesDialog(boolean show)
          Creates and/or displays the properties dialog box
 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 smartDraw()
          This method excutes the drawing algorithm that calculates the most appropriate positions for each Individual in the Pedigree.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, 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

DEBUG

public static boolean DEBUG
Constructor Detail

Pedigree

public Pedigree()
         throws java.lang.Exception
No Argument Constructor to create new Pedigree instance.

Throws:
java.lang.Exception - If there was an error instantiating a Pedigree instance. In applet envronment, this will typically be due to the browser's security manager throwing security or access control errors exceptions.

Pedigree

public Pedigree(java.util.Locale aLocale)
         throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

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 Pedigree.PROBAND_UPPER_LEFT Pedigree.PROBAND_LOWER_LEFT Pedigree.PROBAND_LOWER_RIGHT Pedigree.PROBAND_UPPER_RIGHT

getProbandArrowPos

public java.lang.String getProbandArrowPos()
Returns:
The current position where the proband arrow is drawn. Pedigree.PROBAND_UPPER_LEFT Pedigree.PROBAND_LOWER_LEFT Pedigree.PROBAND_LOWER_RIGHT Pedigree.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
Since:
2.01

setUseStandardProbandArrow

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

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

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

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


setSymbolsBasedOnData

public void setSymbolsBasedOnData(boolean ab_basedondata)
Set this property to TRUE if you wish to calculate the eligibility of each Symbol setting based on the Data that is held by the Individual of which that Symbol is a property. When symbols are based on data, certain conditions specified in the LegendItem's list of conditions must be met before the Individual's Symbol object can be assigned the encoding on a LegendItem.

Since:
Ver 2.01

getSubtextLegend

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

setSubtextLegend

public void setSubtextLegend(SubtextLegend aLegend)
Sets a new subtext legend for this Pedigree viewer

Parameters:
aLegend - The new subtext legend
Since:
Ver 2.01

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 lwidth)
Sets the linewidth property value. A bigger "lwidth" value causes the line thinkness of lines drawn on the Pedigree to increase.

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

setChangeverticalpos

public void setChangeverticalpos(boolean changevertical)
Not ussed


isChangeverticalpos

public boolean isChangeverticalpos()
Not ussed


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.

setRecalculatepos

public void setRecalculatepos(boolean recalc)
Not used


isRecalculatepos

public boolean isRecalculatepos()
Not used


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

isOpaque

public boolean isOpaque()
Force the component's opaque property to true by always returning a value of true

Overrides:
isOpaque in class javax.swing.JComponent

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

getPreferredLAF

public java.lang.String getPreferredLAF(java.lang.String def)
This static method, which can be used before the Pedigree object is created, is used to retrieve the preferred look and feel that the user has set in their preferences. If no such pereference has been set, the default Java Metal Look and feel is returned. Note that this method is meant for use before the Pedigree object has been created. Any use afterwards will result in the main Pedigree look and feel being different than the the Look and Feel of its child components.

Parameters:
def - The default look and feel. This can be used to set the desired LAF.
Returns:
The preferred Look and Feel as set up in the user preferences for the current user. If parameter "def" is not null, then the value passed will be returned instead.

setMenuDelay

public void setMenuDelay(int rhs)
                  throws java.lang.SecurityException,
                         java.lang.NullPointerException
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
Throws:
java.lang.SecurityException
java.lang.NullPointerException

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

addDimensionsListener

public void addDimensionsListener(com.objex.panywhere.DimensionsListener listener)
Allows users of Pedigree Java Bean to registser for Dimensions Change Events.


removeDimensionsListener

public void removeDimensionsListener(com.objex.panywhere.DimensionsListener listener)
Allows users of Pedigree Java Bean to de-registser Dimensions Change Events listeners


fireDimensionsChanged

public void fireDimensionsChanged(com.objex.panywhere.DimensionsEvent evt)
Fires Dimensions Change events for the Pedigree. If an object has registered a listener for Dimension Change events, its implemented version of the dimensionsChanged() method is executed when such event is generated by the Pedigree.

Parameters:
evt - The LineClickEvent

addLineClickListener

public void addLineClickListener(LineClickListener listener)
Allows users of Pedigree Java Bean to registser for Line Click Events.


removeLineClickListener

public void removeLineClickListener(LineClickListener listener)
Allows users of Pedigree Java Bean to de-registser Line Cick Event listeners.


fireLineClicked

public void fireLineClicked(LineClickEvent evt)
Fires the lickClicked method implemented by all objects that have registered for LineClick events generated by the Pedigree.

Parameters:
evt - The LineClickEvent

addImageListener

public void addImageListener(ImageListener listener)
Allows users of Pedigree Java Bean to registser for Pedigree Image Events.


removeImageListener

public void removeImageListener(ImageListener listener)
Allows users of Pedigree Java Bean to de-register Pedigree Image Events.


fireImageGenerated

public void fireImageGenerated(ImageEvent evt)
Fires the imageGenerated method implemented by all objects that have registered for ImageEvent events generated by the Pedigree when an image of the pedigree is requested

Parameters:
evt - The Image Event

fireImageFailed

public void fireImageFailed(ImageEvent evt)
Fires the imageFailed method implemented by all objects that have registered for ImageEvent events generated by the Pedigree when an image of the pedigree is requested.

Parameters:
evt - The Image Event

fireImageLoading

public void fireImageLoading(ImageEvent evt)
Fires the imageLoading method implemented by all objects that have registered for ImageEvent events generated by the Pedigree when an image of the pedigree is requested

Parameters:
evt - The Image Event

addPedigreePrintListener

public void addPedigreePrintListener(PedigreePrintListener listener)
Allows users of Pedigree Java Bean to registser for Pedigree Printing Events.


removePedigreePrintListener

public void removePedigreePrintListener(PedigreePrintListener listener)
Use this method to add a pedigree print listener if you wish to be informed of the progress in the pedigree printing process. Pedigree print events are generated by the Progeny Anywhere JavaBean when a print job is submitted by the user as well as when the printing has been finished.


firePrintingTriggered

public void firePrintingTriggered(PedigreePrintEvent evt)
Fires the printingTriggered event when a print job has been submitted to the Progeny Anywhere system

Parameters:
evt - The Printing Event

fireFinishedPrinting

public void fireFinishedPrinting(PedigreePrintEvent evt)
Fires the finishedPrinting event when the pedigree has been completely submitted to the printer.

Parameters:
evt - The Printing Event

firePrintingAborted

public void firePrintingAborted(PedigreePrintEvent evt)
Fires the printingAborted event when a pedigree print job has been aborted

Parameters:
evt - The Printing Event

firePagePrinted

public void firePagePrinted(PedigreePrintEvent evt)
Fires the pagePrinted event when a pedigree page has been printed successfuly. This event can be use dto track the printing progress as it happens.

Parameters:
evt - The Printing Event

addImportListener

public void addImportListener(ImportListener listener)
Allows users of Pedigree Java Bean to de-registser for Pedigree Import Events.


removeImportListener

public void removeImportListener(ImportListener listener)
Allows users of Pedigree Java Bean to register Pedigree Import Events.


fireImportTriggered

public void fireImportTriggered(ImportEvent evt)
Fires the importTriggered method implemented by all objects that have registered for ImportEvent events generated by the Pedigree when a data import into the Pedigree control has been started

Parameters:
evt - The Import Event

fireImportFinished

public void fireImportFinished(ImportEvent evt)
Fires the importFinished event when the XML import has been completed.

Parameters:
evt - The Import Event

fireImportAborted

public void fireImportAborted(ImportEvent evt)
Fires the importAborted event when the XML import is aborted due to an error

Parameters:
evt - The Import Event

fireIndividualImported

public void fireIndividualImported(ImportEvent evt)
Fires the individualImported event

Parameters:
evt - The Import Event

firePreparsingImportFile

public void firePreparsingImportFile(ImportEvent evt)
Fires the preparsing import event

Parameters:
evt - The Import Event

addIconClickListener

public void addIconClickListener(IconClickListener listener)
Allows users of Pedigree Java Bean to registser for Icon Click Events.


removeIconClickListener

public void removeIconClickListener(IconClickListener listener)
Allows users of Pedigree Java Bean to de-registser Icon Cick Events.


fireIconClicked

public void fireIconClicked(IconClickEvent evt)
Fires the iconClicked method implemented by all objects that have registered for IconClickEvent events generated by the Pedigree.

Parameters:
evt - The Icon Click Event

savePedigree

public void savePedigree(java.io.File oFile)
                  throws java.lang.SecurityException,
                         java.lang.Exception
Writes the current Pedigree state to an XML Stream encapsulated in file passed as paramener. The data written to the XML file is just enough to reconstruct this Pedigree when and if the data is read back from the serialized file.

Parameters:
oFile - The output file object
Throws:
java.lang.SecurityException - If the user or application (applet) does not have the requisite permissions to read and/or write to the file system
java.lang.Exception - If the save operation fails.

readPedigree

public void readPedigree(java.io.File iFile)
                  throws java.lang.SecurityException,
                         java.security.AccessControlException,
                         org.xml.sax.SAXException,
                         java.io.IOException,
                         java.lang.Exception
Reads the saved state of a Pedigree from XML stream encapsulated in a file passed as parameter to the method.

Parameters:
iFile - The input file
Throws:
java.lang.SecurityException - If the user or application (applet) does not have the requisite permissions to read and/or write to the file system
java.lang.Exception - If the file cannot be read or opened
java.security.AccessControlException
org.xml.sax.SAXException
java.io.IOException

setPopupEnabled

public static void setPopupEnabled(boolean rhs)
Sets or unsets the property or flag that enables the popup menus to be shown or hidden. Passing a value of "True" will enable pop menus to be shown when a right mouse is clicked on the canvas. A value of "false" ensures that the popup does not appear in response to a right mouse click. This is a static method hence syntax may be : Pedigree.setPopupEnabled(False);

Parameters:
rhs - The new value. True or False

isPopupEnabled

public static boolean isPopupEnabled()
Gets property or flag that enables the popup menus to be shown or hidden. A value of "True" means that the pop menus are enabled and hence popup when a right mouse is clicked on the canvas. A value of "false" means that the popup does not appear in response to a right mouse click.

Returns:
current Value of popup enabled

clearPrintJobs

public void clearPrintJobs()
Clears / zaps all print jobs that are currently in the Print Queue and have not yet been seubmitted to the printing subsystem for the platform on which the Bean is being used.


setFamily

public void setFamily(Family fam)
Sets the current family to specified value.

Parameters:
fam - The new family object

getFamily

public Family getFamily()
Returns:
Getter method for family property. The family object is the main data model for the Pedigree bean as it stores all the Individuals's that make up the pedigree while the Pedigree has other properties that control the rendering of the Individuals on the Pedigree.

moveToIndividual

public void moveToIndividual(Individual aPerson)
                      throws java.lang.NullPointerException
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:
aPerson - The Individual to be brought into view
Throws:
java.lang.NullPointerException - If the parameter passed is null or does not exist

setLegend

public void setLegend(Legend legend)
Sets the legend property for this Pedigree.

Parameters:
legend - The new Legend object

getLegend

public Legend getLegend()
Gets the current Pedigree's Legend items

Returns:
A hashmap whose contents is the legend items for the current Pedigree.

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.


setNextupn

public void setNextupn(int n)
Sets the supplied parameter as the Pedigree's next UPN. The next Individual created/added to this Pedigree will have the UPN specified here.

Parameters:
n - The next UPN

setNextTreeID

public void setNextTreeID(int treeid)
Sets the next available TREEID for use in creating an new Family


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)
Enables Pedigree to add / register for and receieve property change events

Overrides:
addPropertyChangeListener in class java.awt.Container

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)
Enables Pedigree to remove property change events listeners and stop receiving property change events

Overrides:
removePropertyChangeListener in class java.awt.Component

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
Since:
Updated since ver1.01 to ensure that smartHaplotyping is done when the showhaplotypes property is set to true

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.

isChanged

public boolean isChanged()
Currently NOT USED


setChanged

public void setChanged(boolean value)
Currently NOT USED


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 x-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.x = previous Individual's Icon.x + 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 x-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.x = previous Individual's Icon.x + 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.

saveImage

public void saveImage(java.lang.String format)
               throws java.security.AccessControlException
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)
Throws:
java.security.AccessControlException

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 java.awt.image.BufferedImage getImage()
Deprecated. since ver2.0

Generates and returns an image of the current pedigree in the form of a BufferedImage object. If the generation of the image is not successful, NULL is returned. Note: This method is not thread safe hence must be used carefully if multiple threads are being handled by your applications. Also note that calling this method from the event dispatch thread will result in an undefined state and may lock the system. Users are advised to use the method Pedigree.getImage(BufferedImage im[]) instead of this one as then there are no issues related to which thread the method is called from.

Returns:
A buffered image of the current pedigree or NULL

getImage

public void getImage(java.awt.image.BufferedImage[] lBilImage)
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:
lBilImage - 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.


paintComponent

public void paintComponent(java.awt.Graphics g)
Custom paint method draws Pedigree objects on the canvas each time a call is issued to the painting engine.

Overrides:
paintComponent in class javax.swing.JComponent

smartDraw

public void smartDraw()
This method excutes the drawing algorithm that calculates the most appropriate positions for each Individual in the Pedigree. After each Individual has been position approproately, a call to repaint is made so that the Individuals within the Pedigree may be placed on the canvas. The algorithm starts the calculation by extracting from the family list, any one root (the oldest) Individual as determined by generation. From this Individual, it traverses downwards to children and sideways to siblings and spouses until all connected Individuals have been exhausted. If there are other Individuals who are not directly (in a different subtree) connected to this first Individual, a new traversal thread is created until all Individuals have been traversed and placed ready for drawing/rendering. While smartDraw() in being executed, all painting (if prompted by some means) is done from a background buffer so that the user continues to see the previous Pedigree structure until such time as the algorithm has successfuly executed and hence determined the most appropriate positions for the Individuals and their symbols. If a new Pedigree is being created, the old one (if there is one) will remain current until the algorithm has finished running. This algorthm is only executed either on demand by calling the method smartDraw() directly or indirectly by adding Individuals to the Pedigree while the control / bean is in AUTODRAW mode. In all other cases aClickvent.g. during dragging, drawing is performed using other algorithms that strive to maintain the current screen position of the each Individual, moving them only in response to the mouse dragging events by distances relative to their positions previously calculated using the smartDraw algorithm.


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;MARKER1;220;0;Paternal If instead the Allele Icon was clicked the the return string would be 100;MARKER1;220;1;Paternal A NULL string is returned if no Allele was found at such location.
Since:
Introduced ver1.01

getUPNFromTag

public java.lang.String getUPNFromTag(java.lang.String tag)
Returns The UPN of an Individual whose tag or external key is specified

Parameters:
tag - The tag of this Individual to search for
Returns:
The UPN of the Individual whose external tag or key is equal to specified value

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

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

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)
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)
                     throws java.security.AccessControlException,
                            java.lang.SecurityException,
                            java.lang.Exception
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.
Throws:
java.lang.Exception - If import fails
java.security.AccessControlException
java.lang.SecurityException

setGenerations

public void setGenerations(Individual ind)
This method traverses a family tree in which Individual "ind" is a member and sets the generations of Individuals appropriately. If "ind" 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:
ind - The individual for whom generations is to be set.

addPerson

public void addPerson(java.lang.String as_personid,
                      java.lang.String as_relationship,
                      boolean deceased)
               throws java.lang.Exception
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 :- RelationshipConstants.MOTHER RelationshipConstants.FATHER RelationshipConstants.DAUGHTER RelationshipConstants.SON RelationshipConstants.SISTER RelationshipConstants.BROTHER RelationshipConstants.TWINSISTER RelationshipConstants.TWINBROTHER RelationshipConstants.SPOUSE
Throws:
java.lang.Exception - If the add operation is unsuccessful. All Exceptions that may be cascaded up from each of the addXXX methods and rethrown as Exception objects by this method.

addParent

public Individual addParent(java.lang.String as_childid,
                            java.lang.String as_relationship,
                            boolean deceased)
                     throws java.lang.Exception
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
Throws:
java.lang.Exception - If the add operation is unsuccessful.
PedigreeException - If any one of the Pedigree rules is violated by this operation.

addSpouse

public java.lang.String addSpouse(Individual aSpouse,
                                  boolean deceased)
                           throws com.objex.panywhere.PedigreeException,
                                  java.lang.Exception
Add a lSpouse 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:
aSpouse - 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
Throws:
java.lang.Exception - If the operation cannot be completed successfully
PedigreeException - If any one of the Pedigree rules is violated by this operation.

connectSpouse

public void connectSpouse(Individual to_spouse,
                          Individual aSpouse,
                          boolean liberal)
                   throws com.objex.panywhere.PedigreeException,
                          java.lang.Exception
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.
aSpouse - 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.
Throws:
java.lang.Exception - If operation is unsuccessful
PedigreeException - If any one of the Pedigree rules is violated by this operation.

connectChild

public void connectChild(Individual as_parent,
                         Individual as_child,
                         boolean liberal)
                  throws com.objex.panywhere.PedigreeException,
                         java.lang.Exception
Used to connect two Individuals who already exist in the Pedigree to one another as child and parent.

Parameters:
as_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.
as_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.
Throws:
java.lang.Exception - If the connection operation is unsuccessful
PedigreeException - If any one of the Pedigree rules is violated by this operation.

connectParent

public void connectParent(Individual as_child,
                          Individual as_parent,
                          boolean liberal)
                   throws com.objex.panywhere.PedigreeException,
                          java.lang.Exception
Used to connect two Individuals who already exist in the Pedigree to one another as child and parent.

Parameters:
as_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.
as_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.
Throws:
java.lang.Exception - If the connection operation is unsuccessful
PedigreeException - If any one of the Pedigree rules is violated by this operation.

connectSibling

public boolean connectSibling(Individual to_sibling,
                              Individual new_sibling,
                              boolean asTwin,
                              boolean liberal)
                       throws com.objex.panywhere.PedigreeException,
                              java.lang.Exception
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
Throws:
java.lang.Exception - If the connection operation is unsuccessful
PedigreeException - If any one of the Pedigree rules is violated by this operation.

addTwin

public Individual addTwin(Individual to_sibling,
                          java.lang.String as_relationship,
                          boolean deceased)
                   throws java.lang.Exception
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
Throws:
java.lang.Exception - If the add operation is unsuccessful

addSibling

public java.lang.String addSibling(java.lang.String as_sibling,
                                   java.lang.String as_relationship,
                                   boolean deceased)
                            throws java.lang.Exception
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.
Throws:
java.lang.Exception - If the add operation is unsuccessful

addChild

public Individual addChild(java.lang.String as_parentid,
                           java.lang.String as_relationship,
                           boolean deceased)
                    throws com.objex.panywhere.PedigreeException,
                           java.lang.Exception
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.
Throws:
java.lang.Exception - If the add operation is unsuccessful
PedigreeException - If any one of the Pedigree rules is violated by this operation.

addUnconnected

public java.lang.String addUnconnected(java.lang.String gender,
                                       boolean deceased,
                                       double x,
                                       double y)
                                throws java.lang.Exception
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)
                                throws java.lang.Exception
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
Throws:
java.lang.Exception - When the add operation is unsuccessful, an exception is thrown which must be caught by the caller

highlightPerson

public Individual highlightPerson(Individual aPerson,
                                  java.awt.Graphics2D g2d)
Deprecated. Sets the Individual "aPerson"'s highlighted status to true. The next time the Pedigree is painted this Individual's icon will be drawn highlighted

Parameters:
aPerson - The Individual to be highlighted
g2d - The graphics context
Returns:
The Individual whose Icon has been highlighted

highlightPerson

public Individual highlightPerson(Individual as_person,
                                  java.awt.Graphics2D g2d,
                                  boolean showarrow)
Deprecated. Sets the Individual "aPerson"'s highlighted status to true. The next time the Pedigree is painted this Individual's icon will be drawn highlighted

Parameters:
as_person - The Individual to be highlighted
g2d - The graphics context
showarrow - A boolean flag indicating whether or not the arrow highlighting the ancestral or decendancy path must be shown.

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 Individual "ind's" kids

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

highlightRelatives

public void highlightRelatives(Individual ind,
                               int degree,
                               java.awt.Graphics2D g2d)
Highlights all the relatives of this Individual depending on degree of relation chosen. Highlighted Individuals' Icon will be drawn in highlighted yellow squares with black handles at appropriate positions of the Icon. If the system is in One Click Add mode, then the OCA handles will also be shown and may be used to add relations to the highlighted Individual.

Parameters:
ind - 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
g2d - The graphics object. May not be null

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,
                               java.awt.Graphics2D g2d)
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:
as_upn - The (UPN) of the person to be highlighted whose relatives are to be highlighted
degree - The degree of relation or number of hops from IND to the relative. Negative "degree" value means all relatives will be highlighted
g2d - The graphics object. May pass a null value

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

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()
                      throws java.lang.Exception
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
Throws:
java.lang.Exception - if there is a problem accessing the system clipboard

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()
                     throws java.lang.Exception
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
Throws:
java.lang.Exception - If there is a problem accesing the system clipboard or if the environment is headless (no graphics) or some other problem occurs that results in an unsuccessfull attempt.

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 UPN list of 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.

Since:
ver3.0

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()
                              throws java.security.AccessControlException,
                                     java.lang.SecurityException,
                                     java.lang.Exception
Generates an XML string from the current Pedigree data and returns a String whose contents are the XML data. This string can be the basis for data exchange between the Java Bean and the external systems that may have a need to extract data from the Pedigree. An external application would just have to parse the XML data defined by the string.

Returns:
A String object whose contents is the XML data generated from current Pedigree.
Throws:
java.lang.Exception - If system is unable obtain the XML String from the Pedigree
java.security.AccessControlException
java.lang.SecurityException

getXMLString

public java.lang.String getXMLString(boolean includeSubtext)
                              throws com.objex.panywhere.PedigreeException
Generates an XML string from the current Pedigree data and returns a String whose contents are the XML data. This string can be the basis for data exchange between the Java Bean and the external systems that may have a need to extract data from the Pedigree. An external application would just have to parse the XML data defined by the string.

Parameters:
includeSubtext - Flag indiicating whether or not Icon subtext must be included as part of the exported data.
Returns:
A String object whose contents is the XML data generated from current Pedigree.
Throws:
PedigreeException - If system is unable obtain the XML String from the Pedigree due to a rutntime error

exportXML

public void exportXML(java.io.File aXMLFile)
               throws com.objex.panywhere.PedigreeException
Exports current Pedigree data in XML format and writes contents into an output stream specified by "xmlFile". A new file will be created or an existing one will be overwritten.

Parameters:
aXMLFile - The xml file handle/object to which data has to be exported. xmlFile may or may not exist.
Throws:
PedigreeException - If system is unable to create the xml output file or if the export procedure fails for one reason or another

importXML

public void importXML(java.lang.String xmlFileName)
               throws com.objex.panywhere.PedigreeException
Imports data from an XML input stream 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.

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

importXML

public void importXML(java.io.File xmlFile)
               throws com.objex.panywhere.PedigreeException
Import data from an XML input stream (File or string )and constructs a Pedigree from the imported data.Smart draw follows the completion of the import. Any existing Pedigree data will be cleared in preparation for the imported data

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

importXMLString

public void importXMLString(java.lang.String xmlString)
                     throws com.objex.panywhere.PedigreeException
Imports data from a supplied XML String and parses that String to construct a Pedigree. This method is the basis for data exchange between an external system and the Java Bean. External systems that wich to use the Java Bean's Pedigree drawing technology just need to format the data in the format specified by the DTD and/or XM schema file and then pass it to the Java Bean as a string by calling this method. The data is then parsed and a Pedigree constructed from it. The smartDraw() algorithm is executed once all the data has been imported successfuly

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

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pf,
                 int ai_page)
Called by the printing susbsystem to render a page of Pedigree data on a printer device. This method is called automatically by the Graphics environment whenever a new printerJob is created / excuted, hence it may not be called directly.

Specified by:
print in interface java.awt.print.Printable
Parameters:
g - Graphics
pf - Page Format
ai_page - The page number to be printed (0 based index)

getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize()
Specified by:
getPreferredScrollableViewportSize in interface javax.swing.Scrollable
Returns:
The preferred size of the viewport. Value returned equals Scrollable component's minimum size.

getScrollableBlockIncrement

public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Specified by:
getScrollableBlockIncrement in interface javax.swing.Scrollable
Returns:
The number of pixels to move the compoennt by for each block scroll event on this Scrollable component. This method returns the number of pixels equal to viewport width or height depending on the direction of the scroll event.

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Specified by:
getScrollableTracksViewportHeight in interface javax.swing.Scrollable
Returns:
False since no wrapping of the component's contents is wanted when those contents are rendered beyond the viewport height.

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Specified by:
getScrollableTracksViewportWidth in interface javax.swing.Scrollable
Returns:
False since no wrapping of the component's contents is wanted when those contents are rendered beyond the viewport width.

getScrollableUnitIncrement

public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
                                      int orientation,
                                      int direction)
A JScrollPane object will use this method to determine the number of pixels to move this component by when scrolling with a viewport. The maximum unit Increment will be 50 pixels otherwise smaller than 50 if scrolling the component by 50 will position the viewport end points beyond the size of the component for scrolls in the positive direction or below zero for scrolls in the negative direction.

Specified by:
getScrollableUnitIncrement in interface javax.swing.Scrollable
Returns:
The number of pixels to scroll the component by every time a scroll event is executed on this Scrollable component

getDatadictionary

public DataDictionary getDatadictionary()
Getter for property datadictionary.

Returns:
Value of property datadictionary.

setDatadictionary

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

Parameters:
rhs - New value of property datadictionary.

getBeanfontname

protected java.lang.String getBeanfontname()
Getter for property beanfontname.

Returns:
Value of property beanfontname.

setBeanfontname

protected void setBeanfontname(java.lang.String beanfontname)
Setter for property beanfontname.

Parameters:
beanfontname - New value of property beanfontname.

getIndividualRenderer

public IndividualRenderer getIndividualRenderer()
Getter for property individualRenderer. The Individual Renderer performs the painting of Indvidual Icons on the Pedigree canvas. While not recommended, you may create a custom IndividualRenderer object by subclassing IndividualRenderer and overiding its public painting methods and then use this method to inform the Pedigree that there is a new IndividualRenderer.

Returns:
Value of property individualRenderer.

setIndividualRenderer

public void setIndividualRenderer(IndividualRenderer individualRenderer)
Setter for property individualRenderer. The Individual Renderer performs the painting of Indvidual Icons on the Pedigree canvas. While not recommended, you may create a custom IndividualRenderer object 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:
individualRenderer - 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.


finalize

public void finalize()
Overrides:
finalize in class java.lang.Object