Browse Source

Merge pull request #637 in DESIGN/design from ~XIAOXIA/design:feature/10.0 to feature/10.0

* commit 'bb1bad75740901727228deb0cf3371561cad4d39':
  REPORT-13067 npe 无法拖报表块
  REPORT-13067 npe 无法拖报表块
  格式化
  REPORT-13034 FR模板挂载到BI,自适应异常 REPORT-12578 全局配置保存问题
research/10.0
xiaoxia 6 years ago
parent
commit
09041bbf11
  1. 27
      designer-base/src/main/java/com/fr/design/report/fit/menupane/BrowserFitAttrPane.java
  2. 25
      designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateBrowserFitAttrPane.java
  3. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java

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

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

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

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

6
designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java

@ -114,7 +114,11 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
public CRPropertyDescriptor[] getExtraTableEditor(){ public CRPropertyDescriptor[] getExtraTableEditor(){
CRPropertyDescriptor[] extraTableEditor = resolveCompatible(); CRPropertyDescriptor[] extraTableEditor = resolveCompatible();
return ArrayUtils.addAll(extraTableEditor, new CRPropertyDescriptor[] {getReportFitEditor()}); CRPropertyDescriptor reportFitEditor = getReportFitEditor();
if (reportFitEditor == null) {
return extraTableEditor;
}
return ArrayUtils.add(extraTableEditor, reportFitEditor);
} }
private CRPropertyDescriptor getReportFitEditor() { private CRPropertyDescriptor getReportFitEditor() {

Loading…
Cancel
Save