Class TreeSelectionPane

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

public class TreeSelectionPane extends JComponent implements Accessible
A component to allow selection of nodes in a tree.
See Also:
  • Method Details

    • getAccessibleContext

      public AccessibleContext getAccessibleContext()
      Get the accessible context for this pane.
      Specified by:
      getAccessibleContext in interface Accessible
      Overrides:
      getAccessibleContext in class Component
      Returns:
      the accessible context for this pane
    • getSelection

      public String[] getSelection()
      Get the current selection, represented as a set of paths to the selected nodes.
      Returns:
      the current selection, represented as a set of paths to the selected nodes
      See Also:
    • setSelection

      public void setSelection(String... paths)
      Set the current selection, by means of a set of paths to the nodes to be selected.
      Parameters:
      paths - a set of paths to the nodes to be selected
      See Also:
    • isSelectionEmpty

      public boolean isSelectionEmpty()
      Check if the selection is empty.
      Returns:
      true if the selection is empty
    • clear

      public void clear()
      Clear the current selection.
      See Also:
    • setEnabled

      public void setEnabled(boolean b)
      Overrides:
      setEnabled in class JComponent