private Rectangle getPathBounds(TreePath path, Insets insets, Rectangle bounds) { bounds = treeState.getBounds(path, bounds); if (bounds != null) { bounds.x = 0; bounds.y += insets.top; bounds.width = tree.getWidth(); } return bounds; } }
public Rectangle getPathBounds(TreePath path) { Insets i = getInsets(); Rectangle bounds = getLayoutCache().getBounds(path, null); if(bounds != null && i != null) { bounds.x += i.left; bounds.y += i.top; } return bounds; }
@Override public void run() { if (SubstanceTreeUI.this.tree == null) { // may happen if the LAF was switched in the meantime return; } Rectangle boundsBuffer = new Rectangle(); Rectangle bounds = treeState.getBounds(treePath, boundsBuffer); if (bounds != null) { // still visible // fix for defect 180 - refresh the entire row bounds.x = 0; bounds.width = tree.getWidth(); // fix for defect 188 - rollover effects for trees // with insets Insets insets = tree.getInsets(); bounds.x += insets.left; bounds.y += insets.top; tree.repaint(bounds); } } });
public void run() { if (SubstanceTreeUI.this.tree == null) { // may happen if the LAF was switched in the meantime return; } Rectangle boundsBuffer = new Rectangle(); Rectangle bounds = treeState.getBounds(treePath, boundsBuffer); if (bounds != null) { // still visible // fix for defect 180 - refresh the entire row bounds.x = 0; bounds.width = tree.getWidth(); // fix for defect 188 - rollover effects for trees // with insets Insets insets = tree.getInsets(); bounds.x += insets.left; bounds.y += insets.top; tree.repaint(bounds); } } });
path = (TreePath) paintingEnumerator.nextElement(); if (path != null) { bounds = treeState.getBounds(path, boundsBuffer); bounds.x += insets.left; bounds.y += insets.top;
path = (TreePath) paintingEnumerator.nextElement(); if (path != null) { bounds = treeState.getBounds(path, boundsBuffer); bounds.x += insets.left; bounds.y += insets.top;
@Override public Rectangle getPathBounds(JTree tree, TreePath path) { if (tree != null && treeState != null) { Rectangle rect = treeState.getBounds(path, new Rectangle()); if (rect != null) { Insets insets = tree.getInsets();
if (background == null) background = tree.getBackground(); bounds = treeState.getBounds(path, boundsBuffer); bounds.x += insets.left; bounds.y += insets.top;
if (background == null) background = tree.getBackground(); bounds = treeState.getBounds(path, boundsBuffer); if(bounds != null){ bounds.x += insets.left;