Browse Source

Merge pull request #6133 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '954a20aaebe1f09d09c1571a423a984f849d5e7f':
  fix:兼容大屏组件的cpt设置
feature/10.0
superman 3 years ago
parent
commit
b870ed2b53
  1. 2
      designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java
  2. 9
      designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateFitAttrPane.java

2
designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java

@ -81,7 +81,7 @@ public class ReportFitAttrAction extends JTemplateAction {
} }
final FitProvider wbTpl = (FitProvider) jwb.getTarget(); final FitProvider wbTpl = (FitProvider) jwb.getTarget();
ReportFitAttr fitAttr = wbTpl.getReportFitAttr(); ReportFitAttr fitAttr = wbTpl.getReportFitAttr();
TemplateFitAttrPane templateFitAttrPane = new TemplateFitAttrPane(); TemplateFitAttrPane templateFitAttrPane = new TemplateFitAttrPane(jwb);
showReportFitDialog(fitAttr, jwb, wbTpl, templateFitAttrPane); showReportFitDialog(fitAttr, jwb, wbTpl, templateFitAttrPane);
} }

9
designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateFitAttrPane.java

@ -1,6 +1,5 @@
package com.fr.design.report.fit.menupane; package com.fr.design.report.fit.menupane;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.report.fit.BaseFitAttrPane; import com.fr.design.report.fit.BaseFitAttrPane;
@ -15,7 +14,10 @@ import java.awt.event.ItemListener;
public class TemplateFitAttrPane extends BaseFitAttrPane { public class TemplateFitAttrPane extends BaseFitAttrPane {
public TemplateFitAttrPane() { private JTemplate jwb;
public TemplateFitAttrPane(JTemplate jwb) {
this.jwb = jwb;
initComponents(); initComponents();
} }
@ -23,7 +25,7 @@ public class TemplateFitAttrPane extends BaseFitAttrPane {
protected void initComponents() { protected void initComponents() {
super.initComponents(); super.initComponents();
for (FitAttrModel fitAttrModel : fitAttrModelList) { for (FitAttrModel fitAttrModel : fitAttrModelList) {
if (fitAttrModel.isAvailable(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate())) { if (fitAttrModel.isAvailable(jwb)) {
populateModel(fitAttrModel); populateModel(fitAttrModel);
break; break;
} }
@ -71,7 +73,6 @@ public class TemplateFitAttrPane extends BaseFitAttrPane {
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) { if (e.getStateChange() == ItemEvent.SELECTED) {
if(isTemplateSingleSet()){ if(isTemplateSingleSet()){
JTemplate jwb = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jwb != null) { if (jwb != null) {
FitProvider wbTpl = (FitProvider) jwb.getTarget(); FitProvider wbTpl = (FitProvider) jwb.getTarget();
ReportFitAttr fitAttr = wbTpl.getReportFitAttr(); ReportFitAttr fitAttr = wbTpl.getReportFitAttr();

Loading…
Cancel
Save