void | addSelectionInterval(int index0, int index1)- Select all rows between the two given indexes, inclusive.
|
void | addSelectionPath(TreePath path)
|
void | addSelectionPaths(TreePath[] paths)
|
void | addSelectionRow(int row)
|
void | addSelectionRows(int[] rows)
|
void | addTreeExpansionListener(TreeExpansionListener listener)- Adds a
TreeExpansionListener object to the tree.
|
void | addTreeSelectionListener(TreeSelectionListener listener)- Adds a
TreeSelctionListener object to the tree.
|
void | addTreeWillExpandListener(TreeWillExpandListener listener)- Adds a
TreeWillExpandListener object to the tree.
|
void | cancelEditing()
|
void | clearSelection()
|
protected void | clearToggledPaths()
|
void | collapsePath(TreePath path)
|
void | collapseRow(int row)
|
String | convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)- Converts the specified value to a String.
|
protected static TreeModel | createTreeModel(Object value)- Creates a new
TreeModel object.
|
protected TreeModelListener | createTreeModelListener()- Creates and returns an instance of
JTree.TreeModelHandler.
|
void | expandPath(TreePath path)
|
void | expandRow(int row)
|
void | fireTreeCollapsed(TreePath path)- Notifies all listeners that the tree was collapsed.
|
void | fireTreeExpanded(TreePath path)- Notifies all listeners that the tree was expanded.
|
void | fireTreeWillCollapse(TreePath path)- Notifies all listeners that the tree will collapse.
|
void | fireTreeWillExpand(TreePath path)- Notifies all listeners that the tree will expand.
|
protected void | fireValueChanged(TreeSelectionEvent event)- Notifies all listeners when the selection of the tree changed.
|
AccessibleContext | getAccessibleContext()- Gets the AccessibleContext associated with this
JTree.
|
TreePath | getAnchorSelectionPath()
|
TreeCellEditor | getCellEditor()
|
TreeCellRenderer | getCellRenderer()
|
TreePath | getClosestPathForLocation(int x, int y)
|
int | getClosestRowForLocation(int x, int y)
|
protected static TreeModel | getDefaultTreeModel()- Returns a sample TreeModel that can be used in a JTree.
|
protected Enumeration | getDescendantToggledPaths(TreePath parent)
|
boolean | getDragEnabled()- Return the value of the
dragEnabled property.
|
TreePath | getEditingPath()
|
Enumeration | getExpandedDescendants(TreePath path)- Returns all TreePath objects which are a descendants of the given path
and are exapanded at the moment of the execution of this method.
|
boolean | getExpandsSelectedPaths()
|
boolean | getInvokesStopCellEditing()
|
Object | getLastSelectedPathComponent()
|
TreePath | getLeadSelectionPath()
|
int | getLeadSelectionRow()
|
int | getMaxSelectionRow()
|
int | getMinSelectionRow()
|
TreeModel | getModel()- Returns the model of this
JTree object.
|
TreePath | getNextMatch(String prefix, int startingRow, Position.Bias bias)- Returns the next table element (beginning from the row
startingRow that starts with prefix.
|
protected TreePath[] | getPathBetweenRows(int index0, int index1)- Get the pathes that are displayes between the two given rows.
|
Rectangle | getPathBounds(TreePath path)
|
TreePath | getPathForLocation(int x, int y)
|
TreePath | getPathForRow(int row)
|
Dimension | getPreferredScrollableViewportSize()- Returns the preferred viewport size.
|
Rectangle | getRowBounds(int row)
|
int | getRowCount()
|
int | getRowForLocation(int x, int y)
|
int | getRowForPath(TreePath path)
|
int | getRowHeight()
|
int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)- Return the preferred scrolling amount (in pixels) for the given
scrolling direction and orientation when scrolling in large amounts
(pages).
|
boolean | getScrollableTracksViewportHeight()- Return true if the height of the scrollable is always equal to the view,
where it is displayed, height.In such case, the vertical scrolling should
not be performed.
|
boolean | getScrollableTracksViewportWidth()- Return true if the width of the scrollable is always equal to the
view, where it is displayed, width (for instance, the text area with
the word wrap).
|
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)- Return the preferred scrolling amount (in pixels) for the given scrolling
direction and orientation.
|
boolean | getScrollsOnExpand()
|
int | getSelectionCount()
|
TreeSelectionModel | getSelectionModel()
|
TreePath | getSelectionPath()
|
TreePath[] | getSelectionPaths()
|
int[] | getSelectionRows()
|
boolean | getShowsRootHandles()
|
int | getToggleClickCount()
|
TreeExpansionListener[] | getTreeExpansionListeners()- Returns all added
TreeExpansionListener objects.
|
TreeSelectionListener[] | getTreeSelectionListeners()- Returns all added
TreeSelectionListener objects.
|
TreeWillExpandListener[] | getTreeWillExpandListeners()- Returns all added
TreeWillExpandListener objects.
|
TreeUI | getUI()- Return the UI associated with this
JTree object.
|
String | getUIClassID()- This method returns the String ID of the UI class of Separator.
|
int | getVisibleRowCount()
|
boolean | hasBeenExpanded(TreePath path)
|
boolean | isCollapsed(int row)
|
boolean | isCollapsed(TreePath path)
|
boolean | isEditable()- Checks if this
JTree object is editable.
|
boolean | isEditing()
|
boolean | isExpanded(int row)
|
boolean | isExpanded(TreePath path)
|
boolean | isFixedRowHeight()
|
boolean | isLargeModel()
|
boolean | isPathEditable(TreePath path)
|
boolean | isPathSelected(TreePath path)
|
boolean | isRootVisible()- Checks if the root element is visible.
|
boolean | isRowSelected(int row)- Returns
true when the specified row is selected,
false otherwise.
|
boolean | isSelectionEmpty()
|
boolean | isVisible(TreePath path)
|
void | makeVisible(TreePath path)
|
protected String | paramString()- A String representation of this JTree.
|
protected boolean | removeDescendantSelectedPaths(TreePath path, boolean includeSelected)- Removes any paths in the current set of selected paths that are
descendants of
path.
|
protected void | removeDescendantToggledPaths(Enumeration toRemove)- Removes any descendants of the TreePaths in toRemove that have been
expanded.
|
void | removeSelectionInterval(int index0, int index1)
|
void | removeSelectionPath(TreePath path)
|
void | removeSelectionPaths(TreePath[] paths)
|
void | removeSelectionRow(int row)
|
void | removeSelectionRows(int[] rows)
|
void | removeTreeExpansionListener(TreeExpansionListener listener)- Removes a
TreeExpansionListener object from the tree.
|
void | removeTreeSelectionListener(TreeSelectionListener listener)- Removes a
TreeSelectionListener object from the tree.
|
void | removeTreeWillExpandListener(TreeWillExpandListener listener)- Removes a
TreeWillExpandListener object from the tree.
|
void | scrollPathToVisible(TreePath path)
|
void | scrollRowToVisible(int row)
|
void | setAnchorSelectionPath(TreePath path)
|
void | setCellEditor(TreeCellEditor editor)
|
void | setCellRenderer(TreeCellRenderer newRenderer)
|
void | setDragEnabled(boolean enabled)- Set the
dragEnabled property.
|
void | setEditable(boolean flag)- Sets the
editable property.
|
protected void | setExpandedState(TreePath path, boolean state)
|
void | setExpandsSelectedPaths(boolean flag)
|
void | setInvokesStopCellEditing(boolean invoke)
|
void | setLargeModel(boolean large)
|
void | setLeadSelectionPath(TreePath path)
|
void | setModel(TreeModel model)- Sets the model to use in
JTree.
|
void | setRootVisible(boolean flag)
|
void | setRowHeight(int height)
|
void | setScrollsOnExpand(boolean scroll)
|
void | setSelectionInterval(int index0, int index1)
|
void | setSelectionModel(TreeSelectionModel model)
|
void | setSelectionPath(TreePath path)
|
void | setSelectionPaths(TreePath[] paths)
|
void | setSelectionRow(int row)
|
void | setSelectionRows(int[] rows)
|
void | setShowsRootHandles(boolean flag)
|
void | setToggleClickCount(int count)
|
void | setUI(TreeUI ui)- Sets the UI associated with this
JTree object.
|
void | setVisibleRowCount(int rows)
|
void | startEditingAtPath(TreePath path)
|
boolean | stopEditing()
|
void | treeDidChange()-
Sent when the tree has changed enough that we need to resize the bounds,
but not enough that we need to remove the expanded node set (e.g nodes were
expanded or collapsed, or nodes were inserted into the tree).
|
void | updateUI()- This method resets the UI used to the Look and Feel defaults..
|