|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JTree com.alee.laf.tree.WebTree<E>
E
- tree nodes typepublic class WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>
This JTree extension class provides a direct access to WebTreeUI methods. There is also a set of additional methods to simplify some operations with tree.
This component should never be used with a non-Web UIs as it might cause an unexpected behavior. You could still use that component even if WebLaF is not your application L&F as this component will use Web-UI in any case.
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.List<javax.swing.event.CellEditorListener> |
cellEditorListeners
Tree cell editor listeners. |
static int |
CONTIGUOUS_TREE_SELECTION
Contiguous selection mode. |
static int |
DISCONTIGUOUS_TREE_SELECTION
Discontiguous selection mode. |
protected javax.swing.event.TreeSelectionListener |
scrollToSelectionListener
Listener that forces tree to scroll view to selection. |
static int |
SINGLE_TREE_SELECTION
Single selection mode. |
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 | |
---|---|
WebTree()
Constructs tree with default sample model. |
|
WebTree(E root)
Constructs tree with model based on specified root node. |
|
WebTree(E root,
boolean asksAllowsChildren)
Constructs tree with model based on specified root node and which decides whether a node is a leaf node in the specified manner. |
|
WebTree(java.util.Hashtable<?,?> value)
Constructs tree with model based on specified values. |
|
WebTree(java.lang.Object[] value)
Constructs tree with model based on specified values. |
|
WebTree(javax.swing.tree.TreeModel newModel)
Constructs tree with specified model. |
|
WebTree(java.util.Vector<?> value)
Constructs tree with model based on specified values. |
Method Summary | |
---|---|
void |
addCellEditorListener(javax.swing.event.CellEditorListener listener)
Adds tree cell editor listener. |
WebTree<E> |
changeFontSize(int change)
Changes font size of the specified component. |
protected static javax.swing.tree.TreeModel |
createTreeModel(java.lang.Object value)
Returns a TreeModel wrapping the specified object. |
void |
expandAll()
Expands all tree rows in a single call. |
void |
expandNode(E node)
Expands the specified node. |
void |
expandRoot()
Expands the root path, assuming the current TreeModel has been set. |
java.util.List<E> |
getAllNodes()
Returns list of all nodes added into the tree. |
E |
getClosestNodeForLocation(int x,
int y)
Returns closest tree node for the specified location. |
E |
getClosestNodeForLocation(java.awt.Point location)
Returns closest tree node for the specified location. |
javax.swing.tree.TreePath |
getClosestPathForLocation(java.awt.Point location)
Returns the path to the node that is closest to the specified location. |
static javax.swing.tree.TreeModel |
getDefaultTreeModel()
Creates and returns a sample TreeModel. |
int |
getDropCellShadeWidth()
Returns drop cell highlight shade width. |
E |
getFirstVisibleLeafNode()
Returns first visible leaf node from the top of the tree. |
java.lang.String |
getFontName()
Returns component font name. |
int |
getFontSize()
Returns component font size. |
java.awt.Color |
getLinesColor()
Returns tree structure lines color. |
java.awt.Rectangle |
getNodeBounds(E node)
Returns node bounds. |
java.awt.Rectangle |
getNodeBounds(java.util.List<E> nodes)
Returns nodes combined bounds. |
E |
getNodeForLocation(int x,
int y)
Returns tree node for the specified location. |
E |
getNodeForLocation(java.awt.Point location)
Returns tree node for the specified location. |
E |
getNodeForPath(javax.swing.tree.TreePath path)
Returns tree node for specified path. |
E |
getNodeForRow(int row)
Returns tree node for the specified row. |
javax.swing.tree.TreePath |
getPathForLocation(java.awt.Point location)
Returns the path for the node at the specified location. |
javax.swing.tree.TreePath |
getPathForNode(E node)
Returns tree path for specified node. |
E |
getRootNode()
Returns tree root node. |
E |
getSelectedNode()
Returns selected node. |
java.util.List<E> |
getSelectedNodes()
Returns selected nodes. |
int |
getSelectionRound()
Returns tree selection rounding. |
int |
getSelectionShadeWidth()
Returns tree selection shade width. |
TreeSelectionStyle |
getSelectionStyle()
Returns tree selection style. |
java.awt.Color |
getSelectorBorderColor()
Returns selector border color. |
java.awt.Color |
getSelectorColor()
Returns selector color. |
int |
getSelectorRound()
Returns selector rounding. |
java.awt.BasicStroke |
getSelectorStroke()
Returns selector border stroke. |
TreeState |
getTreeState()
Returns tree expansion and selection states. |
TreeState |
getTreeState(boolean saveSelection)
Returns tree expansion and selection states. |
WebTreeUI |
getWebUI()
Returns Web-UI applied to this class. |
protected void |
init()
Initializes additional tree settings. |
boolean |
isAutoExpandSelectedNode()
Returns whether tree should expand nodes on selection or not. |
boolean |
isBoldFont()
Returns whether component font is bold or not. |
boolean |
isExpanded(E node)
Returns whether node is expanded or not. |
boolean |
isHighlightRolloverNode()
Returns whether tree should highlight rollover node or not. |
boolean |
isItalicFont()
Returns whether component font is italic or not. |
boolean |
isPaintLines()
Returns whether tree should paint structure lines or not. |
boolean |
isPlainFont()
Returns whether component font is plain or not. |
boolean |
isRolloverSelectionEnabled()
Returns whether rollover selection is enabled for this list or not. |
boolean |
isScrollToSelection()
Returns whether tree automatically scrolls to selection or not. |
boolean |
isSelected(E node)
Returns whether specified node is selected or not. |
boolean |
isSelectorEnabled()
Returns whether selector is enabled or not. |
void |
removeCellEditorListener(javax.swing.event.CellEditorListener listener)
Removes tree cell editor listener. |
void |
repaint(E node)
Repaints specified node. |
void |
repaint(int row)
Repaints specified tree row. |
void |
repaint(int from,
int to)
Repaints all tree rows in specified range. |
void |
repaint(java.util.List<E> nodes)
Repaints specified node. |
void |
scrollToNode(E node)
Scrolls tree view to specified node. |
void |
scrollToSelection()
Scrolls tree view to selected nodes. |
void |
scrollToStart()
Scrolls tree view to the beginning of the tree. |
void |
selectFirstVisibleLeafNode()
Selects first visible leaf node from the top of the tree. |
void |
selectNextRow()
Selects row next to currently selected. |
void |
selectNextRow(boolean cycle)
Selects row next to currently selected. |
void |
selectNodeUnderPoint(int x,
int y)
Selects node under the specified point. |
void |
selectNodeUnderPoint(java.awt.Point point)
Selects node under the specified point. |
void |
selectPreviousRow()
Selects row next to currently selected. |
void |
selectPreviousRow(boolean cycle)
Selects row previous to currently selected. |
void |
setAutoExpandSelectedNode(boolean autoExpandSelectedNode)
Sets whether tree should expand nodes on selection or not. |
WebTree<E> |
setBoldFont()
Sets bold font for the component. |
WebTree<E> |
setBoldFont(boolean apply)
Sets bold font for the component. |
void |
setCellEditor(javax.swing.tree.TreeCellEditor cellEditor)
|
void |
setDropCellShadeWidth(int dropCellShadeWidth)
Sets drop cell highlight shade width. |
WebTree<E> |
setFontName(java.lang.String fontName)
Sets component font name. |
WebTree<E> |
setFontSize(int fontSize)
Sets component font size. |
WebTree<E> |
setFontSizeAndStyle(int fontSize,
boolean bold,
boolean italic)
Sets font size and style for the specified component. |
WebTree<E> |
setFontSizeAndStyle(int fontSize,
int style)
Sets font size and style for the specified component. |
WebTree<E> |
setFontStyle(boolean bold,
boolean italic)
Sets component font style. |
WebTree<E> |
setFontStyle(int style)
Sets component font style. |
void |
setHighlightRolloverNode(boolean highlight)
Sets whether tree should highlight rollover node or not. |
WebTree<E> |
setItalicFont()
Sets italic or plain font for the component. |
WebTree<E> |
setItalicFont(boolean apply)
Sets italic or plain font for the component. |
void |
setLinesColor(java.awt.Color color)
Sets tree structure lines color. |
void |
setMultiplySelectionAllowed(boolean allowed)
Sets whether multiply nodes selection allowed or not. |
void |
setPaintLines(boolean paint)
Sets whether tree should paint structure lines or not. |
WebTree<E> |
setPlainFont()
Sets plain font for the component. |
WebTree<E> |
setPlainFont(boolean apply)
Sets plain font for the component. |
void |
setRolloverSelectionEnabled(boolean enabled)
Sets whether rollover selection is enabled for this list or not. |
void |
setScrollToSelection(boolean scroll)
Sets whether tree should automatically scroll to selection or not. |
void |
setSelectedNode(E node)
Sets selected nodes. |
void |
setSelectedNodes(E[] nodes)
Sets selected nodes. |
void |
setSelectedNodes(java.util.List<E> nodes)
Sets selected nodes. |
void |
setSelectionMode(int mode)
Sets tree selection mode. |
void |
setSelectionRound(int round)
Sets tree selection rounding. |
void |
setSelectionShadeWidth(int shadeWidth)
Sets tree selection shade width. |
void |
setSelectionStyle(TreeSelectionStyle style)
Sets tree selection style. |
void |
setSelectorBorderColor(java.awt.Color color)
Sets selector border color. |
void |
setSelectorColor(java.awt.Color color)
Sets selector color. |
void |
setSelectorEnabled(boolean enabled)
Sets whether selector is enabled or not. |
void |
setSelectorRound(int round)
Sets selector rounding. |
void |
setSelectorStroke(java.awt.BasicStroke stroke)
Sets selector border stroke. |
void |
setTreeState(TreeState treeState)
Restores tree expansion and selection states. |
void |
setTreeState(TreeState treeState,
boolean restoreSelection)
Restores tree expansion and selection states. |
void |
startEditingNode(E node)
Starts editing the specified node. |
void |
startEditingSelectedNode()
Starts editing selected tree node. |
void |
updateAllVisibleNodes()
Updates all visible nodes. |
void |
updateUI()
Installs a Web-UI into this component. |
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, isPathEditable, 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 |
---|
public static final int SINGLE_TREE_SELECTION
public static final int CONTIGUOUS_TREE_SELECTION
public static final int DISCONTIGUOUS_TREE_SELECTION
protected java.util.List<javax.swing.event.CellEditorListener> cellEditorListeners
protected javax.swing.event.TreeSelectionListener scrollToSelectionListener
Constructor Detail |
---|
public WebTree()
public WebTree(java.lang.Object[] value)
value
- tree datapublic WebTree(java.util.Vector<?> value)
value
- tree datapublic WebTree(java.util.Hashtable<?,?> value)
value
- tree datapublic WebTree(E root)
root
- tree root nodepublic WebTree(E root, boolean asksAllowsChildren)
root
- tree root nodeasksAllowsChildren
- false if any node can have children, true if each node is asked to see if it can have childrenpublic WebTree(javax.swing.tree.TreeModel newModel)
newModel
- tree modelMethod Detail |
---|
protected void init()
public void setCellEditor(javax.swing.tree.TreeCellEditor cellEditor)
setCellEditor
in class javax.swing.JTree
public void addCellEditorListener(javax.swing.event.CellEditorListener listener)
listener
- cell editor listener to addpublic void removeCellEditorListener(javax.swing.event.CellEditorListener listener)
listener
- cell editor listener to removepublic void expandRoot()
public void expandAll()
public void expandNode(E node)
node
- node to expandpublic boolean isExpanded(E node)
node
- node to check
public java.awt.Rectangle getNodeBounds(E node)
node
- node to process
public java.awt.Rectangle getNodeBounds(java.util.List<E> nodes)
nodes
- nodes to process
public E getNodeForRow(int row)
row
- row to process
public javax.swing.tree.TreePath getPathForNode(E node)
node
- node to process
public E getNodeForPath(javax.swing.tree.TreePath path)
path
- path to process
public E getNodeForLocation(java.awt.Point location)
location
- location to process
public E getNodeForLocation(int x, int y)
x
- location X coordinatey
- location Y coordinate
public javax.swing.tree.TreePath getPathForLocation(java.awt.Point location)
location
- location to process
TreePath
for the node at that locationpublic E getClosestNodeForLocation(java.awt.Point location)
location
- location to process
public E getClosestNodeForLocation(int x, int y)
x
- location X coordinatey
- location Y coordinate
public javax.swing.tree.TreePath getClosestPathForLocation(java.awt.Point location)
location
- location to process
TreePath
for the node closest to that location, null
if nothing is viewable or there is no modelpublic boolean isSelected(E node)
node
- node to check
public E getSelectedNode()
public java.util.List<E> getSelectedNodes()
public void selectNodeUnderPoint(java.awt.Point point)
point
- point to look for nodepublic void selectNodeUnderPoint(int x, int y)
x
- point X coordinatey
- point Y coordinatepublic void setSelectedNode(E node)
public void setSelectedNodes(java.util.List<E> nodes)
public void setSelectedNodes(E[] nodes)
public E getFirstVisibleLeafNode()
public void selectFirstVisibleLeafNode()
public void selectNextRow()
public void selectNextRow(boolean cycle)
public void selectPreviousRow()
public void selectPreviousRow(boolean cycle)
public E getRootNode()
public java.util.List<E> getAllNodes()
public void setSelectionMode(int mode)
mode
- tree selection modepublic void setMultiplySelectionAllowed(boolean allowed)
allowed
- whether multiply nodes selection allowed or notpublic boolean isScrollToSelection()
public void setScrollToSelection(boolean scroll)
scroll
- whether tree should automatically scroll to selection or notpublic void scrollToStart()
public void scrollToSelection()
public void scrollToNode(E node)
node
- node to scroll topublic void startEditingSelectedNode()
public void startEditingNode(E node)
node
- tree node to editpublic void updateAllVisibleNodes()
public TreeState getTreeState()
public TreeState getTreeState(boolean saveSelection)
saveSelection
- whether to save selection states or not
public void setTreeState(TreeState treeState)
treeState
- tree expansion and selection statespublic void setTreeState(TreeState treeState, boolean restoreSelection)
treeState
- tree expansion and selection statesrestoreSelection
- whether to restore selection states or notpublic boolean isAutoExpandSelectedNode()
public void setAutoExpandSelectedNode(boolean autoExpandSelectedNode)
autoExpandSelectedNode
- whether tree should expand nodes on selection or notpublic boolean isRolloverSelectionEnabled()
public void setRolloverSelectionEnabled(boolean enabled)
enabled
- whether rollover selection is enabled for this list or notpublic boolean isHighlightRolloverNode()
public void setHighlightRolloverNode(boolean highlight)
highlight
- whether tree should highlight rollover node or notpublic boolean isPaintLines()
public void setPaintLines(boolean paint)
paint
- whether tree should paint structure lines or notpublic java.awt.Color getLinesColor()
public void setLinesColor(java.awt.Color color)
color
- tree structure lines colorpublic TreeSelectionStyle getSelectionStyle()
public void setSelectionStyle(TreeSelectionStyle style)
style
- tree selection stylepublic int getSelectionRound()
public void setSelectionRound(int round)
round
- tree selection roundingpublic int getSelectionShadeWidth()
public void setSelectionShadeWidth(int shadeWidth)
shadeWidth
- tree selection shade widthpublic boolean isSelectorEnabled()
public void setSelectorEnabled(boolean enabled)
enabled
- whether selector is enabled or notpublic java.awt.Color getSelectorColor()
public void setSelectorColor(java.awt.Color color)
color
- selector colorpublic java.awt.Color getSelectorBorderColor()
public void setSelectorBorderColor(java.awt.Color color)
color
- selector border colorpublic int getSelectorRound()
public void setSelectorRound(int round)
round
- selector roundingpublic java.awt.BasicStroke getSelectorStroke()
public void setSelectorStroke(java.awt.BasicStroke stroke)
stroke
- selector border strokepublic int getDropCellShadeWidth()
public void setDropCellShadeWidth(int dropCellShadeWidth)
dropCellShadeWidth
- new drop cell highlight shade widthpublic WebTreeUI getWebUI()
public void updateUI()
updateUI
in class javax.swing.JTree
public void repaint(int row)
row
- row indexpublic void repaint(int from, int to)
from
- first row indexto
- last row indexpublic void repaint(E node)
node
- node to repaintpublic void repaint(java.util.List<E> nodes)
nodes
- nodes to repaintpublic WebTree<E> setPlainFont()
setPlainFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
public WebTree<E> setPlainFont(boolean apply)
setPlainFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
apply
- whether to apply font changes or not
public boolean isPlainFont()
isPlainFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
public WebTree<E> setBoldFont()
setBoldFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
public WebTree<E> setBoldFont(boolean apply)
setBoldFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
apply
- whether to apply font changes or not
public boolean isBoldFont()
isBoldFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
public WebTree<E> setItalicFont()
setItalicFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
public WebTree<E> setItalicFont(boolean apply)
setItalicFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
apply
- whether to apply font changes or not
public boolean isItalicFont()
isItalicFont
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
public WebTree<E> setFontStyle(boolean bold, boolean italic)
setFontStyle
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
bold
- whether should set bold font or notitalic
- whether should set italic font or not
public WebTree<E> setFontStyle(int style)
setFontStyle
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
style
- new style
public WebTree<E> setFontSize(int fontSize)
setFontSize
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
fontSize
- font size
public WebTree<E> changeFontSize(int change)
changeFontSize
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
change
- font size change amount
public int getFontSize()
getFontSize
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
public WebTree<E> setFontSizeAndStyle(int fontSize, boolean bold, boolean italic)
setFontSizeAndStyle
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
fontSize
- new font sizebold
- whether should set bold font or notitalic
- whether should set italic font or not
public WebTree<E> setFontSizeAndStyle(int fontSize, int style)
setFontSizeAndStyle
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
fontSize
- new font sizestyle
- new style
public WebTree<E> setFontName(java.lang.String fontName)
setFontName
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
fontName
- new font name
public java.lang.String getFontName()
getFontName
in interface FontMethods<WebTree<E extends javax.swing.tree.DefaultMutableTreeNode>>
protected static javax.swing.tree.TreeModel createTreeModel(java.lang.Object value)
value
- Object used as the foundation for the TreeModel
public static javax.swing.tree.TreeModel getDefaultTreeModel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |