Package Summary  Overview Summary

class:TreeUI [NONE]

Direct Known Subclasses:
BasicTreeUI, MultiTreeUI

public abstract class TreeUI
extends ComponentUI
Pluggable look and feel interface for JTree.

constructor:TreeUI() [CHANGED]

  • TreeUI

    publicprotected  TreeUI()
    Constructor for subclasses to call.
  • TreeUI

    protected TreeUI()
    Constructor for subclasses to call.

method:getPathBounds(javax.swing.JTree,javax.swing.tree.TreePath) [NONE]

  • getPathBounds

    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 valid.
    Parameters:
    tree - the JTree for path
    path - the TreePath identifying the node
    Returns:
    the Rectangle enclosing the label portion that the last item in path will be drawn into, null if any component in path is currently valid.
  • method:getPathForRow(javax.swing.JTree,int) [NONE]

    getPathForRow

    public abstract  TreePath getPathForRow?(JTree tree, int row)
    Returns the path for passed in row. If row is not visible null is returned.
    Parameters:
    tree - a JTree object
    row - an integer specifying a row
    Returns:
    the path for row or null if row is not visible

    method:getRowForPath(javax.swing.JTree,javax.swing.tree.TreePath) [NONE]

    getRowForPath

    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.
    Parameters:
    tree - the JTree for path
    path - the TreePath object to look in
    Returns:
    an integer specifying the row at which the last item identified is visible, -1 if any of the elements in path are not currently visible

    method:getRowCount(javax.swing.JTree) [NONE]

    getRowCount

    public abstract  int getRowCount?(JTree tree)
    Returns the number of rows that are being displayed.
    Parameters:
    tree - the JTree for which to count rows
    Returns:
    an integer specifying the number of row being displayed

    method:getClosestPathForLocation(javax.swing.JTree,int,int) [NONE]

    getClosestPathForLocation

    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.
    Parameters:
    tree - a JTree object
    x - an integer giving the number of pixels horizontally from the left edge of the display area
    y - an integer giving the number of pixels vertically from the top of the display area, minus any top margin
    Returns:
    the TreePath node closest to x,y or null if there is nothing currently visible

    method:isEditing(javax.swing.JTree) [NONE]

    isEditing

    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().
    Parameters:
    tree - a JTree object
    Returns:
    true if tree is being edited

    method:stopEditing(javax.swing.JTree) [NONE]

    stopEditing

    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.
    Parameters:
    tree - a JTree object
    Returns:
    true if the editor allows the editing session to stop

    method:cancelEditing(javax.swing.JTree) [NONE]

    cancelEditing

    public abstract  void cancelEditing?(JTree tree)
    Cancels the current editing session. This has no effect if the tree isn't being edited.
    Parameters:
    tree - a JTree object

    method:startEditingAtPath(javax.swing.JTree,javax.swing.tree.TreePath) [NONE]

    startEditingAtPath

    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.
    Parameters:
    tree - the JTree being edited
    path - the TreePath to be edited

    method:getEditingPath(javax.swing.JTree) [NONE]

    getEditingPath

    public abstract  TreePath getEditingPath?(JTree tree)
    Returns the path to the element that is being edited.
    Parameters:
    tree - the JTree for which to return a path
    Returns:
    a TreePath containing the path to tree

    © 2021 Oracle Corporation and/or its affiliates