Browse Source

单元测试

research/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.DynamicUnitList;
import com.fr.form.ui.NameBackground;
import com.fr.base.Parameter;
import com.fr.base.ScreenResolution;
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.elementcase.TemplateElementCase;
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.stable.ArrayUtils;
import com.fr.stable.AssistUtils;
@ -135,9 +138,21 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public JWorkBook() {
super(new WorkBook(new WorkSheet()), DEFAULT_WB_FILE_PREFIX);
initPredefinedInfo();
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) {
super(new WorkBookAdapter(workBookX), DEFAULT_WBX_FILE_PREFIX);
populateReportParameterAttr();
@ -153,9 +168,6 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
populateReportParameterAttr();
}
public void resetPreferenceStyle(){
}
@Override
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;
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.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.predefined.ui.PredefinedStyleSettingPane;
@ -66,7 +67,7 @@ public class ReportPredefinedBackgroundPane extends PredefinedStyleSettingPane<R
@Override
public void populateBean(ReportSettingsProvider reportSettings) {
this.setPopulating(true);
NameBackground nameBackground = reportSettings.getNameBackground();
PredefinedNameStyleProvider nameBackground = reportSettings.getNameBackground();
super.populate(nameBackground);
this.backgroundPane.populateBean(reportSettings.getBackground());
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground());

Loading…
Cancel
Save