Browse Source

REPORT-35699 国际化修改对报表下拉框产生影响

feature/big-screen
Henry.Wang 4 years ago
parent
commit
83f01ae956
  1. 14
      designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java

14
designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java

@ -397,12 +397,16 @@ public final class GUICoreUtils {
Dimension size = popup.getPreferredSize();
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
screen.setSize(screen.getSize().width, screen.height - HEIGHT_GAP);
int showOnScreenX = Math.min(screen.width, parentComponent.getLocationOnScreen().x + parentComponent.getWidth());
//父元素右边界的坐标
int parentComponentRightBorderPosition = parentComponent.getLocationOnScreen().x + parentComponent.getWidth();
//设计器右边界的坐标
Rectangle rectangle = DesignerContext.getDesignerFrame().getBounds();
int designerRightBorderPosition = rectangle.x + rectangle.width;
rectangle = SwingUtilities.getWindowAncestor(parentComponent).getBounds();
designerRightBorderPosition = Math.max(designerRightBorderPosition, rectangle.x + rectangle.width);
// peter:调整X的高度.
if (point.x + size.width > showOnScreenX && size.width < showOnScreenX) {
x += (showOnScreenX - point.x - size.width);
if (point.x + size.width > designerRightBorderPosition && size.width < designerRightBorderPosition) {
x += (parentComponentRightBorderPosition - point.x - size.width);
}
// peter:调整y高度.

Loading…
Cancel
Save