Browse Source

Merge pull request #1342 in BA/design from ~KERRY/design:release/9.0 to release/9.0

* commit '738ded6e88ae30eb4274ef80d0282b1572d9ed5f':
  REPORT-4717 [9.0内测] 修改绝对布局决策报表body样式,组件列表会出现两个body组件
master
superman 7 years ago
parent
commit
793a426ae3
  1. 16
      designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

16
designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -3,6 +3,7 @@ package com.fr.design.widget.ui.designer.layout;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteBodyLayout; import com.fr.design.designer.creator.XWAbsoluteBodyLayout;
import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWScaleLayout; import com.fr.design.designer.creator.XWScaleLayout;
@ -117,6 +118,13 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
@Override @Override
public void populateBean(WFitLayout ob) { public void populateBean(WFitLayout ob) {
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
XLayoutContainer rootLayout = selectedBodyLayout(formDesigner);
if (rootLayout != formDesigner.getRootComponent()
&& formDesigner.getSelectionModel().getSelection().getSelectedCreator() == formDesigner.getRootComponent()) {
formDesigner.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{selectedBodyLayout(formDesigner).toData()}));
}
paddingBound.populate(ob); paddingBound.populate(ob);
layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue()); layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue());
adaptComboBox.setSelectedIndex(ob.getCompState()); adaptComboBox.setSelectedIndex(ob.getCompState());
@ -124,6 +132,14 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
stylePane.setValue(ob.getBorderStyle()); stylePane.setValue(ob.getBorderStyle());
} }
private XLayoutContainer selectedBodyLayout(FormDesigner formDesigner) {
XLayoutContainer rootLayout = formDesigner.getRootComponent();
if (rootLayout.getComponentCount() == 1 && rootLayout.getXCreator(0).acceptType(XWAbsoluteBodyLayout.class)){
rootLayout = (XWAbsoluteBodyLayout)rootLayout.getXCreator(0);
}
return rootLayout;
}
@Override @Override
public WFitLayout updateBean() { public WFitLayout updateBean() {

Loading…
Cancel
Save