Rectangle r = tree.getPathBounds(path);
Rectangle r = tree.getPathBounds(path); if ( me.getX() < r.x - positionX || me.getX() > r.x - positionX + r.width ) { me.translatePoint( r.x - me.getX(), 0 );
Rectangle r = tree.getPathBounds(path); if ( me.getX() < r.x - positionX || me.getX() > r.x - positionX + r.width ) { me.translatePoint( r.x - me.getX(), 0 );
if (isTreeColumn(column)) { TreePath path = tree.getPathForRow(TreeTable.this.rowAtPoint(e.getPoint())); Rectangle r = tree.getPathBounds(path); if (e.getX() >= r.x - positionX && e.getX() <= r.x - positionX + r.width) { changeSelection = false;
if (isTreeColumn(column)) { TreePath path = tree.getPathForRow(TreeTable.this.rowAtPoint(e.getPoint())); Rectangle r = tree.getPathBounds(path); if (e.getX() >= r.x - positionX && e.getX() <= r.x - positionX + r.width) { changeSelection = false;
Rectangle r = tree.getPathBounds(path);
private boolean isLocationInExpandControl( TreePath path, Point location ) { if( tree.getModel().isLeaf( path.getLastPathComponent() ) ) return false; Rectangle r = tree.getPathBounds(path); int boxWidth = 8; Insets i = tree.getInsets(); int indent = 0; if( tree.getUI() instanceof BasicTreeUI ) { BasicTreeUI ui = (BasicTreeUI)tree.getUI(); if( null != ui.getExpandedIcon() ) boxWidth = ui.getExpandedIcon().getIconWidth(); indent = ui.getLeftChildIndent(); } int boxX; if( tree.getComponentOrientation().isLeftToRight() ) { boxX = r.x - positionX - indent - boxWidth; } else { boxX = r.x - positionX + indent + r.width; } return location.getX() >= boxX && location.getX() <= (boxX + boxWidth); } }