Class FWTreePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
FWKeyWordTreePanel, FWResultTreePanel, FWSimComponentsTreePanel, FWSimSolutionTreePanel

public class FWTreePanel extends JPanel
Panel containing a FWTree in a scroll pane.
Author:
Andreas Enders
See Also:
  • Field Details

  • Constructor Details

    • FWTreePanel

      public FWTreePanel(FWTree aTree)
      Constructs a panel for an existing tree; the tree is not added to the panel.
      Parameters:
      aTree - the tree
    • FWTreePanel

      public FWTreePanel(FWTreeNodeFactory aTreeNodeFactory, Object aRootUserObject)
      Constructs Panel which contains Tree with special functions (Scrollpane a.s.o.)
      Parameters:
      aTreeNodeFactory - factory creating the nodes
      aRootUserObject - user object of the (invisible) root node
    • FWTreePanel

      public FWTreePanel(FWTreeNodeFactory aTreeNodeFactory, Object aRootUserObject, TreeCellRenderer aRenderer, String aCaption)
      Constructs Panel which contains Tree with special functions (Scrollpane a.s.o.)
      Parameters:
      aTreeNodeFactory - factory creating the nodes
      aRootUserObject - user object of the (invisible) root node
      aRenderer - cell renderer (currently not used, the tree uses a FWTreeCellRenderer)
      aCaption - caption (currently not shown)
  • Method Details

    • getTree

      public FWTree getTree()
      Returns:
      the included tree instance
    • getTreeLocationOnScreen

      public Point getTreeLocationOnScreen()
      Returns:
      the location of the tree on the screen
    • updateTree

      public void updateTree(FWTreeNodeFactory aModel, Object aRootUserObject)
      Replaces the content of the panel by a newly created tree.
      Parameters:
      aModel - factory creating the nodes
      aRootUserObject - user object of the (invisible) root node