javax.swing.plaf
Class TreeUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.TreeUI
Direct Known Subclasses:
BasicTreeUI sample code for javax.swing.plaf.basic.BasicTreeUI definition code for javax.swing.plaf.basic.BasicTreeUI , MultiTreeUI sample code for javax.swing.plaf.multi.MultiTreeUI definition code for javax.swing.plaf.multi.MultiTreeUI

public abstract class TreeUI
extends ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI

Pluggable look and feel interface for JTree.


Constructor Summary
TreeUI sample code for javax.swing.plaf.TreeUI.TreeUI() definition code for javax.swing.plaf.TreeUI.TreeUI() ()
           
 
Method Summary
abstract  void cancelEditing sample code for javax.swing.plaf.TreeUI.cancelEditing(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.cancelEditing(javax.swing.JTree) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
          Cancels the current editing session.
abstract  TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath getClosestPathForLocation sample code for javax.swing.plaf.TreeUI.getClosestPathForLocation(javax.swing.JTree, int, int) definition code for javax.swing.plaf.TreeUI.getClosestPathForLocation(javax.swing.JTree, int, int) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree, int x, int y)
          Returns the path to the node that is closest to x,y.
abstract  TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath getEditingPath sample code for javax.swing.plaf.TreeUI.getEditingPath(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.getEditingPath(javax.swing.JTree) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
          Returns the path to the element that is being edited.
abstract  Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getPathBounds sample code for javax.swing.plaf.TreeUI.getPathBounds(javax.swing.JTree, javax.swing.tree.TreePath) definition code for javax.swing.plaf.TreeUI.getPathBounds(javax.swing.JTree, javax.swing.tree.TreePath) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree, TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  path)
          Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
abstract  TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath getPathForRow sample code for javax.swing.plaf.TreeUI.getPathForRow(javax.swing.JTree, int) definition code for javax.swing.plaf.TreeUI.getPathForRow(javax.swing.JTree, int) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree, int row)
          Returns the path for passed in row.
abstract  int getRowCount sample code for javax.swing.plaf.TreeUI.getRowCount(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.getRowCount(javax.swing.JTree) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
          Returns the number of rows that are being displayed.
abstract  int getRowForPath sample code for javax.swing.plaf.TreeUI.getRowForPath(javax.swing.JTree, javax.swing.tree.TreePath) definition code for javax.swing.plaf.TreeUI.getRowForPath(javax.swing.JTree, javax.swing.tree.TreePath) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree, TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  path)
          Returns the row that the last item identified in path is visible at.
abstract  boolean isEditing sample code for javax.swing.plaf.TreeUI.isEditing(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.isEditing(javax.swing.JTree) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
          Returns true if the tree is being edited.
abstract  void startEditingAtPath sample code for javax.swing.plaf.TreeUI.startEditingAtPath(javax.swing.JTree, javax.swing.tree.TreePath) definition code for javax.swing.plaf.TreeUI.startEditingAtPath(javax.swing.JTree, javax.swing.tree.TreePath) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree, TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  path)
          Selects the last item in path and tries to edit it.
abstract  boolean stopEditing sample code for javax.swing.plaf.TreeUI.stopEditing(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.stopEditing(javax.swing.JTree) (JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
          Stops the current editing session.
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , createUI sample code for javax.swing.plaf.ComponentUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.createUI(javax.swing.JComponent) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) , getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) , getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) , getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) , installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) , uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

TreeUI sample code for javax.swing.plaf.TreeUI() definition code for javax.swing.plaf.TreeUI()

public TreeUI()
Method Detail

getPathBounds sample code for javax.swing.plaf.TreeUI.getPathBounds(javax.swing.JTree, javax.swing.tree.TreePath) definition code for javax.swing.plaf.TreeUI.getPathBounds(javax.swing.JTree, javax.swing.tree.TreePath)

public abstract Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getPathBounds(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree,
                                        TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.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.


getPathForRow sample code for javax.swing.plaf.TreeUI.getPathForRow(javax.swing.JTree, int) definition code for javax.swing.plaf.TreeUI.getPathForRow(javax.swing.JTree, int)

public abstract TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  getPathForRow(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree,
                                       int row)
Returns the path for passed in row. If row is not visible null is returned.


getRowForPath sample code for javax.swing.plaf.TreeUI.getRowForPath(javax.swing.JTree, javax.swing.tree.TreePath) definition code for javax.swing.plaf.TreeUI.getRowForPath(javax.swing.JTree, javax.swing.tree.TreePath)

public abstract int getRowForPath(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree,
                                  TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.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.


getRowCount sample code for javax.swing.plaf.TreeUI.getRowCount(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.getRowCount(javax.swing.JTree)

public abstract int getRowCount(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
Returns the number of rows that are being displayed.


getClosestPathForLocation sample code for javax.swing.plaf.TreeUI.getClosestPathForLocation(javax.swing.JTree, int, int) definition code for javax.swing.plaf.TreeUI.getClosestPathForLocation(javax.swing.JTree, int, int)

public abstract TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  getClosestPathForLocation(JTree sample code for javax.swing.JTree definition code for javax.swing.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.


isEditing sample code for javax.swing.plaf.TreeUI.isEditing(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.isEditing(javax.swing.JTree)

public abstract boolean isEditing(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
Returns true if the tree is being edited. The item that is being edited can be returned by getEditingPath().


stopEditing sample code for javax.swing.plaf.TreeUI.stopEditing(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.stopEditing(javax.swing.JTree)

public abstract boolean stopEditing(JTree sample code for javax.swing.JTree definition code for javax.swing.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.


cancelEditing sample code for javax.swing.plaf.TreeUI.cancelEditing(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.cancelEditing(javax.swing.JTree)

public abstract void cancelEditing(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
Cancels 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 sample code for javax.swing.plaf.TreeUI.startEditingAtPath(javax.swing.JTree, javax.swing.tree.TreePath) definition code for javax.swing.plaf.TreeUI.startEditingAtPath(javax.swing.JTree, javax.swing.tree.TreePath)

public abstract void startEditingAtPath(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree,
                                        TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.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.


getEditingPath sample code for javax.swing.plaf.TreeUI.getEditingPath(javax.swing.JTree) definition code for javax.swing.plaf.TreeUI.getEditingPath(javax.swing.JTree)

public abstract TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  getEditingPath(JTree sample code for javax.swing.JTree definition code for javax.swing.JTree  tree)
Returns the path to the element that is being edited.