Class TreeFrame

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class TreeFrame extends JFrame
A frame for displaying a tree. This provides a straightforward means for displaying a tree that implements TreeInterface. The frame contains a scroll pane which contains a TreeComponent displaying the tree.
Author:
Rod Howell (rhowell@ksu.edu)
See Also:
  • Constructor Details

    • TreeFrame

      public TreeFrame(TreeInterface t, int maxHeight, Colorizer c)
      Contstructs a TreeFrame displaying the given tree. The frame has a meaningful initial size and is ready to be displayed.
      Parameters:
      t - the tree to be displayed.
      maxHeight - the maximum height to be displayed
      c - the Colorizer to colorize the tree
    • TreeFrame

      public TreeFrame(TreeInterface t, int maxHeight)
      Contstructs a TreeFrame displaying the given tree. The frame has a meaningful initial size and is ready to be displayed.
      Parameters:
      t - the tree to be displayed.
      maxHeight - the maximum height to be displayed
    • TreeFrame

      public TreeFrame(TreeInterface t, int maxHeight, Colorizer c, Font fnt)
      Constructs a TreeFrame displaying the given tree using the given Font. The frame has a meaningful initial size and is ready to be displayed.
      Parameters:
      t - the tree to be displayed.
      maxHeight - the maximum height to be displayed
      c - the Colorizer to colorize the tree
      fnt - the Font to use
      Throws:
      NullPointerException - if fnt is null.
    • TreeFrame

      public TreeFrame(TreeInterface t, int maxHeight, Font fnt)
      Constructs a TreeFrame displaying the given tree using the given Font. The frame has a meaningful initial size and is ready to be displayed.
      Parameters:
      t - the tree to be displayed.
      maxHeight - the maximum height to be displayed
      fnt - the Font to use
      Throws:
      NullPointerException - if fnt is null.