Browse Source

REPORT-145122 feat:树组件选中状态问题修复

fbp/release
Levy.Xie-解安森 1 month ago
parent
commit
50c17ef449
  1. 15
      designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java

15
designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java

@ -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;
}
} }

Loading…
Cancel
Save