Class TreePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, TreeSelectionListener

public class TreePanel extends JPanel implements TreeSelectionListener
This class shows a tree on the left and a card panel on the right
See Also:
  • Field Details

  • Constructor Details

    • TreePanel

      public TreePanel()
      ctor
    • TreePanel

      public TreePanel(boolean useSplitPane, int treeWidth)
      _more_
      Parameters:
      useSplitPane - _more_
      treeWidth - _more_
  • Method Details

    • doMakeTreeCellRenderer

      public DefaultTreeCellRenderer doMakeTreeCellRenderer()
      _more_
      Returns:
      _more_
    • getVisibleComponent

      public Component getVisibleComponent()
      _more_
      Returns:
      _more_
    • valueChanged

      public void valueChanged(TreeSelectionEvent e)
      Handle tree selection changed
      Specified by:
      valueChanged in interface TreeSelectionListener
      Parameters:
      e - event
    • setIcon

      public void setIcon(Component comp, ImageIcon icon)
      _more_
      Parameters:
      comp - _more_
      icon - _more_
    • addComponent

      public void addComponent(JComponent component, String category, String label, ImageIcon icon)
      Add the component to the panel
      Parameters:
      component - component
      category - tree category. May be null.
      label - Tree node label
      icon - Node icon. May be null.
    • addComponent

      public void addComponent(JComponent component, String category, String label, ImageIcon icon, Object object)
      _more_
      Parameters:
      component - _more_
      category - _more_
      label - _more_
      icon - _more_
      object - _more_
    • addCategoryComponent

      public void addCategoryComponent(String cat, JComponent comp)
      _more_
      Parameters:
      cat - _more_
      comp - _more_
    • removeComponent

      public void removeComponent(JComponent component)
      _more_
      Parameters:
      component - _more_
    • show

      public void show(Component component)
      _more_
      Parameters:
      component - _more_
    • showPath

      public void showPath(Component component)
      Show the tree node that corresponds to the component
      Parameters:
      component - comp
    • openAll

      public void openAll()
      Open all paths
    • closeAll

      public void closeAll()
      Close all paths