All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.java.swing.TreeUI

public interface TreeUI
extends ComponentUI
UI factory interface for JTree.


Method Index

 o addSelectionPath(JTreePath)
Adds the path identified by path to the current selection.
 o addSelectionPaths(JTreePath[])
Adds each path in paths to the current selection.
 o addSelectionRow(int)
Adds the path at row to the current selection.
 o addSelectionRows(int[])
Adds the paths at each of the rows in rows to the current selection.
 o collapsePath(JTreePath)
Insures that the last item identified in path is collapsed and visible.
 o collapseRow(int)
Insures that the item identified by row is collapsed.
 o expandPath(JTreePath)
Insures that the last item identified in path is expanded and visible.
 o expandRow(int)
Insures that the item identified by row is expanded.
 o getClosestPathForLocation(int, int)
Returns the path to the node that is closest to x,y.
 o getClosestRowForLocation(int, int)
Returns the row to the node that is closest to x,y.
 o getEditingPath()
Returns the path to the element that is being edited.
 o getMaxSelectionRow()
Gets the last selected row.
 o getMinSelectionRow()
Gets the first selected row.
 o getPathBounds(JTreePath)
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
 o getPathForRow(int)
Returns the path for passed in row.
 o getRowBounds(int)
Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.
 o getRowCount()
Returns the number of rows that are being displayed.
 o getRowForPath(JTreePath)
Returns the row that the last item identified in path is visible at.
 o getSelectionPath()
Returns the path to the first selected value, or null if nothing is currently selected.
 o getSelectionPaths()
Returns the path of the selected values, or null if nothing is current selected.
 o getSelectionRows()
Returns all of the currently selected rows.
 o isCollapsed(int)
Returns true if the value identified by row is currently collapsed.
 o isCollapsed(JTreePath)
Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.
 o isEditing()
Returns true if the tree is being edited.
 o isExpanded(int)
Returns true if the value identified by row is currently expanded.
 o isExpanded(JTreePath)
Returns true if the value identified by path is currently expanded, this will return false if any of the values in path are currently not being displayed.
 o isPathSelected(JTreePath)
Returns true if item identified by path is currently selected.
 o isRowSelected(int)
Returns true if the row identitifed by row is selected.
 o isVisible(JTreePath)
Returns true if all the parents of path are currently expanded.
 o makeVisible(JTreePath)
Ensures that all of the parents of path are currently expanded.
 o scrollPathToVisible(JTreePath)
Makes sure all the path components in path are expanded (accept for the last path component) and tries to scroll the resulting path to be visible (the scrolling will only work if the JTree is contained in a JScrollPane).
 o scrollRowToVisible(int)
Scrolls the item identified by row to be visible.
 o setSelectionPath(JTreePath)
Sets to selection to the value identified by path.
 o setSelectionPaths(JTreePath[])
Sets the selection to paths.
 o setSelectionRow(int)
The current selection is set to the path for the item at row.
 o setSelectionRows(int[])
The selection is set to the paths for the items at each of the rows in rows.
 o startEditingAtPath(JTreePath)
Selects the last item in path and tries to edit it.
 o stopEditing()
Stops the current editing session.

Methods

 o getRowCount
 public abstract int getRowCount()
Returns the number of rows that are being displayed.

 o setSelectionPath
 public abstract void setSelectionPath(JTreePath path)
Sets to selection to the value identified by path. If any component of path is not currently visible it will be made visible.

 o setSelectionPaths
 public abstract void setSelectionPaths(JTreePath paths[])
Sets the selection to paths. If any component in any of the paths is not currently visible it will be made visible.

 o setSelectionRow
 public abstract void setSelectionRow(int row)
The current selection is set to the path for the item at row.

 o setSelectionRows
 public abstract void setSelectionRows(int rows[])
The selection is set to the paths for the items at each of the rows in rows.

 o addSelectionPath
 public abstract void addSelectionPath(JTreePath path)
Adds the path identified by path to the current selection. If any component of path isn't visible, it will be made visible.

 o addSelectionPaths
 public abstract void addSelectionPaths(JTreePath paths[])
Adds each path in paths to the current selection. If any component of any of the paths isn't visible, it will be made visible.

 o addSelectionRow
 public abstract void addSelectionRow(int row)
Adds the path at row to the current selection.

 o addSelectionRows
 public abstract void addSelectionRows(int rows[])
Adds the paths at each of the rows in rows to the current selection.

 o getSelectionPath
 public abstract JTreePath getSelectionPath()
Returns the path to the first selected value, or null if nothing is currently selected.

 o getSelectionPaths
 public abstract JTreePath[] getSelectionPaths()
Returns the path of the selected values, or null if nothing is current selected.

 o getSelectionRows
 public abstract int[] getSelectionRows()
Returns all of the currently selected rows.

 o getMinSelectionRow
 public abstract int getMinSelectionRow()
Gets the first selected row.

 o getMaxSelectionRow
 public abstract int getMaxSelectionRow()
Gets the last selected row.

 o isPathSelected
 public abstract boolean isPathSelected(JTreePath path)
Returns true if item identified by path is currently selected.

 o isRowSelected
 public abstract boolean isRowSelected(int row)
Returns true if the row identitifed by row is selected.

 o isExpanded
 public abstract boolean isExpanded(JTreePath path)
Returns true if the value identified by path is currently expanded, this will return false if any of the values in path are currently not being displayed.

 o isExpanded
 public abstract boolean isExpanded(int row)
Returns true if the value identified by row is currently expanded.

 o isCollapsed
 public abstract boolean isCollapsed(JTreePath path)
Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.

 o isCollapsed
 public abstract boolean isCollapsed(int row)
Returns true if the value identified by row is currently collapsed.

 o makeVisible
 public abstract void makeVisible(JTreePath path)
Ensures that all of the parents of path are currently expanded. To make sure it is truyly visible, you may wish to call scrollPathToVisible, which will try and scroll the path to be visibile if the JTree is in a scroller.

 o isVisible
 public abstract boolean isVisible(JTreePath path)
Returns true if all the parents of path are currently expanded.

 o getPathBounds
 public abstract Rectangle getPathBounds(JTreePath path)
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into. Will return null if any component in path is currently valid.

 o getRowBounds
 public abstract Rectangle getRowBounds(int row)
Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.

 o scrollPathToVisible
 public abstract void scrollPathToVisible(JTreePath path)
Makes sure all the path components in path are expanded (accept for the last path component) and tries to scroll the resulting path to be visible (the scrolling will only work if the JTree is contained in a JScrollPane).

 o scrollRowToVisible
 public abstract void scrollRowToVisible(int row)
Scrolls the item identified by row to be visible. This will only work if the JTree is contained in a JSrollPane.

 o getPathForRow
 public abstract JTreePath getPathForRow(int row)
Returns the path for passed in row. If row is not visible null is returned.

 o getRowForPath
 public abstract int getRowForPath(JTreePath path)
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.

 o expandPath
 public abstract void expandPath(JTreePath path)
Insures that the last item identified in path is expanded and visible. This differs from makeVisible in that the last item is expanded in this method.

 o expandRow
 public abstract void expandRow(int row)
Insures that the item identified by row is expanded.

 o collapsePath
 public abstract void collapsePath(JTreePath path)
Insures that the last item identified in path is collapsed and visible.

 o collapseRow
 public abstract void collapseRow(int row)
Insures that the item identified by row is collapsed.

 o getClosestPathForLocation
 public abstract JTreePath getClosestPathForLocation(int x,
                                                     int y)
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.

 o getClosestRowForLocation
 public abstract int getClosestRowForLocation(int x,
                                              int y)
Returns the row to the node that is closest to x,y. If there is nothing currently visible this will return -1, otherwise it'll always return a valid row. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned row and test x, y against that.

 o isEditing
 public abstract boolean isEditing()
Returns true if the tree is being edited. The item that is being edited can be returned by getEditingPath().

 o stopEditing
 public abstract boolean stopEditing()
Stops the current editing session. This has no effect if the tree isn't being edited. Returns true if the editor allows the editing session to stop.

 o startEditingAtPath
 public abstract void startEditingAtPath(JTreePath path)
Selects the last item in path and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item.

 o getEditingPath
 public abstract JTreePath getEditingPath()
Returns the path to the element that is being edited.


All Packages  Class Hierarchy  This Package  Previous  Next  Index