Browse Source

REPORT-4717 [9.0内测] 修改绝对布局决策报表body样式,组件列表会出现两个body组件

master
kerry 7 years ago
parent
commit
738ded6e88
  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.designer.IntervalConstants;
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.XWFitLayout;
import com.fr.design.designer.creator.XWScaleLayout;
@ -117,6 +118,13 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
@Override
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);
layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue());
adaptComboBox.setSelectedIndex(ob.getCompState());
@ -124,6 +132,14 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
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
public WFitLayout updateBean() {

Loading…
Cancel
Save