Browse Source

代码修改

feature/big-screen
kerry 4 years ago
parent
commit
0a98c77d3c
  1. 6
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java
  2. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java
  3. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java

6
designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

@ -380,9 +380,9 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
Dimension d = new Dimension(layout.getWidth(), layout.getHeight());
XWBorderLayout parent = (XWBorderLayout) layout.getParent();
root.setScale(scale);
parent.setScale(scale);
// 自适应布局的父层是border
if (layout.getParent() != null) {
if (parent != null) {
parent.setScale(scale);
int paraHeight = parent.toData().getNorthSize();
XLayoutContainer paraComponent = designer.getParaComponent();
if (needCalculateParaHeight && paraComponent != null) {
@ -395,7 +395,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
parent.add(root, WBorderLayout.CENTER);
root.setBounds(0, this.designer.getParaHeight(), d.width, d.height);
}
layout.getParent().setSize(d.width, d.height + this.designer.getParaHeight());
parent.setSize(d.width, d.height + this.designer.getParaHeight());
// 调整自适应布局大小后,同步调整参数界面和border大小,此时刷新下formArea
FormArea.this.validate();

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java

@ -75,6 +75,9 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane {
super.populate();
WLayout wabs = parent.toData();
CRBoundsWidget boundsWidget = wabs.getBoundsWidget(creator.toData());
if (boundsWidget == null){
return;
}
Rectangle bounds = boundsWidget.getBounds();
x.setValue(bounds.x);
y.setValue(bounds.y);

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java

@ -80,6 +80,9 @@ public class WidgetBoundPane extends BasicPane {
public void populate() {
WLayout wabs = parent.toData();
CRBoundsWidget boundsWidget = wabs.getBoundsWidget(creator.toData());
if (boundsWidget == null){
return;
}
Rectangle bounds = new Rectangle(boundsWidget.getBounds());
width.setValue(bounds.width);
height.setValue(bounds.height);

Loading…
Cancel
Save