Browse Source

REPORT-55753 【组件背景分离】组件复用-工具栏的显示位置不超过绘制区域

final/10.0
hades 3 years ago
parent
commit
9de0d420d4
  1. 9
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

9
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -776,8 +776,13 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
if (popup == null) {
popup = new SelectedPopupDialog(this, designer);
}
int extraX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale());
int extraY = (int) (bounds.y * designer.getScale());
int creatorRightX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale());
int creatorRightY = (int) (bounds.y * designer.getScale());
int formDesignerWidth = designer.getWidth();
int formDesignerHeight = designer.getHeight();
// 不超过可绘制区域
int extraX = Math.min(creatorRightX, formDesignerWidth);
int extraY = creatorRightY < 0 ? 0 : Math.min(creatorRightY, formDesignerHeight);
// 放到事件尾部执行
SwingUtilities.invokeLater(new Runnable() {
@Override

Loading…
Cancel
Save