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.
-
addSelectionPath(JTreePath)
- Adds the path identified by path to the current selection.
-
addSelectionPaths(JTreePath[])
- Adds each path in paths to the current selection.
-
addSelectionRow(int)
- Adds the path at row to the current selection.
-
addSelectionRows(int[])
- Adds the paths at each of the rows in rows to the current selection.
-
collapsePath(JTreePath)
- Insures that the last item identified in path is collapsed and
visible.
-
collapseRow(int)
- Insures that the item identified by row is collapsed.
-
expandPath(JTreePath)
- Insures that the last item identified in path is expanded and
visible.
-
expandRow(int)
- Insures that the item identified by row is expanded.
-
getClosestPathForLocation(int, int)
- Returns the path to the node that is closest to x,y.
-
getClosestRowForLocation(int, int)
- Returns the row to the node that is closest to x,y.
-
getEditingPath()
- Returns the path to the element that is being edited.
-
getMaxSelectionRow()
- Gets the last selected row.
-
getMinSelectionRow()
- Gets the first selected row.
-
getPathBounds(JTreePath)
- Returns the Rectangle enclosing the label portion that the
last item in path will be drawn into.
-
getPathForRow(int)
- Returns the path for passed in row.
-
getRowBounds(int)
- Returns the Rectangle enclosing the label portion that the
item identified by row will be drawn into.
-
getRowCount()
- Returns the number of rows that are being displayed.
-
getRowForPath(JTreePath)
- Returns the row that the last item identified in path is visible
at.
-
getSelectionPath()
- Returns the path to the first selected value, or null if
nothing is currently selected.
-
getSelectionPaths()
- Returns the path of the selected values, or null if nothing is
current selected.
-
getSelectionRows()
- Returns all of the currently selected rows.
-
isCollapsed(int)
- Returns true if the value identified by row is currently collapsed.
-
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.
-
isEditing()
- Returns true if the tree is being edited.
-
isExpanded(int)
- Returns true if the value identified by row is currently expanded.
-
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.
-
isPathSelected(JTreePath)
- Returns true if item identified by path is currently selected.
-
isRowSelected(int)
- Returns true if the row identitifed by row is selected.
-
isVisible(JTreePath)
- Returns true if all the parents of path are currently expanded.
-
makeVisible(JTreePath)
- Ensures that all of the parents of path are currently expanded.
-
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).
-
scrollRowToVisible(int)
- Scrolls the item identified by row to be visible.
-
setSelectionPath(JTreePath)
-
Sets to selection to the value identified by path.
-
setSelectionPaths(JTreePath[])
-
Sets the selection to paths.
-
setSelectionRow(int)
- The current selection is set to the path for the item at row.
-
setSelectionRows(int[])
- The selection is set to the paths for the items at each of the rows
in rows.
-
startEditingAtPath(JTreePath)
- Selects the last item in path and tries to edit it.
-
stopEditing()
- Stops the current editing session.
getRowCount
public abstract int getRowCount()
- Returns the number of rows that are being displayed.
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.
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.
setSelectionRow
public abstract void setSelectionRow(int row)
- The current selection is set to the path for the item at row.
setSelectionRows
public abstract void setSelectionRows(int rows[])
- The selection is set to the paths for the items at each of the rows
in rows.
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.
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.
addSelectionRow
public abstract void addSelectionRow(int row)
- Adds the path at row to the current selection.
addSelectionRows
public abstract void addSelectionRows(int rows[])
- Adds the paths at each of the rows in rows to the current selection.
getSelectionPath
public abstract JTreePath getSelectionPath()
- Returns the path to the first selected value, or null if
nothing is currently selected.
getSelectionPaths
public abstract JTreePath[] getSelectionPaths()
- Returns the path of the selected values, or null if nothing is
current selected.
getSelectionRows
public abstract int[] getSelectionRows()
- Returns all of the currently selected rows.
getMinSelectionRow
public abstract int getMinSelectionRow()
- Gets the first selected row.
getMaxSelectionRow
public abstract int getMaxSelectionRow()
- Gets the last selected row.
isPathSelected
public abstract boolean isPathSelected(JTreePath path)
- Returns true if item identified by path is currently selected.
isRowSelected
public abstract boolean isRowSelected(int row)
- Returns true if the row identitifed by row is selected.
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.
isExpanded
public abstract boolean isExpanded(int row)
- Returns true if the value identified by row is currently expanded.
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.
isCollapsed
public abstract boolean isCollapsed(int row)
- Returns true if the value identified by row is currently collapsed.
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.
isVisible
public abstract boolean isVisible(JTreePath path)
- Returns true if all the parents of path are currently expanded.
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.
getRowBounds
public abstract Rectangle getRowBounds(int row)
- Returns the Rectangle enclosing the label portion that the
item identified by row will be drawn into.
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).
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.
getPathForRow
public abstract JTreePath getPathForRow(int row)
- Returns the path for passed in row. If row is not visible
null is returned.
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.
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.
expandRow
public abstract void expandRow(int row)
- Insures that the item identified by row is expanded.
collapsePath
public abstract void collapsePath(JTreePath path)
- Insures that the last item identified in path is collapsed and
visible.
collapseRow
public abstract void collapseRow(int row)
- Insures that the item identified by row is collapsed.
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.
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.
isEditing
public abstract boolean isEditing()
- Returns true if the tree is being edited. The item that is being
edited can be returned by getEditingPath().
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.
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.
getEditingPath
public abstract JTreePath getEditingPath()
- Returns the path to the element that is being edited.
All Packages Class Hierarchy This Package Previous Next Index