|
|
@ -316,4 +316,19 @@ public abstract class RefreshableJTree extends CheckBoxTree { |
|
|
|
tip.setOpaque(false); |
|
|
|
tip.setOpaque(false); |
|
|
|
return tip; |
|
|
|
return tip; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public TreePath getPathForLocation(int x, int y) { |
|
|
|
|
|
|
|
// NewUI树组件全选行,仅考虑y坐标即可
|
|
|
|
|
|
|
|
TreePath closestPath = getClosestPathForLocation(x, y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(closestPath != null) { |
|
|
|
|
|
|
|
Rectangle pathBounds = getPathBounds(closestPath); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(pathBounds != null && |
|
|
|
|
|
|
|
y >= pathBounds.y && y < (pathBounds.y + pathBounds.height)) |
|
|
|
|
|
|
|
return closestPath; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|