Class FamilyTreePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
FamilyTreeGUI

public class FamilyTreePanel extends JPanel
This class is a JPanel that can be used to display a family tree.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • addComponents

      Adds the GUI components to a FamilyTreePanel
    • setSourceText

      void setSourceText(String text)
      Sets the text displayed in the source location label.
    • canEdit

      boolean canEdit()
      Returns true if this GUI can be used to edit a person.
    • showPerson

      void showPerson(Person person)
      Sets the Person displayed in the GUI
    • displayMother

      Displays the current Person's mother
    • displayFather

      Displays the current Person's father
    • getFamilyTree

      Returns the FamilyTree being edited.
    • setDirty

      void setDirty(boolean isDirty)
      Called when the family tree changes dirtiness. Has no effect with the panel.
    • newPerson

      void newPerson()
      Called when a new person is to be created. Has no effect with the panel.
    • editPerson

      void editPerson()
      Called when a person is to be edited. No effect with the panel.
    • addMarriage

      void addMarriage()
      Called when a marriage is added. No effect with the panel.
    • getFrame

      Returns the JFrame associated with this GUI. Returns null for the panel.
    • setURLSource

      protected void setURLSource(URL url)
      Sets the source of the XML file displayed in this GUI
    • parseSource

      Parses a URL and tries to extract a family tree in XML format from it.
      Throws:
      IOException
      FamilyTreeException
    • main

      public static void main(String[] args)
      Creates a FamilyTreePanel that is displayed inside a JFrame