|
|
@ -771,15 +771,24 @@ public class FormArea extends JComponent implements ScrollRulerComponent { |
|
|
|
heightPane.setValue(height); |
|
|
|
heightPane.setValue(height); |
|
|
|
reCalculateHeight((int) height); |
|
|
|
reCalculateHeight((int) height); |
|
|
|
} |
|
|
|
} |
|
|
|
if (designer.getRootComponent().acceptType(XWFitLayout.class) ) { |
|
|
|
traverAndAdjust(designer.getRootComponent()); |
|
|
|
XWFitLayout layout = (XWFitLayout) designer.getRootComponent(); |
|
|
|
|
|
|
|
// 撤销时先refreshRoot了,此处去掉内边距再增加间隔
|
|
|
|
|
|
|
|
layout.moveContainerMargin(); |
|
|
|
|
|
|
|
layout.addCompInterval(layout.getAcualInterval()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.slidePane.setShowValue((int) slide); |
|
|
|
this.slidePane.setShowValue((int) slide); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 撤销时先refreshRoot了,此处去掉内边距再增加间隔,循环遍历布局,调整fitlayout布局的间隔
|
|
|
|
|
|
|
|
private void traverAndAdjust(XCreator creator) { |
|
|
|
|
|
|
|
if (creator instanceof XWFitLayout) { |
|
|
|
|
|
|
|
XWFitLayout temp = (XWFitLayout) creator; |
|
|
|
|
|
|
|
temp.moveContainerMargin(); |
|
|
|
|
|
|
|
temp.addCompInterval(temp.getAcualInterval()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0; i < creator.getComponentCount(); i++) { |
|
|
|
|
|
|
|
Object object = creator.getComponent(i); |
|
|
|
|
|
|
|
if (object instanceof XCreator){ |
|
|
|
|
|
|
|
traverAndAdjust((XCreator) object); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 计算滚动条的值和max |
|
|
|
* 计算滚动条的值和max |
|
|
|