Browse Source

REPORT-55149 【组件背景分离】组件复用-图表块没看到内边距设置项

【问题原因】
设置内边距后,图表块进入编辑状态,图表编辑控件的尺寸正常,但是显示位置不对,没有留出
顶部和左侧内边距的空间

【改动思路】
需要在图表编辑器布局后,按照内边距重新调整下位置
zheng-1641779399395
Starryi 3 years ago
parent
commit
3108b10c7b
  1. 10
      designer-form/src/main/java/com/fr/design/designer/beans/events/DesignerEditor.java

10
designer-form/src/main/java/com/fr/design/designer/beans/events/DesignerEditor.java

@ -86,9 +86,15 @@ public class DesignerEditor<T extends JComponent> implements PropertyChangeListe
int horizonMargin = marginLeft + marginRight; int horizonMargin = marginLeft + marginRight;
int verticalMargin = marginTop + marginBottom; int verticalMargin = marginTop + marginBottom;
comp.setSize(new Dimension(size.width - 2 - horizonMargin, size.height - 2 - verticalMargin)); int x = 1 + marginLeft;
int y = 1 + marginTop;
int width = size.width - 2 - horizonMargin;
int height = size.height - 2 - verticalMargin;
comp.setSize(new Dimension(width, height));
LayoutUtils.layoutContainer(comp); LayoutUtils.layoutContainer(comp);
Graphics clipg = g.create(1 + marginLeft, 1 + marginTop, size.width, size.height); comp.setBounds(comp.getX() + x, comp.getY() + y, width, height);
Graphics clipg = g.create(x, y, width, height);
this.comp.paint(clipg); this.comp.paint(clipg);
} }
} }

Loading…
Cancel
Save