Browse Source

Pull request #6598: REPORT-61422【主题切换】cpt主题编辑的预览图增加辅助文本的图示

Merge in DESIGN/design from ~KERRY/design_10.0:release/11.0 to release/11.0

* commit 'e832cc91c0793dd7c35b31b3e8108a6b32d02b3b':
  REPORT-61422【主题切换】cpt主题编辑的预览图增加辅助文本的图示
bugfix/11.0
kerry 3 years ago
parent
commit
ea14be6eb0
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java
  2. 4
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/AbstractECPreviewPane.java
  3. 24
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECPreviewPane.java
  4. 13
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java

2
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java

@ -41,7 +41,7 @@ public class ReportThemePreviewPane extends TemplateThemePreviewPane<ReportTheme
public ReportThemePreviewPane() { public ReportThemePreviewPane() {
setLayout(FRGUIPaneFactory.createBorderLayout()); setLayout(FRGUIPaneFactory.createBorderLayout());
chartPreviewPane = new ChartPreviewPane(); chartPreviewPane = new ChartPreviewPane();
chartPreviewPane.setPreferredSize(new Dimension(615, 237)); chartPreviewPane.setPreferredSize(new Dimension(615, 207));
chartPreviewPane.populate(initColumnChart()); chartPreviewPane.populate(initColumnChart());
chartPreviewPane.setCallbackEvent(this); chartPreviewPane.setCallbackEvent(this);
reportPreviewPane = new ECReportPreviewPane(); reportPreviewPane = new ECReportPreviewPane();

4
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/AbstractECPreviewPane.java

@ -30,6 +30,10 @@ public abstract class AbstractECPreviewPane extends UINoOpaquePanel implements T
return getCellStyle(cellStyleList.getUse4SmallTitle()); return getCellStyle(cellStyleList.getUse4SmallTitle());
} }
protected Style getAssistMsgStyle(ThemedCellStyleList cellStyleList) {
return getCellStyle(cellStyleList.getUse4SupportInfo());
}
private Style getCellStyle(ThemedCellStyle themedCellStyle) { private Style getCellStyle(ThemedCellStyle themedCellStyle) {
if (themedCellStyle == null) { if (themedCellStyle == null) {
return Style.DEFAULT_STYLE; return Style.DEFAULT_STYLE;

24
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECPreviewPane.java

@ -24,15 +24,18 @@ public class ECPreviewPane extends AbstractECPreviewPane {
private final List<AbstractPreviewCell> headerCellList = new ArrayList<>(); private final List<AbstractPreviewCell> headerCellList = new ArrayList<>();
private final List<AbstractPreviewCell> contentCellList = new ArrayList<>(); private final List<AbstractPreviewCell> contentCellList = new ArrayList<>();
private final List<AbstractPreviewCell> highLightCellList = new ArrayList<>(); private final List<AbstractPreviewCell> highLightCellList = new ArrayList<>();
private final List<AbstractPreviewCell> assistCellList = new ArrayList<>();
private static final int COL_COUNT = 5; private static final int COL_COUNT = 5;
private static final int CONTENT_ROW_COUNT = 2; private static final int CONTENT_ROW_COUNT = 2;
public ECPreviewPane() { public ECPreviewPane() {
this.setPreferredSize(new Dimension(517, 147)); this.setPreferredSize(new Dimension(517, 158));
this.setBorder(BorderFactory.createEmptyBorder(0, 1, 2, 1)); this.setBorder(BorderFactory.createEmptyBorder(0, 1, 2, 1));
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel titlePane = new UINoOpaquePanel(new GridLayout()); 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++) { for (int i = 0; i < COL_COUNT; i++) {
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header"));
cell.setPreferredSize(new Dimension(103, 36)); cell.setPreferredSize(new Dimension(103, 36));
@ -40,22 +43,29 @@ public class ECPreviewPane extends AbstractECPreviewPane {
headerCellList.add(cell); headerCellList.add(cell);
} }
JPanel contentPane = new UINoOpaquePanel(new GridLayout(2, 5, 0, 0)); 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++) { for (int i = 0; i < COL_COUNT * CONTENT_ROW_COUNT; i++) {
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Main_Text")); 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); contentPane.add(cell);
contentCellList.add(cell); contentCellList.add(cell);
} }
JPanel endPane = new UINoOpaquePanel(new GridLayout()); JPanel endPane = new UINoOpaquePanel(new GridLayout());
this.add(endPane, BorderLayout.SOUTH); extCenterPane.add(endPane, BorderLayout.SOUTH);
for (int i = 0; i < COL_COUNT; i++) { for (int i = 0; i < COL_COUNT; i++) {
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Highlight_Text")); 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); endPane.add(cell);
highLightCellList.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 @Override
@ -64,6 +74,8 @@ public class ECPreviewPane extends AbstractECPreviewPane {
refresh(headerCellList, getReportHeaderStyle(cellStyleConfig)); refresh(headerCellList, getReportHeaderStyle(cellStyleConfig));
refresh(contentCellList, getMainContentStyle(cellStyleConfig)); refresh(contentCellList, getMainContentStyle(cellStyleConfig));
refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); refresh(highLightCellList, getHighLightStyle(cellStyleConfig));
refresh(highLightCellList, getHighLightStyle(cellStyleConfig));
refresh(assistCellList, getAssistMsgStyle(cellStyleConfig));
} }

13
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<AbstractPreviewCell> titleCellList = new ArrayList<>(); private final List<AbstractPreviewCell> titleCellList = new ArrayList<>();
private final List<AbstractPreviewCell> contentCellList = new ArrayList<>(); private final List<AbstractPreviewCell> contentCellList = new ArrayList<>();
private final List<AbstractPreviewCell> highLightCellList = new ArrayList<>(); private final List<AbstractPreviewCell> highLightCellList = new ArrayList<>();
private final List<AbstractPreviewCell> assistCellList = new ArrayList<>();
private static final int CONTENT_ROW_COUNT = 3; private static final int CONTENT_ROW_COUNT = 3;
private static final int COL_COUNT = 5; private static final int COL_COUNT = 5;
@ -54,8 +55,10 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel northPane = createNorthPane(); JPanel northPane = createNorthPane();
JPanel centerPane = createCenterPane(); JPanel centerPane = createCenterPane();
JPanel southPane = createSouthPane();
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
this.add(southPane, BorderLayout.SOUTH);
} }
private JPanel createNorthPane() { private JPanel createNorthPane() {
@ -126,6 +129,15 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
return centerPane; 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 @Override
public void refresh(TemplateTheme theme) { public void refresh(TemplateTheme theme) {
ThemedCellStyleList cellStyleConfig = theme.getCellStyleList(); ThemedCellStyleList cellStyleConfig = theme.getCellStyleList();
@ -134,6 +146,7 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
refresh(contentCellList, getMainContentStyle(cellStyleConfig)); refresh(contentCellList, getMainContentStyle(cellStyleConfig));
refresh(titleCellList, getSmallTitleStyle(cellStyleConfig)); refresh(titleCellList, getSmallTitleStyle(cellStyleConfig));
refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); refresh(highLightCellList, getHighLightStyle(cellStyleConfig));
refresh(assistCellList, getAssistMsgStyle(cellStyleConfig));
} }
} }
} }

Loading…
Cancel
Save