Browse Source

fix:兼容大屏组件的cpt设置

final/10.0
eason 3 years ago
parent
commit
5034de4cb7
  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();
ReportFitAttr fitAttr = wbTpl.getReportFitAttr();
TemplateFitAttrPane templateFitAttrPane = new TemplateFitAttrPane();
TemplateFitAttrPane templateFitAttrPane = new TemplateFitAttrPane(jwb);
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;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.report.fit.BaseFitAttrPane;
@ -15,7 +14,10 @@ import java.awt.event.ItemListener;
public class TemplateFitAttrPane extends BaseFitAttrPane {
public TemplateFitAttrPane() {
private JTemplate jwb;
public TemplateFitAttrPane(JTemplate jwb) {
this.jwb = jwb;
initComponents();
}
@ -23,7 +25,7 @@ public class TemplateFitAttrPane extends BaseFitAttrPane {
protected void initComponents() {
super.initComponents();
for (FitAttrModel fitAttrModel : fitAttrModelList) {
if (fitAttrModel.isAvailable(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate())) {
if (fitAttrModel.isAvailable(jwb)) {
populateModel(fitAttrModel);
break;
}
@ -71,7 +73,6 @@ public class TemplateFitAttrPane extends BaseFitAttrPane {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
if(isTemplateSingleSet()){
JTemplate jwb = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jwb != null) {
FitProvider wbTpl = (FitProvider) jwb.getTarget();
ReportFitAttr fitAttr = wbTpl.getReportFitAttr();

Loading…
Cancel
Save