Class GTree

  • All Implemented Interfaces:
    BusyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
    Direct Known Subclasses:
    DataTree

    public class GTree
    extends javax.swing.JPanel
    implements BusyListener
    Class for creating a JTree that supports filtering, threading, and a progress bar.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor Description
      GTree​(GTreeRootNode root)
      Creates a GTree with the given root node.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addGTModelListener​(javax.swing.event.TreeModelListener listener)  
      void addGTreeSelectionListener​(GTreeSelectionListener listener)  
      void addMouseListener​(java.awt.event.MouseListener listener)  
      void addSelectionPath​(javax.swing.tree.TreePath path)  
      void addTreeExpansionListener​(javax.swing.event.TreeExpansionListener listener)  
      void cancelWork()
      Signals that any multithreaded work should be cancelled.
      void clearFilter()  
      void clearSelectionPaths()  
      void clearSizeCache()  
      void collapseAll​(GTreeNode node)  
      protected JTreeMouseListenerDelegate createMouseListenerDelegate()  
      void dispose()  
      void expandAll()  
      void expandedStateRestored​(TaskMonitor onitor)
      A method that subclasses can use to be notified when tree state has been restored.
      void expandPath​(GTreeNode node)  
      void expandPath​(javax.swing.tree.TreePath path)  
      void expandPaths​(java.util.List<javax.swing.tree.TreePath> pathsList)  
      void expandPaths​(javax.swing.tree.TreePath[] paths)  
      void expandTree​(GTreeNode node)  
      void filterChanged()  
      javax.swing.CellEditor getCellEditor()  
      GTreeRenderer getCellRenderer()  
      GTreeDragNDropHandler getDragNDropHandler()  
      java.util.List<javax.swing.tree.TreePath> getExpandedPaths​(GTreeNode node)  
      GTreeFilter getFilter()  
      java.awt.Component getFilterField()
      Returns the filter text field in this tree.
      GTreeFilterProvider getFilterProvider()  
      java.lang.String getFilterText()  
      GTreeSelectionModel getGTSelectionModel()  
      protected javax.swing.JTree getJTree()  
      protected GTreeModel getModel()  
      long getModificationID()  
      java.awt.event.MouseListener[] getMouseListeners()  
      GTreeNode getNodeForLocation​(int x, int y)  
      GTreeNode getNodeForPath​(javax.swing.tree.TreePath path)
      Gets the node for the given path.
      java.awt.Rectangle getPathBounds​(javax.swing.tree.TreePath path)  
      javax.swing.tree.TreePath getPathForLocation​(int x, int y)  
      javax.swing.tree.TreePath getPathForRow​(int row)  
      GTreeState getRestoreTreeState()  
      GTreeRootNode getRootNode()
      This method always returns the root node given by the client, whether from the constructor or from setRootNode(GTreeRootNode).
      int getRowCount()  
      int getRowForPath​(javax.swing.tree.TreePath treePath)  
      protected javax.swing.JScrollPane getScrollPane()  
      javax.swing.tree.TreeSelectionModel getSelectionModel()  
      javax.swing.tree.TreePath getSelectionPath()  
      javax.swing.tree.TreePath[] getSelectionPaths()  
      java.lang.String getToolTipText​(java.awt.event.MouseEvent event)  
      GTreeState getTreeState()
      Returns a state object that allows this tree to later restore its expanded and selected state.
      GTreeState getTreeState​(GTreeNode node)  
      java.awt.Point getViewPosition()  
      java.awt.Rectangle getViewRect()  
      boolean hasFilterText()  
      boolean isBusy()  
      boolean isCollapsed​(javax.swing.tree.TreePath path)  
      boolean isDisposed()  
      boolean isEditing()  
      boolean isExpanded​(javax.swing.tree.TreePath treePath)  
      boolean isFiltered()  
      boolean isFilteringEnabled()  
      boolean isMyJTree​(javax.swing.JTree jTree)
      Returns true if the given JTree is the actual JTree used by this GTree.
      boolean isPathEditable​(javax.swing.tree.TreePath path)  
      boolean isPathSelected​(javax.swing.tree.TreePath treePath)  
      boolean isRootAllowedToCollapse()  
      boolean isRootVisible()  
      static void printEvent​(java.io.PrintWriter out, java.lang.String name, javax.swing.event.TreeModelEvent e)
      This method is useful for debugging tree problems.
      void refilter()  
      void removeGTModelListener​(javax.swing.event.TreeModelListener listener)  
      void removeGTreeSelectionListener​(GTreeSelectionListener listener)  
      void removeMouseListener​(java.awt.event.MouseListener listener)  
      void removeTreeExpansionListener​(javax.swing.event.TreeExpansionListener listener)  
      void restoreTreeState​(GTreeState state)
      Restores the expanded and selected state of this tree to that contained in the given state object.
      void runBulkTask​(GTreeBulkTask task)  
      void runTask​(GTreeTask task)
      Used to run tree tasks.
      void runTask​(MonitoredRunnable runnableTask)
      Used to run simple GTree tasks that can be expressed as a MonitoredRunnable (or a lambda taking a TaskMonitor).
      void scheduleFilterTask​(GTreeNode node)  
      void scrollPathToVisible​(javax.swing.tree.TreePath treePath)  
      void setActiveDropTargetNode​(GTreeNode node)  
      void setBusy​(boolean busy)  
      void setCellEditor​(javax.swing.tree.TreeCellEditor editor)  
      void setCellRenderer​(GTreeRenderer renderer)  
      void setDataTransformer​(FilterTransformer<GTreeNode> transformer)
      Sets a transformer object used to perform filtering.
      void setDragNDropHandler​(GTreeDragNDropHandler dragNDropHandler)  
      void setEditable​(boolean editable)  
      void setEnabled​(boolean enabled)  
      void setFilterFieldEnabled​(boolean enabled)
      Disabled the filter text field, but allows the tree to still filter.
      void setFilteringEnabled​(boolean enabled)
      Disables all filtering performed by this tree.
      void setFilterProvider​(GTreeFilterProvider filterProvider)  
      void setFilterText​(java.lang.String text)  
      void setFilterVisible​(boolean visible)
      Hides the filter field.
      void setHorizontalScrollPolicy​(int policy)  
      void setNodeEditable​(GTreeNode child)  
      void setPaintHandlesForLeafNodes​(boolean enable)
      Passing a value of false signals to disable the JTree's default behavior of showing handles for leaf nodes until they are opened.
      void setRootNode​(GTreeRootNode rootNode)
      Sets the root node for the GTree.
      void setRootNodeAllowedToCollapse​(boolean allowed)  
      void setRootVisible​(boolean b)  
      void setRowHeight​(int rowHeight)  
      void setScrollableUnitIncrement​(int increment)
      Sets the size of the scroll when mouse scrolling or pressing the scroll up/down buttons.
      void setSelectedNode​(GTreeNode node)  
      void setSelectedNodeByNamePath​(java.lang.String[] namePath)
      A convenience method to select a node by a path, starting with the tree root name, down each level until the desired node name.
      void setSelectedNodeByPathName​(javax.swing.tree.TreePath treePath)
      Selects the node that matches the each name in the given tree path.
      void setSelectedNodes​(GTreeNode... nodes)  
      void setSelectedNodes​(java.util.Collection<GTreeNode> nodes)  
      void setSelectionModel​(GTreeSelectionModel selectionModel)  
      void setSelectionPath​(javax.swing.tree.TreePath path)  
      void setSelectionPaths​(java.util.List<javax.swing.tree.TreePath> pathsList)  
      void setSelectionPaths​(javax.swing.tree.TreePath[] paths)  
      void setSelectionPaths​(javax.swing.tree.TreePath[] path, GTreeSelectionEvent.EventOrigin origin)  
      void setSeletedNodeByName​(GTreeNode parentNode, java.lang.String childName)
      A convenience method that allows clients that have created a new child node to select that node in the tree, without having to lookup the actual GTreeNode implementation.
      void setShowsRootHandles​(boolean b)  
      void setTransferHandler​(javax.swing.TransferHandler handler)  
      void setViewPosition​(java.awt.Point p)  
      void startEditing​(GTreeNode parent, java.lang.String childName)  
      void stopEditing()  
      java.lang.String toString()  
      protected void updateModelFilter()  
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GTree

        public GTree​(GTreeRootNode root)
        Creates a GTree with the given root node. The created GTree will use a threaded model for performing tasks, which allows the GUI to be responsive for reaaaaaaaaly big trees.
        Parameters:
        root - The root node of the tree.
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enabled)
        Overrides:
        setEnabled in class javax.swing.JComponent
      • setTransferHandler

        public void setTransferHandler​(javax.swing.TransferHandler handler)
        Overrides:
        setTransferHandler in class javax.swing.JComponent
      • setCellRenderer

        public void setCellRenderer​(GTreeRenderer renderer)
      • dispose

        public void dispose()
      • isDisposed

        public boolean isDisposed()
      • cancelWork

        public void cancelWork()
        Signals that any multithreaded work should be cancelled.
      • filterChanged

        public void filterChanged()
      • updateModelFilter

        protected void updateModelFilter()
      • getRestoreTreeState

        public GTreeState getRestoreTreeState()
      • getTreeState

        public GTreeState getTreeState()
        Returns a state object that allows this tree to later restore its expanded and selected state.

        Note: See the usage note at the header of this class concerning how tree state is used relative to the equals() method.

      • restoreTreeState

        public void restoreTreeState​(GTreeState state)
        Restores the expanded and selected state of this tree to that contained in the given state object.

        Note: See the usage note at the header of this class concerning how tree state is used relative to the equals() method.

        See Also:
        getTreeState(), getTreeState(GTreeNode), #cloneTreeState()
      • expandedStateRestored

        public void expandedStateRestored​(TaskMonitor onitor)
        A method that subclasses can use to be notified when tree state has been restored. This method is called after a major structural tree change has happened and the paths that should be opened have been opened. Thus any other nodes are closed and can be disposed, if desired.
        Parameters:
        taskMonitor -
      • getExpandedPaths

        public java.util.List<javax.swing.tree.TreePath> getExpandedPaths​(GTreeNode node)
      • expandTree

        public void expandTree​(GTreeNode node)
      • expandAll

        public void expandAll()
      • collapseAll

        public void collapseAll​(GTreeNode node)
      • expandPath

        public void expandPath​(GTreeNode node)
      • expandPath

        public void expandPath​(javax.swing.tree.TreePath path)
      • expandPaths

        public void expandPaths​(javax.swing.tree.TreePath[] paths)
      • expandPaths

        public void expandPaths​(java.util.List<javax.swing.tree.TreePath> pathsList)
      • clearSelectionPaths

        public void clearSelectionPaths()
      • setSelectedNode

        public void setSelectedNode​(GTreeNode node)
      • setSelectedNodes

        public void setSelectedNodes​(GTreeNode... nodes)
      • setSelectedNodes

        public void setSelectedNodes​(java.util.Collection<GTreeNode> nodes)
      • setSelectionPaths

        public void setSelectionPaths​(javax.swing.tree.TreePath[] paths)
      • setSelectionPaths

        public void setSelectionPaths​(java.util.List<javax.swing.tree.TreePath> pathsList)
      • setSelectionPath

        public void setSelectionPath​(javax.swing.tree.TreePath path)
      • setSelectedNodeByNamePath

        public void setSelectedNodeByNamePath​(java.lang.String[] namePath)
        A convenience method to select a node by a path, starting with the tree root name, down each level until the desired node name.
        Parameters:
        namePath - The path to select
      • setSeletedNodeByName

        public void setSeletedNodeByName​(GTreeNode parentNode,
                                         java.lang.String childName)
        A convenience method that allows clients that have created a new child node to select that node in the tree, without having to lookup the actual GTreeNode implementation.
        Parameters:
        parentNode - The parent containing a child by the given name
        childName - The name of the child to select
      • setSelectedNodeByPathName

        public void setSelectedNodeByPathName​(javax.swing.tree.TreePath treePath)
        Selects the node that matches the each name in the given tree path. It is worth noting that the items in the tree path themselves are not used to identify nodes, but the toString() of those items will be used.
        Parameters:
        treePath - The path containing the names of the path of the node to select
      • isCollapsed

        public boolean isCollapsed​(javax.swing.tree.TreePath path)
      • setHorizontalScrollPolicy

        public void setHorizontalScrollPolicy​(int policy)
      • getScrollPane

        protected javax.swing.JScrollPane getScrollPane()
      • setScrollableUnitIncrement

        public void setScrollableUnitIncrement​(int increment)
        Sets the size of the scroll when mouse scrolling or pressing the scroll up/down buttons. Most clients will not need this method, as the default behavior of the tree is correct, which is to scroll based upon the size of the nodes (which is usually uniform and a single row in size). However, some clients that have variable row height, with potentially large rows, may wish to change the scrolling behavior so that it is not too fast.
        Parameters:
        increment - the new (uniform) scroll increment.
      • getJTree

        protected final javax.swing.JTree getJTree()
      • getViewPosition

        public java.awt.Point getViewPosition()
      • setViewPosition

        public void setViewPosition​(java.awt.Point p)
      • getViewRect

        public java.awt.Rectangle getViewRect()
      • getNodeForLocation

        public GTreeNode getNodeForLocation​(int x,
                                            int y)
      • getNodeForPath

        public GTreeNode getNodeForPath​(javax.swing.tree.TreePath path)
        Gets the node for the given path. This is useful if the node that is in the path has been replaced by a new node that is equal, but a different instance.
        Parameters:
        path - the path of the node
        Returns:
        the current node in the tree
      • setActiveDropTargetNode

        public void setActiveDropTargetNode​(GTreeNode node)
      • setFilterText

        public void setFilterText​(java.lang.String text)
      • getFilterText

        public java.lang.String getFilterText()
      • setFilterFieldEnabled

        public void setFilterFieldEnabled​(boolean enabled)
        Disabled the filter text field, but allows the tree to still filter. This is useful if you want to allow programmatic filtering, but to not allow the user to filter.
        Parameters:
        enabled - True makes the filter field editable; false makes it uneditable
        See Also:
        setFilteringEnabled(boolean)
      • setFilteringEnabled

        public void setFilteringEnabled​(boolean enabled)
        Disables all filtering performed by this tree. Also, the filter field of the tree will be disabled.

        Use this method to temporarily disable filtering.

        Parameters:
        enabled - True to allow normal filtering; false to disable all filtering
        See Also:
        setFilterFieldEnabled(boolean)
      • setFilterVisible

        public void setFilterVisible​(boolean visible)
        Hides the filter field. Filtering will still take place, as defined by the GTreeFilterProvider.
        Parameters:
        visible - true to show the filter; false to hide it.
        See Also:
        setFilteringEnabled(boolean)
      • isFilteringEnabled

        public boolean isFilteringEnabled()
      • setDataTransformer

        public void setDataTransformer​(FilterTransformer<GTreeNode> transformer)
        Sets a transformer object used to perform filtering. This object is responsible for turning the tree's nodes into a list of strings that can be searched when filtering.
        Parameters:
        transformer - the transformer to set
      • getFilterField

        public java.awt.Component getFilterField()
        Returns the filter text field in this tree.
        Returns:
        the filter text field in this tree.
      • isMyJTree

        public boolean isMyJTree​(javax.swing.JTree jTree)
        Returns true if the given JTree is the actual JTree used by this GTree.
        Parameters:
        jTree - the tree to test
        Returns:
        true if the given JTree is the actual JTree used by this GTree.
      • setRootNode

        public void setRootNode​(GTreeRootNode rootNode)
        Sets the root node for the GTree.

        Note: If this call is made from the Swing thread, then it will install a temporary "In Progress" node and then return immediately. However, when called from any other thread, this method will block while any pending work is cancelled. In this scenario, when this method returns, the given root node will be the actual root node.

        Parameters:
        rootNode - The node to set.
      • getRootNode

        public GTreeRootNode getRootNode()
        This method always returns the root node given by the client, whether from the constructor or from setRootNode(GTreeRootNode). There is a chance that the root node being used by the GUI is an "In Progress" node that is a placeholder used while this threaded tree is setting the root node.
        Returns:
      • printEvent

        public static void printEvent​(java.io.PrintWriter out,
                                      java.lang.String name,
                                      javax.swing.event.TreeModelEvent e)
        This method is useful for debugging tree problems. Don't know where else to put it.
        Parameters:
        name - - Use this to indicate what tree event occurred ("node inserted" "node removed", etc.)
        e - the TreeModelEvent;
      • getSelectionModel

        public javax.swing.tree.TreeSelectionModel getSelectionModel()
      • getRowCount

        public int getRowCount()
      • getRowForPath

        public int getRowForPath​(javax.swing.tree.TreePath treePath)
      • getPathForRow

        public javax.swing.tree.TreePath getPathForRow​(int row)
      • getSelectionPath

        public javax.swing.tree.TreePath getSelectionPath()
      • getSelectionPaths

        public javax.swing.tree.TreePath[] getSelectionPaths()
      • isExpanded

        public boolean isExpanded​(javax.swing.tree.TreePath treePath)
      • isPathSelected

        public boolean isPathSelected​(javax.swing.tree.TreePath treePath)
      • isRootVisible

        public boolean isRootVisible()
      • setRootVisible

        public void setRootVisible​(boolean b)
      • setShowsRootHandles

        public void setShowsRootHandles​(boolean b)
      • scrollPathToVisible

        public void scrollPathToVisible​(javax.swing.tree.TreePath treePath)
      • getCellEditor

        public javax.swing.CellEditor getCellEditor()
      • getPathForLocation

        public javax.swing.tree.TreePath getPathForLocation​(int x,
                                                            int y)
      • getPathBounds

        public java.awt.Rectangle getPathBounds​(javax.swing.tree.TreePath path)
      • setRowHeight

        public void setRowHeight​(int rowHeight)
      • addSelectionPath

        public void addSelectionPath​(javax.swing.tree.TreePath path)
      • addTreeExpansionListener

        public void addTreeExpansionListener​(javax.swing.event.TreeExpansionListener listener)
      • removeTreeExpansionListener

        public void removeTreeExpansionListener​(javax.swing.event.TreeExpansionListener listener)
      • removeGTreeSelectionListener

        public void removeGTreeSelectionListener​(GTreeSelectionListener listener)
      • addGTModelListener

        public void addGTModelListener​(javax.swing.event.TreeModelListener listener)
      • removeGTModelListener

        public void removeGTModelListener​(javax.swing.event.TreeModelListener listener)
      • setEditable

        public void setEditable​(boolean editable)
      • startEditing

        public void startEditing​(GTreeNode parent,
                                 java.lang.String childName)
      • addMouseListener

        public void addMouseListener​(java.awt.event.MouseListener listener)
        Overrides:
        addMouseListener in class java.awt.Component
      • removeMouseListener

        public void removeMouseListener​(java.awt.event.MouseListener listener)
        Overrides:
        removeMouseListener in class java.awt.Component
      • getMouseListeners

        public java.awt.event.MouseListener[] getMouseListeners()
        Overrides:
        getMouseListeners in class java.awt.Component
      • setCellEditor

        public void setCellEditor​(javax.swing.tree.TreeCellEditor editor)
      • isPathEditable

        public boolean isPathEditable​(javax.swing.tree.TreePath path)
      • setPaintHandlesForLeafNodes

        public void setPaintHandlesForLeafNodes​(boolean enable)
        Passing a value of false signals to disable the JTree's default behavior of showing handles for leaf nodes until they are opened.
        Parameters:
        enable - False to disable the default JTree behavior
      • isRootAllowedToCollapse

        public boolean isRootAllowedToCollapse()
      • setRootNodeAllowedToCollapse

        public void setRootNodeAllowedToCollapse​(boolean allowed)
      • getModificationID

        public long getModificationID()
      • isBusy

        public boolean isBusy()
      • setBusy

        public void setBusy​(boolean busy)
        Specified by:
        setBusy in interface BusyListener
      • refilter

        public void refilter()
      • hasFilterText

        public boolean hasFilterText()
      • clearFilter

        public void clearFilter()
      • runTask

        public void runTask​(GTreeTask task)
        Used to run tree tasks. This method is not meant for general clients of this tree, but rather for tasks to tell the tree to perform subtasks.
        Parameters:
        task - the task to run
      • scheduleFilterTask

        public void scheduleFilterTask​(GTreeNode node)
      • isEditing

        public boolean isEditing()
      • stopEditing

        public void stopEditing()
      • setNodeEditable

        public void setNodeEditable​(GTreeNode child)
      • isFiltered

        public boolean isFiltered()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.awt.Component
      • getToolTipText

        public java.lang.String getToolTipText​(java.awt.event.MouseEvent event)
        Overrides:
        getToolTipText in class javax.swing.JComponent
      • clearSizeCache

        public void clearSizeCache()