|
|
|
@ -3,6 +3,7 @@ package com.fr.design.mainframe.theme.preview.ecpreview;
|
|
|
|
|
import com.fr.base.theme.ReportTheme; |
|
|
|
|
import com.fr.base.theme.TemplateTheme; |
|
|
|
|
import com.fr.base.theme.settings.ThemedCellStyleList; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.mainframe.theme.preview.ThemePreviewed; |
|
|
|
|
import com.fr.design.mainframe.theme.preview.UINoOpaquePanel; |
|
|
|
@ -21,6 +22,7 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreviewed<ReportTheme> { |
|
|
|
|
private List<AbstractPreviewCell> headerTitleCellList = new ArrayList<>(); |
|
|
|
|
private List<AbstractPreviewCell> headerCellList = new ArrayList<>(); |
|
|
|
|
private List<AbstractPreviewCell> titleCellList = new ArrayList<>(); |
|
|
|
|
private List<AbstractPreviewCell> contentCellList = new ArrayList<>(); |
|
|
|
@ -56,20 +58,26 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
|
|
|
|
|
|
|
|
|
|
private JPanel createNorthPane() { |
|
|
|
|
JPanel northPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); |
|
|
|
|
CornerPreviewCell cornerCell = new CornerPreviewCell(new String[]{"产品", "数据", "统计维度"}, new Point2D[]{new Point(132, 75), new Point(189, 53)}); |
|
|
|
|
cornerCell.setPreferredSize(new Dimension(189, 75)); |
|
|
|
|
AbstractPreviewCell bigTitleCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Big_Title")); |
|
|
|
|
bigTitleCell.setPreferredSize(new Dimension(615, 46)); |
|
|
|
|
headerTitleCellList.add(bigTitleCell); |
|
|
|
|
northPane.add(bigTitleCell, BorderLayout.NORTH); |
|
|
|
|
CornerPreviewCell cornerCell = new CornerPreviewCell(new String[]{Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Product"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Data"), Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Statistical_Dimension")}, |
|
|
|
|
new Point2D[]{new Point(159, 71), new Point(226, 49)}); |
|
|
|
|
cornerCell.setPreferredSize(new Dimension(226, 71)); |
|
|
|
|
headerCellList.add(cornerCell); |
|
|
|
|
northPane.add(cornerCell, BorderLayout.WEST); |
|
|
|
|
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); |
|
|
|
|
northPane.add(centerPane, BorderLayout.CENTER); |
|
|
|
|
PreviewCell cell = new PreviewCell("按地区统计"); |
|
|
|
|
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Statistical_By_Area")); |
|
|
|
|
titleCellList.add(cell); |
|
|
|
|
cell.setPreferredSize(new Dimension(308, 38)); |
|
|
|
|
centerPane.add(cell, BorderLayout.NORTH); |
|
|
|
|
JPanel eastSouthPane = new UINoOpaquePanel(new GridLayout()); |
|
|
|
|
PreviewCell cell1 = new PreviewCell("华东"); |
|
|
|
|
PreviewCell cell2 = new PreviewCell("华南"); |
|
|
|
|
PreviewCell cell3 = new PreviewCell("小计"); |
|
|
|
|
PreviewCell cell1 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_East_China")); |
|
|
|
|
PreviewCell cell2 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_South_China")); |
|
|
|
|
PreviewCell cell3 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Subtotal")); |
|
|
|
|
headerCellList.add(cell1); |
|
|
|
|
headerCellList.add(cell2); |
|
|
|
|
headerCellList.add(cell3); |
|
|
|
@ -84,24 +92,24 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
|
|
|
|
|
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); |
|
|
|
|
JPanel westPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); |
|
|
|
|
centerPane.add(westPane, BorderLayout.WEST); |
|
|
|
|
PreviewCell cell1 = new PreviewCell("饮料"); |
|
|
|
|
PreviewCell cell1 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Drink")); |
|
|
|
|
titleCellList.add(cell1); |
|
|
|
|
cell1.setPreferredSize(new Dimension(94, 183)); |
|
|
|
|
cell1.setPreferredSize(new Dimension(112, 153)); |
|
|
|
|
westPane.add(cell1, BorderLayout.WEST); |
|
|
|
|
JPanel gridPane = new UINoOpaquePanel(new GridLayout(6, 1)); |
|
|
|
|
for (int i = 0; i < 6; i++) { |
|
|
|
|
PreviewCell cell = new PreviewCell("苹果汁"); |
|
|
|
|
cell.setPreferredSize(new Dimension(95, 31)); |
|
|
|
|
JPanel gridPane = new UINoOpaquePanel(new GridLayout(5, 1)); |
|
|
|
|
for (int i = 0; i < 5; i++) { |
|
|
|
|
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Apple_Juice")); |
|
|
|
|
cell.setPreferredSize(new Dimension(114, 31)); |
|
|
|
|
headerCellList.add(cell); |
|
|
|
|
gridPane.add(cell); |
|
|
|
|
} |
|
|
|
|
westPane.add(gridPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
JPanel innerCenterPane = new UINoOpaquePanel(new GridLayout(6, 3)); |
|
|
|
|
JPanel innerCenterPane = new UINoOpaquePanel(new GridLayout(5, 3)); |
|
|
|
|
centerPane.add(innerCenterPane, BorderLayout.CENTER); |
|
|
|
|
for (int i = 0; i < 18; i++) { |
|
|
|
|
for (int i = 0; i < 15; i++) { |
|
|
|
|
PreviewCell cell = new PreviewCell("35600"); |
|
|
|
|
cell.setPreferredSize(new Dimension(102, 31)); |
|
|
|
|
cell.setPreferredSize(new Dimension(123, 31)); |
|
|
|
|
if ((i + 1) % 3 == 0) { |
|
|
|
|
highLightCellList.add(cell); |
|
|
|
|
} else { |
|
|
|
@ -117,6 +125,7 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
|
|
|
|
|
@Override |
|
|
|
|
public void refresh(TemplateTheme theme) { |
|
|
|
|
ThemedCellStyleList cellStyleConfig = theme.getCellStyleList(); |
|
|
|
|
refresh(headerTitleCellList, getReportBigTitleStyle(cellStyleConfig)); |
|
|
|
|
refresh(headerCellList, getReportHeaderStyle(cellStyleConfig)); |
|
|
|
|
refresh(contentCellList, getMainContentStyle(cellStyleConfig)); |
|
|
|
|
refresh(titleCellList, getSmallTitleStyle(cellStyleConfig)); |
|
|
|
|