Browse Source

REPORT-13034

FR模板挂载到BI,自适应异常 REPORT-12578 全局配置保存问题
research/10.0
XiaXiang 6 years ago
parent
commit
69dcebe2b2
  1. 18
      designer-base/src/main/java/com/fr/design/report/fit/menupane/BrowserFitAttrPane.java
  2. 18
      designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateBrowserFitAttrPane.java

18
designer-base/src/main/java/com/fr/design/report/fit/menupane/BrowserFitAttrPane.java

@ -1,5 +1,6 @@
package com.fr.design.report.fit.menupane;
import com.fr.config.Configuration;
import com.fr.design.report.fit.FitType;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButton;
@ -12,6 +13,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.log.FineLoggerFactory;
import com.fr.report.fit.ReportFitAttr;
import com.fr.report.fit.ReportFitConfig;
import com.fr.transaction.Configurations;
import com.fr.transaction.Worker;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
@ -220,12 +223,19 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttr> {
return attr;
}
private void updateGlobalConfig(ReportFitAttr attr) {
try {
private void updateGlobalConfig(final ReportFitAttr attr) {
Configurations.update(new Worker() {
@Override
public void run() {
ReportFitConfig manager = ReportFitConfig.getInstance();
manager.setFrmFitAttr(attr);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
@Override
public Class<? extends Configuration>[] targets() {
return new Class[]{ReportFitConfig.class};
}
});
}
}

18
designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateBrowserFitAttrPane.java

@ -1,9 +1,12 @@
package com.fr.design.report.fit.menupane;
import com.fr.config.Configuration;
import com.fr.design.gui.ilable.UILabel;
import com.fr.log.FineLoggerFactory;
import com.fr.report.fit.ReportFitAttr;
import com.fr.report.fit.ReportFitConfig;
import com.fr.transaction.Configurations;
import com.fr.transaction.Worker;
import java.awt.Component;
@ -65,12 +68,19 @@ public class TemplateBrowserFitAttrPane extends BrowserFitAttrPane {
return attr;
}
private void updateGlobalConfig(ReportFitAttr attr) {
try {
private void updateGlobalConfig(final ReportFitAttr attr) {
Configurations.update(new Worker() {
@Override
public void run() {
ReportFitConfig manager = ReportFitConfig.getInstance();
manager.setCptFitAttr(attr);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
@Override
public Class<? extends Configuration>[] targets() {
return new Class[]{ReportFitConfig.class};
}
});
}
}

Loading…
Cancel
Save