|
|
@ -1,7 +1,5 @@ |
|
|
|
package com.fr.design.fit.common; |
|
|
|
package com.fr.design.fit.common; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.decision.ExtraDecisionClassManager; |
|
|
|
|
|
|
|
import com.fr.decision.fun.EmailSendProvider; |
|
|
|
|
|
|
|
import com.fr.design.data.DesignTableDataManager; |
|
|
|
import com.fr.design.data.DesignTableDataManager; |
|
|
|
import com.fr.design.fit.DesignerUIModeConfig; |
|
|
|
import com.fr.design.fit.DesignerUIModeConfig; |
|
|
|
import com.fr.design.fit.NewJForm; |
|
|
|
import com.fr.design.fit.NewJForm; |
|
|
@ -13,7 +11,6 @@ import com.fr.design.fit.attrpane.RootDesignExtendDefinePane; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.JForm; |
|
|
|
import com.fr.design.mainframe.JForm; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.mainframe.JTemplateFactory; |
|
|
|
|
|
|
|
import com.fr.design.parameter.RootDesignDefinePane; |
|
|
|
import com.fr.design.parameter.RootDesignDefinePane; |
|
|
|
import com.fr.design.preview.FormAdaptivePreview; |
|
|
|
import com.fr.design.preview.FormAdaptivePreview; |
|
|
|
import com.fr.design.preview.FormPreview; |
|
|
|
import com.fr.design.preview.FormPreview; |
|
|
@ -25,8 +22,8 @@ import com.fr.design.widget.ui.designer.layout.FRAbsoluteLayoutDefinePane; |
|
|
|
import com.fr.design.widget.ui.designer.layout.FRFitLayoutDefinePane; |
|
|
|
import com.fr.design.widget.ui.designer.layout.FRFitLayoutDefinePane; |
|
|
|
import com.fr.file.FILE; |
|
|
|
import com.fr.file.FILE; |
|
|
|
import com.fr.file.MemFILE; |
|
|
|
import com.fr.file.MemFILE; |
|
|
|
import com.fr.form.fit.NewFormMarkAttr; |
|
|
|
|
|
|
|
import com.fr.form.main.Form; |
|
|
|
import com.fr.form.main.Form; |
|
|
|
|
|
|
|
import com.fr.form.main.WidgetGather; |
|
|
|
import com.fr.form.ui.ElementCaseEditor; |
|
|
|
import com.fr.form.ui.ElementCaseEditor; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.container.WAbsoluteBodyLayout; |
|
|
|
import com.fr.form.ui.container.WAbsoluteBodyLayout; |
|
|
@ -152,11 +149,34 @@ public class AdaptiveSwitchUtil { |
|
|
|
if (DesignerUIModeConfig.getInstance().newUIMode() && jForm.getTarget().getReportFitAttr() != null && isSwitchJFromIng()) { |
|
|
|
if (DesignerUIModeConfig.getInstance().newUIMode() && jForm.getTarget().getReportFitAttr() != null && isSwitchJFromIng()) { |
|
|
|
jForm.getTarget().setReportFitAttr(shiftReportFitAttr(old, jForm.getTarget().getReportFitAttr().isFitFont())); |
|
|
|
jForm.getTarget().setReportFitAttr(shiftReportFitAttr(old, jForm.getTarget().getReportFitAttr().isFitFont())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
processAbsoluteLayoutCompatible(jForm.getTarget()); |
|
|
|
TemplateTool.saveForm(jForm); |
|
|
|
TemplateTool.saveForm(jForm); |
|
|
|
} |
|
|
|
} |
|
|
|
return template; |
|
|
|
return template; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void processAbsoluteLayoutCompatible(Form form){ |
|
|
|
|
|
|
|
Form.traversalWidget(form.getContainer(), new WidgetGather() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void dealWith(Widget widget) { |
|
|
|
|
|
|
|
if (widget.acceptType(WAbsoluteBodyLayout.class)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
WAbsoluteLayout absoluteLayout = (WAbsoluteLayout) widget; |
|
|
|
|
|
|
|
//切换到新模板后,内部的绝对画布块都要设置成适应缩放的逻辑
|
|
|
|
|
|
|
|
absoluteLayout.setCompState(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean dealWithAllCards() { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, WAbsoluteLayout.class); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @Description: 创建模板核心方法 |
|
|
|
* @Description: 创建模板核心方法 |
|
|
|
* @param old 以前的方法 |
|
|
|
* @param old 以前的方法 |
|
|
|