diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java index 4ceec636d..2033e7072 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java @@ -41,7 +41,7 @@ public class ReportThemePreviewPane extends TemplateThemePreviewPane headerCellList = new ArrayList<>(); private final List contentCellList = new ArrayList<>(); private final List highLightCellList = new ArrayList<>(); + private final List assistCellList = new ArrayList<>(); private static final int COL_COUNT = 5; private static final int CONTENT_ROW_COUNT = 2; public ECPreviewPane() { - this.setPreferredSize(new Dimension(517, 147)); + this.setPreferredSize(new Dimension(517, 158)); this.setBorder(BorderFactory.createEmptyBorder(0, 1, 2, 1)); this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel titlePane = new UINoOpaquePanel(new GridLayout()); - this.add(titlePane, BorderLayout.NORTH); + JPanel extCenterPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); + this.add(extCenterPane, BorderLayout.CENTER); + extCenterPane.add(titlePane, BorderLayout.NORTH); for (int i = 0; i < COL_COUNT; i++) { PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); cell.setPreferredSize(new Dimension(103, 36)); @@ -40,22 +43,29 @@ public class ECPreviewPane extends AbstractECPreviewPane { headerCellList.add(cell); } JPanel contentPane = new UINoOpaquePanel(new GridLayout(2, 5, 0, 0)); - this.add(contentPane, BorderLayout.CENTER); + extCenterPane.add(contentPane, BorderLayout.CENTER); for (int i = 0; i < COL_COUNT * CONTENT_ROW_COUNT; i++) { PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Main_Text")); - cell.setPreferredSize(new Dimension(103, 33)); + cell.setPreferredSize(new Dimension(103, 30)); contentPane.add(cell); contentCellList.add(cell); } JPanel endPane = new UINoOpaquePanel(new GridLayout()); - this.add(endPane, BorderLayout.SOUTH); + extCenterPane.add(endPane, BorderLayout.SOUTH); for (int i = 0; i < COL_COUNT; i++) { PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Highlight_Text")); - cell.setPreferredSize(new Dimension(103, 33)); + cell.setPreferredSize(new Dimension(103, 30)); endPane.add(cell); highLightCellList.add(cell); } + + JPanel extSouthPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); + PreviewCell assistCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Assist_Text")); + assistCell.setPreferredSize(new Dimension(123, 30)); + assistCellList.add(assistCell); + extSouthPane.add(assistCell); + this.add(extSouthPane, BorderLayout.SOUTH); } @Override @@ -64,6 +74,8 @@ public class ECPreviewPane extends AbstractECPreviewPane { refresh(headerCellList, getReportHeaderStyle(cellStyleConfig)); refresh(contentCellList, getMainContentStyle(cellStyleConfig)); refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); + refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); + refresh(assistCellList, getAssistMsgStyle(cellStyleConfig)); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java index 885f480b7..432c8b49c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java @@ -27,6 +27,7 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview private final List titleCellList = new ArrayList<>(); private final List contentCellList = new ArrayList<>(); private final List highLightCellList = new ArrayList<>(); + private final List assistCellList = new ArrayList<>(); private static final int CONTENT_ROW_COUNT = 3; private static final int COL_COUNT = 5; @@ -54,8 +55,10 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel northPane = createNorthPane(); JPanel centerPane = createCenterPane(); + JPanel southPane = createSouthPane(); this.add(northPane, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); + this.add(southPane, BorderLayout.SOUTH); } private JPanel createNorthPane() { @@ -126,6 +129,15 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview return centerPane; } + private JPanel createSouthPane(){ + JPanel southPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); + PreviewCell assistCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Assist_Text")); + assistCell.setPreferredSize(new Dimension(123, 30)); + assistCellList.add(assistCell); + southPane.add(assistCell, BorderLayout.CENTER); + return southPane; + } + @Override public void refresh(TemplateTheme theme) { ThemedCellStyleList cellStyleConfig = theme.getCellStyleList(); @@ -134,6 +146,7 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview refresh(contentCellList, getMainContentStyle(cellStyleConfig)); refresh(titleCellList, getSmallTitleStyle(cellStyleConfig)); refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); + refresh(assistCellList, getAssistMsgStyle(cellStyleConfig)); } } }