Browse Source

单元测试

persist/11.0
kerry 4 years ago
parent
commit
5a8b0ac6a2
  1. 18
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java
  2. 5
      designer-realize/src/main/java/com/fr/design/report/ReportPredefinedBackgroundPane.java

18
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.form.ui.NameBackground;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
@ -93,6 +94,8 @@ import com.fr.report.cell.cellattr.CellImage;
import com.fr.report.cell.painter.CellImagePainter; import com.fr.report.cell.painter.CellImagePainter;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.poly.PolyWorkSheet; import com.fr.report.poly.PolyWorkSheet;
import com.fr.report.report.Report;
import com.fr.report.stable.ReportSettings;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
@ -135,9 +138,21 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public JWorkBook() { public JWorkBook() {
super(new WorkBook(new WorkSheet()), DEFAULT_WB_FILE_PREFIX); super(new WorkBook(new WorkSheet()), DEFAULT_WB_FILE_PREFIX);
initPredefinedInfo();
populateReportParameterAttr(); populateReportParameterAttr();
} }
private void initPredefinedInfo() {
WorkBook workBook = this.getTarget();
for (int i = 0; i < workBook.getReportCount(); i++) {
Report report = workBook.getReport(i);
if (report != null) {
NameBackground initBackground = NameBackground.createPredefinedStyle(StringUtils.EMPTY);
((ReportSettings) report.getReportSettings()).setNameBackground(initBackground);
}
}
}
public JWorkBook(WorkBookX workBookX) { public JWorkBook(WorkBookX workBookX) {
super(new WorkBookAdapter(workBookX), DEFAULT_WBX_FILE_PREFIX); super(new WorkBookAdapter(workBookX), DEFAULT_WBX_FILE_PREFIX);
populateReportParameterAttr(); populateReportParameterAttr();
@ -153,9 +168,6 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
populateReportParameterAttr(); populateReportParameterAttr();
} }
public void resetPreferenceStyle(){
}
@Override @Override
protected void addPane(PropertyItemPaneProvider provider) { protected void addPane(PropertyItemPaneProvider provider) {

5
designer-realize/src/main/java/com/fr/design/report/ReportPredefinedBackgroundPane.java

@ -1,6 +1,7 @@
package com.fr.design.report; package com.fr.design.report;
import com.fr.base.NameBackground; import com.fr.config.predefined.PredefinedNameStyleProvider;
import com.fr.form.ui.NameBackground;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.predefined.ui.PredefinedStyleSettingPane; import com.fr.design.mainframe.predefined.ui.PredefinedStyleSettingPane;
@ -66,7 +67,7 @@ public class ReportPredefinedBackgroundPane extends PredefinedStyleSettingPane<R
@Override @Override
public void populateBean(ReportSettingsProvider reportSettings) { public void populateBean(ReportSettingsProvider reportSettings) {
this.setPopulating(true); this.setPopulating(true);
NameBackground nameBackground = reportSettings.getNameBackground(); PredefinedNameStyleProvider nameBackground = reportSettings.getNameBackground();
super.populate(nameBackground); super.populate(nameBackground);
this.backgroundPane.populateBean(reportSettings.getBackground()); this.backgroundPane.populateBean(reportSettings.getBackground());
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground()); this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground());

Loading…
Cancel
Save