com.alee.extended.tree
Class WebExTree<E extends UniqueNode>

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTree
                  extended by com.alee.laf.tree.WebTree<E>
                      extended by com.alee.extended.tree.WebExTree<E>
All Implemented Interfaces:
SettingsMethods, EventMethods, FontMethods<WebTree<E>>, SwingMethods, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable

public class WebExTree<E extends UniqueNode>
extends WebTree<E>

WebTree extension that provides simple and convenient way to load tree data. Simply implement ExTreeDataProvider interface and pass it into the tree to create its structure.

Author:
Mikle Garin
See Also:
ExTreeModel, ExTreeDataProvider, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTree
javax.swing.JTree.AccessibleJTree, javax.swing.JTree.DropLocation, javax.swing.JTree.DynamicUtilTreeNode, javax.swing.JTree.EmptySelectionModel, javax.swing.JTree.TreeModelHandler, javax.swing.JTree.TreeSelectionRedirector
 
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
protected  java.util.Comparator<E> comparator
          Tree nodes comparator.
protected  Filter<E> filter
          Tree nodes filter.
 
Fields inherited from class com.alee.laf.tree.WebTree
cellEditorListeners, CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, editableStateProvider, scrollToSelectionListener, SINGLE_TREE_SELECTION, toolTipProvider, TREE_COMPARATOR_PROPERTY, TREE_DATA_PROVIDER_PROPERTY, TREE_FILTER_PROPERTY
 
Fields inherited from class javax.swing.JTree
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
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
WebExTree()
          Constructs sample ex tree.
WebExTree(ExTreeDataProvider dataProvider)
          Costructs ex tree using data from the custom data provider.
 
Method Summary
 void addChildNode(E parent, E child)
          Adds child node for the specified node.
 void addChildNodes(E parent, java.util.List<E> children)
          Adds child nodes for the specified node.
 void clearComparator()
          Removes any applied tree nodes comparator.
 void clearFilter()
          Removes any applied tree nodes filter.
 void expandNode(java.lang.String nodeId)
          Expands node with the specified ID.
 void expandPath(java.util.List<java.lang.String> pathNodeIds)
          Expands path using the specified node path IDs.
 void expandPath(java.util.List<java.lang.String> pathNodeIds, boolean expandLastNode)
          Expands path using the specified node path IDs.
 void expandPath(java.util.List<java.lang.String> pathNodeIds, boolean expandLastNode, boolean selectLastNode)
          Expands path using the specified node path IDs.
protected  void expandPathEndImpl(E lastFoundNode, boolean expandLastNode, boolean selectLastNode)
          Finishes async tree path expansion.
protected  void expandPathImpl(E currentNode, java.util.List<java.lang.String> leftToExpand, boolean expandLastNode, boolean selectLastNode)
          Performs a single path node expansion.
 E findNode(java.lang.String nodeId)
          Looks for the node with the specified ID in the tree model and returns it or null if it was not found.
 java.util.Comparator<E> getComparator()
          Returns tree nodes comparator.
 ExTreeDataProvider<E> getDataProvider()
          Returns ex tree data provider.
 ExTreeModel<E> getExModel()
          Returns ex tree model.
 Filter<E> getFilter()
          Returns tree nodes filter.
 void insertChildNode(E child, E parent, int index)
          Inserts child node into parent node.
 void insertChildNodes(E[] children, E parent, int index)
          Inserts an array of child nodes into parent node.
 void insertChildNodes(java.util.List<E> children, E parent, int index)
          Inserts a list of child nodes into parent node.
 boolean isExModel()
          Returns whether ex tree model is installed or not.
protected  void performReload(E node, javax.swing.tree.TreePath path, boolean select)
          Performs the actual reload call.
 E reloadNode(E node)
          Reloads specified node childs.
 E reloadNode(E node, boolean select)
          Reloads specified node childs and selects it if requested.
 E reloadNode(java.lang.String nodeId)
          Reloads node with the specified ID.
 E reloadNodeUnderPoint(int x, int y)
          Reloads node under the specified point.
 E reloadNodeUnderPoint(java.awt.Point point)
          Reloads node under the specified point.
 E reloadPath(javax.swing.tree.TreePath path)
          Reloads node childs at the specified path.
 E reloadPath(javax.swing.tree.TreePath path, boolean select)
          Reloads node childs at the specified path and selects it if needed.
 E reloadRootNode()
          Reloads root node childs.
 void reloadSelectedNodes()
          Reloads selected node childs.
 boolean removeNode(E node)
          Removes node from tree structure.
 boolean removeNode(java.lang.String nodeId)
          Removes node with the specified ID from tree structure.
 void removeNodes(E[] nodes)
          Removes nodes from tree structure.
 void removeNodes(java.util.List<E> nodes)
          Removes nodes from tree structure.
 void setChildNodes(E parent, java.util.List<E> children)
          Sets child nodes for the specified node.
 void setComparator(java.util.Comparator<E> comparator)
          Sets tree nodes comparator.
 void setDataProvider(ExTreeDataProvider dataProvider)
          Changes data provider for this ex tree.
 void setFilter(Filter<E> filter)
          Sets tree nodes filter.
 void updateNode(E node)
          Forces tree node to be updated.
 void updateNode(java.lang.String nodeId)
          Forces tree node with the specified ID to be updated.
 void updateNodeStructure(E node)
          Forces tree node structure with the specified ID to be updated.
 void updateNodeStructure(java.lang.String nodeId)
          Forces tree node structure with the specified ID to be updated.
 void updateSortingAndFiltering()
          Updates nodes sorting and filtering for all loaded nodes.
 void updateSortingAndFiltering(E node)
          Updates sorting and filtering for the specified node childs.
 
Methods inherited from class com.alee.laf.tree.WebTree
addCellEditorListener, changeFontSize, createTreeModel, expandAll, expandAll, expandAll, expandAll, expandAll, expandNode, expandRoot, getAllNodes, getCellRendererPane, getClosestNodeForLocation, getClosestNodeForLocation, getClosestPathForLocation, getDefaultTreeModel, getDropCellShadeWidth, getEditableStateProvider, getFirstVisibleLeafNode, getFontName, getFontSize, getFullRowBounds, getFullRowBounds, getLinesColor, getNodeBounds, getNodeBounds, getNodeForLocation, getNodeForLocation, getNodeForPath, getNodeForRow, getPathForLocation, getPathForNode, getRootNode, getRowForNode, getSelectedNode, getSelectedNodeBounds, getSelectedNodes, getSelectionBackgroundColor, getSelectionBorderColor, getSelectionRound, getSelectionShadeWidth, getSelectionStyle, getSelectorBorderColor, getSelectorColor, getSelectorRound, getSelectorStroke, getToolTipProvider, getTreeState, getTreeState, getVisibleSelectedNodes, getWebUI, init, isAutoExpandSelectedNode, isAutoExpandSingleChildNode, isBoldFont, isExpanded, isHighlightRolloverNode, isItalicFont, isNodeEditable, isPaintLines, isPathEditable, isPlainFont, isRolloverSelectionEnabled, isScrollToSelection, isSelected, isSelectorEnabled, isWebColoredSelection, loadSettings, onDoubleClick, onFocusGain, onFocusLoss, onKeyPress, onKeyPress, onKeyRelease, onKeyRelease, onKeyType, onKeyType, onMenuTrigger, onMouseClick, onMouseClick, onMouseDrag, onMouseDrag, onMouseEnter, onMouseExit, onMousePress, onMousePress, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, registerSettings, removeCellEditorListener, repaint, repaint, repaint, repaint, saveSettings, scrollToNode, scrollToSelection, scrollToStart, selectFirstVisibleLeafNode, selectNextRow, selectNextRow, selectNodeUnderPoint, selectNodeUnderPoint, selectPreviousRow, selectPreviousRow, setAutoExpandSelectedNode, setAutoExpandSingleChildNode, setBoldFont, setBoldFont, setCellEditor, setDropCellShadeWidth, setEditableStateProvider, setFontName, setFontSize, setFontSizeAndStyle, setFontSizeAndStyle, setFontStyle, setFontStyle, setHighlightRolloverNode, setItalicFont, setItalicFont, setLinesColor, setMultiplySelectionAllowed, setPaintLines, setPlainFont, setPlainFont, setRolloverSelectionEnabled, setScrollToSelection, setSelectedNode, setSelectedNodes, setSelectedNodes, setSelectionBackgroundColor, setSelectionBorderColor, setSelectionMode, setSelectionRound, setSelectionShadeWidth, setSelectionStyle, setSelectorBorderColor, setSelectorColor, setSelectorEnabled, setSelectorRound, setSelectorStroke, setToolTipProvider, setTreeState, setTreeState, setWebColoredSelection, startEditingNode, startEditingSelectedNode, unregisterSettings, updateAllVisibleNodes, updateUI
 
Methods inherited from class javax.swing.JTree
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDescendantToggledPaths, getDragEnabled, getDropLocation, getDropMode, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellRenderer, setDragEnabled, setDropMode, setEditable, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange
 
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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, 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, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

comparator

protected java.util.Comparator<E extends UniqueNode> comparator
Tree nodes comparator.


filter

protected Filter<E extends UniqueNode> filter
Tree nodes filter.

Constructor Detail

WebExTree

public WebExTree()
Constructs sample ex tree.


WebExTree

public WebExTree(ExTreeDataProvider dataProvider)
Costructs ex tree using data from the custom data provider.

Parameters:
dataProvider - custom data provider
Method Detail

getDataProvider

public ExTreeDataProvider<E> getDataProvider()
Returns ex tree data provider.

Returns:
data provider

setDataProvider

public void setDataProvider(ExTreeDataProvider dataProvider)
Changes data provider for this ex tree.

Parameters:
dataProvider - new data provider

getComparator

public java.util.Comparator<E> getComparator()
Returns tree nodes comparator.

Returns:
tree nodes comparator

setComparator

public void setComparator(java.util.Comparator<E> comparator)
Sets tree nodes comparator. Comparator replacement will automatically update all loaded nodes sorting.

Parameters:
comparator - tree nodes comparator

clearComparator

public void clearComparator()
Removes any applied tree nodes comparator.


getFilter

public Filter<E> getFilter()
Returns tree nodes filter.

Returns:
tree nodes filter

setFilter

public void setFilter(Filter<E> filter)
Sets tree nodes filter. Comparator replacement will automatically re-filter all loaded nodes.

Parameters:
filter - tree nodes filter

clearFilter

public void clearFilter()
Removes any applied tree nodes filter.


updateSortingAndFiltering

public void updateSortingAndFiltering()
Updates nodes sorting and filtering for all loaded nodes.


updateSortingAndFiltering

public void updateSortingAndFiltering(E node)
Updates sorting and filtering for the specified node childs.


getExModel

public ExTreeModel<E> getExModel()
Returns ex tree model.

Returns:
ex tree model

isExModel

public boolean isExModel()
Returns whether ex tree model is installed or not.

Returns:
true if ex tree model is installed, false otherwise

setChildNodes

public void setChildNodes(E parent,
                          java.util.List<E> children)
Sets child nodes for the specified node. This method might be used to manually change tree node childs without causing any structure corruptions.

Parameters:
parent - node to process
children - new node children

addChildNode

public void addChildNode(E parent,
                         E child)
Adds child node for the specified node. This method might be used to manually change tree node childs without causing any structure corruptions.

Parameters:
parent - node to process
child - new node child

addChildNodes

public void addChildNodes(E parent,
                          java.util.List<E> children)
Adds child nodes for the specified node. This method might be used to manually change tree node childs without causing any structure corruptions.

Parameters:
parent - node to process
children - new node children

insertChildNodes

public void insertChildNodes(java.util.List<E> children,
                             E parent,
                             int index)
Inserts a list of child nodes into parent node. This method might be used to manually change tree node childs without causing any structure corruptions.

Parameters:
children - list of new child nodes
parent - parent node
index - insert index

insertChildNodes

public void insertChildNodes(E[] children,
                             E parent,
                             int index)
Inserts an array of child nodes into parent node. This method might be used to manually change tree node childs without causing any structure corruptions.

Parameters:
children - array of new child nodes
parent - parent node
index - insert index

insertChildNode

public void insertChildNode(E child,
                            E parent,
                            int index)
Inserts child node into parent node. This method might be used to manually change tree node childs without causing any structure corruptions.

Parameters:
child - new child node
parent - parent node
index - insert index

removeNode

public boolean removeNode(java.lang.String nodeId)
Removes node with the specified ID from tree structure. This method will have effect only if node exists.

Parameters:
nodeId - ID of the node to remove
Returns:
true if tree structure was changed by the operation, false otherwise

removeNode

public boolean removeNode(E node)
Removes node from tree structure. This method will have effect only if node exists.

Parameters:
node - node to remove
Returns:
true if tree structure was changed by the operation, false otherwise

removeNodes

public void removeNodes(java.util.List<E> nodes)
Removes nodes from tree structure. This method will have effect only if nodes exist.

Parameters:
nodes - list of nodes to remove

removeNodes

public void removeNodes(E[] nodes)
Removes nodes from tree structure. This method will have effect only if nodes exist.

Parameters:
nodes - array of nodes to remove

findNode

public E findNode(java.lang.String nodeId)
Looks for the node with the specified ID in the tree model and returns it or null if it was not found.

Parameters:
nodeId - node ID
Returns:
node with the specified ID or null if it was not found

updateNode

public void updateNode(java.lang.String nodeId)
Forces tree node with the specified ID to be updated.

Parameters:
nodeId - ID of the tree node to be updated

updateNode

public void updateNode(E node)
Forces tree node to be updated.

Parameters:
node - tree node to be updated

updateNodeStructure

public void updateNodeStructure(java.lang.String nodeId)
Forces tree node structure with the specified ID to be updated.

Parameters:
nodeId - ID of the tree node to be updated

updateNodeStructure

public void updateNodeStructure(E node)
Forces tree node structure with the specified ID to be updated.

Parameters:
node - tree node to be updated

reloadSelectedNodes

public void reloadSelectedNodes()
Reloads selected node childs.


reloadNodeUnderPoint

public E reloadNodeUnderPoint(java.awt.Point point)
Reloads node under the specified point.

Parameters:
point - point to look for node
Returns:
reloaded node or null if none reloaded

reloadNodeUnderPoint

public E reloadNodeUnderPoint(int x,
                              int y)
Reloads node under the specified point.

Parameters:
x - point X coordinate
y - point Y coordinate
Returns:
reloaded node or null if none reloaded

reloadRootNode

public E reloadRootNode()
Reloads root node childs.

Returns:
reloaded root node

reloadNode

public E reloadNode(java.lang.String nodeId)
Reloads node with the specified ID.

Parameters:
nodeId - ID of the node to reload
Returns:
reloaded node or null if none reloaded

reloadNode

public E reloadNode(E node)
Reloads specified node childs.

Parameters:
node - node to reload
Returns:
reloaded node or null if none reloaded

reloadNode

public E reloadNode(E node,
                    boolean select)
Reloads specified node childs and selects it if requested.

Parameters:
node - node to reload
select - whether select the node or not
Returns:
reloaded node or null if none reloaded

reloadPath

public E reloadPath(javax.swing.tree.TreePath path)
Reloads node childs at the specified path.

Parameters:
path - path of the node to reload
Returns:
reloaded node or null if none reloaded

reloadPath

public E reloadPath(javax.swing.tree.TreePath path,
                    boolean select)
Reloads node childs at the specified path and selects it if needed.

Parameters:
path - path of the node to reload
select - whether select the node or not
Returns:
reloaded node or null if none reloaded

performReload

protected void performReload(E node,
                             javax.swing.tree.TreePath path,
                             boolean select)
Performs the actual reload call.

Parameters:
node - node to reload
path - path to node
select - whether select the node or not

expandNode

public void expandNode(java.lang.String nodeId)
Expands node with the specified ID.

Parameters:
nodeId - ID of the node to expand

expandPath

public void expandPath(java.util.List<java.lang.String> pathNodeIds)
Expands path using the specified node path IDs. IDs are used to find real nodes within the expanded roots. Be aware that operation might stop even before reaching the end of the path if something unexpected happened.

Parameters:
pathNodeIds - node path IDs

expandPath

public void expandPath(java.util.List<java.lang.String> pathNodeIds,
                       boolean expandLastNode)
Expands path using the specified node path IDs. IDs are used to find real nodes within the expanded roots. Be aware that operation might stop even before reaching the end of the path if something unexpected happened.

Parameters:
pathNodeIds - node path IDs
expandLastNode - whether should expand last found path node or not

expandPath

public void expandPath(java.util.List<java.lang.String> pathNodeIds,
                       boolean expandLastNode,
                       boolean selectLastNode)
Expands path using the specified node path IDs. IDs are used to find real nodes within the expanded roots. Be aware that operation might stop even before reaching the end of the path if something unexpected happened.

Parameters:
pathNodeIds - node path IDs
expandLastNode - whether should expand last found path node or not
selectLastNode - whether should select last found path node or not

expandPathImpl

protected void expandPathImpl(E currentNode,
                              java.util.List<java.lang.String> leftToExpand,
                              boolean expandLastNode,
                              boolean selectLastNode)
Performs a single path node expansion. Be aware that operation might stop even before reaching the end of the path if something unexpected happened.

Parameters:
currentNode - last reached node
leftToExpand - node path IDs left for expansion
expandLastNode - whether should expand last found path node or not
selectLastNode - whether should select last found path node or not

expandPathEndImpl

protected void expandPathEndImpl(E lastFoundNode,
                                 boolean expandLastNode,
                                 boolean selectLastNode)
Finishes async tree path expansion.

Parameters:
lastFoundNode - last found path node
expandLastNode - whether should expand last found path node or not
selectLastNode - whether should select last found path node or not