|
|
@ -1,14 +1,13 @@ |
|
|
|
package com.fr.design.report; |
|
|
|
package com.fr.design.report; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
|
|
|
|
import com.fr.design.beans.BasicStorePane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.fun.ExportAttrTabProvider; |
|
|
|
import com.fr.design.fun.ExportAttrTabProvider; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.io.attr.ReportExportAttr; |
|
|
|
import com.fr.io.attr.ReportExportAttr; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
@ -18,7 +17,7 @@ public class ReportExportAttrPane extends BasicPane { |
|
|
|
private ExcelExportPane excelExportPane; |
|
|
|
private ExcelExportPane excelExportPane; |
|
|
|
private PDFExportPane pdfExportPane; |
|
|
|
private PDFExportPane pdfExportPane; |
|
|
|
private WordExportPane wordExportPane; |
|
|
|
private WordExportPane wordExportPane; |
|
|
|
private List<AbstractExportPane> paneList; |
|
|
|
private List<BasicStorePane<?>> paneList; |
|
|
|
|
|
|
|
|
|
|
|
public ReportExportAttrPane() { |
|
|
|
public ReportExportAttrPane() { |
|
|
|
UITabbedPane uiTabbedPane = new UITabbedPane(); |
|
|
|
UITabbedPane uiTabbedPane = new UITabbedPane(); |
|
|
@ -33,8 +32,9 @@ public class ReportExportAttrPane extends BasicPane { |
|
|
|
Set<ExportAttrTabProvider> providers = ExtraDesignClassManager.getInstance().getArray(ExportAttrTabProvider.XML_TAG); |
|
|
|
Set<ExportAttrTabProvider> providers = ExtraDesignClassManager.getInstance().getArray(ExportAttrTabProvider.XML_TAG); |
|
|
|
paneList = new ArrayList<>(); |
|
|
|
paneList = new ArrayList<>(); |
|
|
|
for (ExportAttrTabProvider provider : providers) { |
|
|
|
for (ExportAttrTabProvider provider : providers) { |
|
|
|
uiTabbedPane.addTab(provider.title(), provider.toSwingComponent()); |
|
|
|
BasicStorePane<?> storePane = provider.toServiceComponent(); |
|
|
|
paneList.add(provider.toExportPane()); |
|
|
|
uiTabbedPane.addTab(storePane.getTitle(), storePane); |
|
|
|
|
|
|
|
paneList.add(storePane); |
|
|
|
} |
|
|
|
} |
|
|
|
this.add(uiTabbedPane); |
|
|
|
this.add(uiTabbedPane); |
|
|
|
} |
|
|
|
} |
|
|
@ -61,8 +61,8 @@ public class ReportExportAttrPane extends BasicPane { |
|
|
|
this.wordExportPane.populate(reportExportAttr.getWordExportAttr()); |
|
|
|
this.wordExportPane.populate(reportExportAttr.getWordExportAttr()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (AbstractExportPane exportpane : paneList) { |
|
|
|
for (BasicStorePane exportpane : paneList) { |
|
|
|
exportpane.populate(reportExportAttr); |
|
|
|
exportpane.populateBean(reportExportAttr); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -81,8 +81,8 @@ public class ReportExportAttrPane extends BasicPane { |
|
|
|
reportExportAttr.setWordExportAttr(this.wordExportPane.update()); |
|
|
|
reportExportAttr.setWordExportAttr(this.wordExportPane.update()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (AbstractExportPane exportPane : paneList) { |
|
|
|
for (BasicStorePane exportPane : paneList) { |
|
|
|
exportPane.update(reportExportAttr); |
|
|
|
exportPane.updateBean(reportExportAttr); |
|
|
|
} |
|
|
|
} |
|
|
|
return reportExportAttr; |
|
|
|
return reportExportAttr; |
|
|
|
} |
|
|
|
} |
|
|
|