|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openswing.swing.tree.client.TreePanel
Title: OpenSwing Framework
Description: Panel that contains an expandable tree. Nodes may be dragged inside the tree if enabledDrag method is invoked.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 | |
TreePanel()
Constructor. |
Method Summary | |
void |
addItemListener(java.awt.event.ItemListener listener)
Add an Item Listener to the tree, that listen for check-box selections. |
void |
addKeyListener(java.awt.event.KeyListener listener)
Add a key listener to the tree. |
void |
addMouseListener(java.awt.event.MouseListener listener)
Add a mouse listener to the tree. |
void |
addNotify()
|
void |
addPopupMenuItem(java.lang.String menuName,
char mnemonic,
boolean enabled,
java.awt.event.ActionListener menuListener)
Add a pop-up menu item. |
void |
addPopupMenuItem(java.lang.String menuName,
java.lang.String parentMenuName,
char mnemonic,
boolean enabled,
java.awt.event.ActionListener menuListener)
Add a pop-up menu item to a parent menu item. |
void |
addPopupSeparator()
Add a separator to the pop-up menu. |
void |
clearTree()
Remove all nodes (expept the root node) from the tree. |
void |
collapseAllNodes()
Collapse all tree nodes. |
void |
collapseNode(int index)
Collapse a tree node. |
boolean |
disableListener()
|
void |
dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
This message goes to DragSourceListener, informing it that the dragging has ended. |
void |
dragEnter(java.awt.dnd.DragSourceDragEvent event)
This message goes to DragSourceListener, informing it that the dragging has entered the DropSite |
void |
dragEnter(java.awt.dnd.DropTargetDragEvent event)
This method is invoked when you are dragging over the DropSite. |
void |
dragExit(java.awt.dnd.DragSourceEvent event)
This message goes to DragSourceListener, informing it that the dragging has exited the DropSite. |
void |
dragExit(java.awt.dnd.DropTargetEvent event)
This method is invoked when you are exit the DropSite without dropping. |
void |
dragOver(java.awt.dnd.DragSourceDragEvent e)
This message goes to DragSourceListener, informing it that the dragging is currently ocurring over the DropSite. |
void |
dragOver(java.awt.dnd.DropTargetDragEvent event)
This method is invoked when a drag operation is going on. |
void |
drop(java.awt.dnd.DropTargetDropEvent event)
This method is invoked when a drop event has occurred. |
void |
dropActionChanged(java.awt.dnd.DragSourceDragEvent event)
This method is invoked when the user changes the dropAction. |
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
This method is invoked if the use modifies the current drop gesture. |
void |
enableDrag(java.lang.String treeId,
TreeDragNDropListener dndListener)
Enable drag onto the grid. |
void |
expandAllNodes()
Expand all tree nodes. |
void |
expandNode(int index)
Expand a tree node. |
java.util.HashSet |
getCheckedLeaves()
|
java.util.HashSet |
getCheckedNodes()
|
javax.swing.JComponent |
getComponent()
|
java.awt.Cursor |
getDragCursor()
|
java.lang.String |
getFolderIconName()
|
java.lang.String |
getIconAttributeName()
|
java.awt.event.ItemListener[] |
getItemListeners()
|
java.lang.String |
getLeavesImageName()
|
int |
getRowCount()
|
int |
getRowHeight()
Returns the height of each row. |
int |
getSelectedIndex()
|
javax.swing.tree.DefaultMutableTreeNode |
getSelectedNode()
|
java.awt.Color |
getSelectionBackground()
|
java.awt.Color |
getSelectionForeground()
|
int |
getSelectionMode()
Returns the current selection mode, one of TreeSelectionModel.SINGLE_TREE_SELECTION ,
TreeSelectionModel.CONTIGUOUS_TREE_SELECTION or
TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION . |
javax.swing.tree.TreePath |
getSelectionPath()
Returns the path to the first selected node. |
javax.swing.tree.TreePath[] |
getSelectionPaths()
Returns the paths of all selected values. |
int[] |
getSelectionRows()
Returns all of the currently selected rows. |
boolean |
getShowsRootHandles()
Returns the value of the showsRootHandles property. |
java.lang.String |
getTooltipAttributeName()
|
javax.swing.JTree |
getTree()
|
TreeController |
getTreeController()
|
TreeDataLocator |
getTreeDataLocator()
|
java.lang.String |
getValueAt(int index)
|
boolean |
isChanged()
|
boolean |
isExpandAllNodes()
|
boolean |
isExpandRoot()
|
boolean |
isLoadWhenVisibile()
|
boolean |
isReadOnly()
1 |
boolean |
isRootVisible()
Returns true if the root node of the tree is displayed. |
boolean |
isShowCheckBoxes()
|
boolean |
isShowCheckBoxesOnLeaves()
|
void |
reloadTree()
Force tree reloading. |
void |
removeItemListener(java.awt.event.ItemListener listener)
Remove an ItemListener from the tree. |
void |
removeKeyListener(java.awt.event.KeyListener listener)
Remove a key listener from the tree. |
void |
removeMouseListener(java.awt.event.MouseListener listener)
Remove a mouse listener from the tree. |
void |
repaintTree()
Redraw the tree. |
void |
revalidateTree()
Revalidate tree content. |
void |
scrollPathToVisible(javax.swing.tree.TreePath path)
Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed. |
void |
scrollRowToVisible(int row)
Scrolls the item identified by row until it is displayed. |
int |
search(java.lang.String textToSeach)
Method invoked by SearchWindowManager when the specified "textToSeach" pattern has not matchings in the current content of binded control. |
void |
setCheckedNodes(java.util.HashSet checkedNodes)
Set current checked nodes (i.e. nodes having selected the associated check-box). |
void |
setDragCursor(java.awt.Cursor dragCursor)
Set the cursor to show on dragging. |
void |
setEnabled(boolean enabled)
|
void |
setExpandAllNodes(boolean expandAllNodes)
Define if all tree nodes must be expanded after loading. |
void |
setExpandRoot(boolean expandRoot)
Define if root node must be automatically expanded when "expandAllNodes" property is set to false ; default value: true . |
void |
setFolderIconName(java.lang.String folderIconName)
Set the folder icon name. |
void |
setIconAttributeName(java.lang.String iconAttributeName)
Set the attribute name that contains the icon name; default value: null; if defined, this attribute overrides "folderIcon"/"leafIcon" values. |
void |
setLeavesImageName(java.lang.String leavesImageName)
Set image icon used for leaves. |
void |
setLoadWhenVisibile(boolean loadWhenVisibile)
Define if tree will be filled on viewing this panel. |
void |
setMenuItemEnabled(java.lang.String menuName,
boolean enabled)
Set menu item abilitation. |
void |
setMenuItemVisible(java.lang.String menuName,
boolean visible)
Set menu item visibility. |
void |
setRootVisible(boolean rootVisible)
Determines whether or not the root node from the TreeModel is visible. |
void |
setRowHeight(int rowHeight)
Sets the height of each cell, in pixels. |
void |
setSelectedIndex(int index)
Set the selected index. |
void |
setSelectedNode(javax.swing.tree.DefaultMutableTreeNode node)
Select a node in the tree. |
void |
setSelectionBackground(java.awt.Color selectionBackground)
Set tree selection background color |
void |
setSelectionForeground(java.awt.Color selectionForeground)
Set tree selection foreground color |
void |
setSelectionMode(int selectionMode)
Sets the selection model, which must be one of TreeSelectionModel.SINGLE_TREE_SELECTION, TreeSelectionModel.CONTIGUOUS_TREE_SELECTION or TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION. |
void |
setSelectionPath(javax.swing.tree.TreePath path)
Selects the node identified by the specified path. |
void |
setSelectionPaths(javax.swing.tree.TreePath[] paths)
Selects the nodes identified by the specified array of paths. |
void |
setSelectionRow(int row)
Selects the node at the specified row in the display. |
void |
setSelectionRows(int[] rows)
Selects the nodes corresponding to each of the specified rows in the display. |
void |
setShowCheckBoxes(boolean showCheckBoxes)
Define if a check-box must be showed for each node. |
void |
setShowCheckBoxesOnLeaves(boolean showCheckBoxesOnLeaves)
Define if a check-box must be showed for leaves nodes too. |
void |
setShowsRootHandles(boolean showsRootHandles)
Sets the value of the showsRootHandles property,
which specifies whether the node handles should be displayed.
|
void |
setTooltipAttributeName(java.lang.String tooltipAttributeName)
Set the attribute name that contains the tool tip text for the node; default value: null. |
void |
setTreeController(TreeController treeController)
Set the tree controller: it manages tree events. |
void |
setTreeDataLocator(TreeDataLocator treeDataLocator)
Set the data source used to fill in the tree |
void |
treeDoubleClick(java.awt.event.MouseEvent e,
javax.swing.JTree tree)
Method called when user has double clicked. |
void |
treeLeftClick(java.awt.event.MouseEvent e,
javax.swing.JTree tree)
Method called when user has clicked on the left mouse button. |
void |
treeRightClick(java.awt.event.MouseEvent e,
javax.swing.JTree tree)
Method called when user has clicked on the right mouse button. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TreePanel()
Method Detail |
public void addNotify()
public final void reloadTree()
public final void expandNode(int index)
index
- index of node to expandpublic final void collapseNode(int index)
index
- index of node to collapsepublic final void expandAllNodes()
public final void collapseAllNodes()
public final void repaintTree()
public final void clearTree()
public final javax.swing.tree.DefaultMutableTreeNode getSelectedNode()
public final void setSelectedNode(javax.swing.tree.DefaultMutableTreeNode node)
node
- tree node to selectpublic final void treeDoubleClick(java.awt.event.MouseEvent e, javax.swing.JTree tree)
e
- double click eventtree
- treepublic final void treeLeftClick(java.awt.event.MouseEvent e, javax.swing.JTree tree)
e
- left mouse button click eventtree
- treepublic void setEnabled(boolean enabled)
public final void treeRightClick(java.awt.event.MouseEvent e, javax.swing.JTree tree)
e
- right mouse button click eventtree
- treepublic final void addPopupMenuItem(java.lang.String menuName, char mnemonic, boolean enabled, java.awt.event.ActionListener menuListener)
menuName
- menu item description (not yet translated)mnemonic
- mnemonic valueenabled
- flag used to set menu item abilitationmenuListener
- listener used to capture menu item selectionpublic final void addPopupMenuItem(java.lang.String menuName, java.lang.String parentMenuName, char mnemonic, boolean enabled, java.awt.event.ActionListener menuListener)
menuName
- menu item description (not yet translated)parentMenuName
- mnemonic
- mnemonic valueenabled
- flag used to set menu item abilitationmenuListener
- listener used to capture menu item selectionpublic final void addPopupSeparator()
public final void setMenuItemEnabled(java.lang.String menuName, boolean enabled)
menuName
- menu item description (not yet translated)enabled
- flag used to enable the menu itempublic final void setMenuItemVisible(java.lang.String menuName, boolean visible)
menuName
- menu item description (not yet translated)visible
- flag used to hide/show the menu itempublic final TreeController getTreeController()
public final TreeDataLocator getTreeDataLocator()
public final void setTreeDataLocator(TreeDataLocator treeDataLocator)
treeDataLocator
- data source used to fill in the treepublic final void setTreeController(TreeController treeController)
treeController
- tree controller: it manages tree events.public final java.lang.String getLeavesImageName()
public final void setLeavesImageName(java.lang.String leavesImageName)
leavesImageName
- image icon used for leavespublic final boolean isLoadWhenVisibile()
public final void setLoadWhenVisibile(boolean loadWhenVisibile)
loadWhenVisibile
- define if tree will be filled on viewing this panelpublic final boolean isExpandAllNodes()
public final void setExpandAllNodes(boolean expandAllNodes)
expandAllNodes
- boolean define if all tree nodes must be expanded after loadingpublic final java.lang.String getFolderIconName()
public final void setFolderIconName(java.lang.String folderIconName)
public final javax.swing.JTree getTree()
public final void enableDrag(java.lang.String treeId, TreeDragNDropListener dndListener)
public final void dragEnter(java.awt.dnd.DragSourceDragEvent event)
dragEnter
in interface java.awt.dnd.DragSourceListener
public final void dragExit(java.awt.dnd.DragSourceEvent event)
dragExit
in interface java.awt.dnd.DragSourceListener
public final void dragOver(java.awt.dnd.DragSourceDragEvent e)
dragOver
in interface java.awt.dnd.DragSourceListener
public final void dropActionChanged(java.awt.dnd.DragSourceDragEvent event)
dropActionChanged
in interface java.awt.dnd.DragSourceListener
public final void dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
dragDropEnd
in interface java.awt.dnd.DragSourceListener
public final void dragEnter(java.awt.dnd.DropTargetDragEvent event)
dragEnter
in interface java.awt.dnd.DropTargetListener
public final void dragExit(java.awt.dnd.DropTargetEvent event)
dragExit
in interface java.awt.dnd.DropTargetListener
public final void dragOver(java.awt.dnd.DropTargetDragEvent event)
dragOver
in interface java.awt.dnd.DropTargetListener
public final void drop(java.awt.dnd.DropTargetDropEvent event)
drop
in interface java.awt.dnd.DropTargetListener
public final void dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
dropActionChanged
in interface java.awt.dnd.DropTargetListener
public final void setIconAttributeName(java.lang.String iconAttributeName)
iconAttributeName
- attribute name that contains the icon namepublic final java.lang.String getIconAttributeName()
public final java.lang.String getTooltipAttributeName()
public final void setTooltipAttributeName(java.lang.String tooltipAttributeName)
tooltipAttributeName
- attribute name that contains the tool tip text for the nodepublic final int getSelectedIndex()
getSelectedIndex
in interface SearchControl
public final void setSelectedIndex(int index)
setSelectedIndex
in interface SearchControl
public final int getRowCount()
getRowCount
in interface SearchControl
public final java.lang.String getValueAt(int index)
getValueAt
in interface SearchControl
public final javax.swing.JComponent getComponent()
getComponent
in interface SearchControl
public final boolean isReadOnly()
isReadOnly
in interface SearchControl
true
if the input control is in read only mode (so search is enabled), false
otherwisepublic final boolean disableListener()
disableListener
in interface SearchControl
true
to disable key listening on input control (for instance, in case of nested grids), false
to listen for key eventspublic final boolean isRootVisible()
#rootVisible
public final void setRootVisible(boolean rootVisible)
TreeModel
is visible.
rootVisible
- true if the root node of the tree is to be displayed#rootVisible
public final void setSelectionMode(int selectionMode)
This may change the selection if the current selection is not valid
for the new mode. For example, if three TreePaths are
selected when the mode is changed to TreeSelectionModel.SINGLE_TREE_SELECTION
,
only one TreePath will remain selected. It is up to the particular
implementation to decide what TreePath remains selected.
public final int getSelectionMode()
TreeSelectionModel.SINGLE_TREE_SELECTION
,
TreeSelectionModel.CONTIGUOUS_TREE_SELECTION
or
TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION
.
public final void setRowHeight(int rowHeight)
rowHeight
- the height of each cell, in pixelspublic final int getRowHeight()
public final void setShowsRootHandles(boolean showsRootHandles)
showsRootHandles
property,
which specifies whether the node handles should be displayed.
The default value of this property depends on the constructor
used to create the JTree
.
Some look and feels might not support handles;
they will ignore this property.
#showsRootHandles
,
getShowsRootHandles()
public final boolean getShowsRootHandles()
showsRootHandles
property.
showsRootHandles
property#showsRootHandles
public final void scrollRowToVisible(int row)
JTree
is contained in a
JScrollPane
.
row
- an integer specifying the row to scroll, where 0 is the
first row in the displaypublic final void setSelectionRow(int row)
row
- the row to select, where 0 is the first row in
the displaypublic final void setSelectionRows(int[] rows)
rows
is
< 0 or >= getRowCount
, it will be ignored.
If none of the elements
in rows
are valid rows, the selection will
be cleared. That is it will be as if clearSelection
was invoked.
rows
- an array of ints specifying the rows to select,
where 0 indicates the first row in the displaypublic final void setSelectionPath(javax.swing.tree.TreePath path)
getExpandsSelectedPaths
is true it is
exposed (made viewable).
path
- the TreePath
specifying the node to selectpublic final void setSelectionPaths(javax.swing.tree.TreePath[] paths)
getExpandsSelectedPaths
is true
it is exposed (made viewable).
paths
- an array of TreePath
objects that specifies
the nodes to selectpublic final void scrollPathToVisible(javax.swing.tree.TreePath path)
JTree
is contained in a JScrollPane
.
path
- the TreePath
identifying the node to
bring into viewpublic final javax.swing.tree.TreePath getSelectionPath()
TreePath
for the first selected node,
or null
if nothing is currently selectedpublic final javax.swing.tree.TreePath[] getSelectionPaths()
TreePath
objects indicating the selected
nodes, or null
if nothing is currently selectedpublic final int[] getSelectionRows()
TreeSelectionModel
.
If nothing is selected null
or an empty array will
be returned, based on the TreeSelectionModel
implementation.
public final void setSelectionBackground(java.awt.Color selectionBackground)
selectionBackground
- tree selection background colorpublic final void setSelectionForeground(java.awt.Color selectionForeground)
selectionForeground
- tree selection foreground colorpublic final java.awt.Color getSelectionBackground()
public final java.awt.Color getSelectionForeground()
public final void revalidateTree()
public final void addKeyListener(java.awt.event.KeyListener listener)
listener
- KeyListener to addpublic final void removeKeyListener(java.awt.event.KeyListener listener)
listener
- KeyListener to removepublic final void addMouseListener(java.awt.event.MouseListener listener)
listener
- MouseListener to addpublic final void removeMouseListener(java.awt.event.MouseListener listener)
listener
- MouseListener to removepublic final void addItemListener(java.awt.event.ItemListener listener)
listener
- ItemListener to addpublic final void removeItemListener(java.awt.event.ItemListener listener)
listener
- ItemListener to removepublic final java.awt.event.ItemListener[] getItemListeners()
public final boolean isShowCheckBoxes()
public final void setShowCheckBoxes(boolean showCheckBoxes)
showCheckBoxes
- define if a check-box must be showed for each nodepublic final java.util.HashSet getCheckedNodes()
public void setCheckedNodes(java.util.HashSet checkedNodes)
checkedNodes
- current checked nodes (i.e. nodes having selected the associated check-box)public final boolean isShowCheckBoxesOnLeaves()
public final void setShowCheckBoxesOnLeaves(boolean showCheckBoxesOnLeaves)
showCheckBoxesOnLeaves
- define if a check-box must be showed for leaves nodes toopublic final java.util.HashSet getCheckedLeaves()
public final boolean isExpandRoot()
false
public final void setExpandRoot(boolean expandRoot)
false
; default value: true
.
expandRoot
- define if root node must be automatically expanded when "expandAllNodes" property is set to false
public final boolean isChanged()
public final int search(java.lang.String textToSeach)
search
in interface SearchControl
textToSeach
- patten of text to search
public final java.awt.Cursor getDragCursor()
public final void setDragCursor(java.awt.Cursor dragCursor)
dragCursor
- cursor to show on dragging
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |