| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract TreePath | Returns: theTreePath node closest to x,y or null
if there is nothing currently visiblea tree, int JTree objectan integer giving the number of pixels horizontally from the
left edge of the display area x, int an integer giving the number of pixels vertically from the top
of the display area, minus any top margin y)Returns the path to the node that is closest to x,y. |
| public abstract TreePath | Returns: aTreePath containing the path to treethe tree)JTree for which to return a pathReturns the path to the element that is being edited. |
| public abstract Rectangle | Returns: theRectangle enclosing the label portion that the
last item in path will be drawn into, null if any
component in path is currently valid.the tree, TreePath JTree for paththe path)TreePath identifying the nodeReturns the Rectangle enclosing the label portion that the last item in path will be drawn into. |
| public abstract TreePath | Returns: thepath for row or null if row
is not visiblea tree, int JTree objectan integer specifying a row row)Returns the path for passed in row. |
| public abstract int | Returns: an integer specifying the number of row being displayedthe tree)JTree for which to count rowsReturns the number of rows that are being displayed. |
| public abstract int | Returns: an integer specifying the row at which the last item identified is visible, -1 if any of the elements inpath are not currently visiblethe tree, TreePath JTree for paththe path)TreePath object to look inReturns the row that the last item identified in path is visible at. |
| public abstract boolean | |
| public abstract void | startEditingAtPath(JTree
the tree, TreePath JTree being editedthe path)TreePath to be editedSelects the last item in path and tries to edit it. |
| public abstract boolean | Returns: true if the editor allows the editing session to stopa tree)JTree objectStops the current editing session. |
| TreeUI | back to summary |
|---|---|
| protected TreeUI() Constructor for subclasses to call. | |
| cancelEditing | back to summary |
|---|---|
| public abstract void cancelEditing(JTree tree) Cancels the current editing session. This has no effect if the tree isn't being edited.
| |
| getClosestPathForLocation | back to summary |
|---|---|
| public abstract TreePath getClosestPathForLocation(JTree tree, 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.
| |
| getEditingPath | back to summary |
|---|---|
| public abstract TreePath getEditingPath(JTree tree) Returns the path to the element that is being edited. | |
| getPathBounds | back to summary |
|---|---|
| public abstract Rectangle getPathBounds(JTree tree, TreePath 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 invalid. | |
| getPathForRow | back to summary |
|---|---|
| public abstract TreePath getPathForRow(JTree tree, int row) Returns the path for passed in row. If row is not visible null is returned. | |
| getRowCount | back to summary |
|---|---|
| public abstract int getRowCount(JTree tree) Returns the number of rows that are being displayed.
| |
| getRowForPath | back to summary |
|---|---|
| public abstract int getRowForPath(JTree tree, TreePath 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. | |
| isEditing | back to summary |
|---|---|
| public abstract boolean isEditing(JTree tree) Returns true if the tree is being edited. The item that is being edited can be returned by getEditingPath().
| |
| startEditingAtPath | back to summary |
|---|---|
| public abstract void startEditingAtPath(JTree tree, TreePath 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. | |
| stopEditing | back to summary |
|---|---|
| public abstract boolean stopEditing(JTree tree) 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.
| |