|
|
|
@ -77,11 +77,7 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
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_Column_Name"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Data"), Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Row_Name")}, |
|
|
|
|
new Point2D[]{new Point(159, 71), new Point(225, 49)}); |
|
|
|
|
cornerCell.setBorderSourceFlag(CellBorderSourceFlag.INVALID_BORDER_SOURCE); |
|
|
|
|
cornerCell.setPreferredSize(new Dimension(225, 71)); |
|
|
|
|
CornerPreviewCell cornerCell = createCornerPreviewCell(); |
|
|
|
|
titleCellList.add(cornerCell); |
|
|
|
|
northPane.add(cornerCell, BorderLayout.WEST); |
|
|
|
|
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); |
|
|
|
@ -93,6 +89,33 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
centerPane.add(cell, BorderLayout.NORTH); |
|
|
|
|
JPanel eastSouthPane = new UINoOpaquePanel(new GridLayout()); |
|
|
|
|
for (int c = 0; c < CONTENT_ROW_COUNT; c++) { |
|
|
|
|
PreviewCell headerCell = createPreviewCellHeader(c); |
|
|
|
|
headerCellList.add(headerCell); |
|
|
|
|
eastSouthPane.add(headerCell); |
|
|
|
|
} |
|
|
|
|
centerPane.add(eastSouthPane, BorderLayout.CENTER); |
|
|
|
|
return northPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 创建CornerPreviewCell |
|
|
|
|
*/ |
|
|
|
|
private CornerPreviewCell createCornerPreviewCell() { |
|
|
|
|
CornerPreviewCell cornerCell = new CornerPreviewCell(new String[]{Toolkit.i18nText("Fine-Design_Basic_Column_Name"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Data"), Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Row_Name")}, |
|
|
|
|
new Point2D[]{new Point(159, 71), new Point(225, 49)}); |
|
|
|
|
cornerCell.setBorderSourceFlag(CellBorderSourceFlag.INVALID_BORDER_SOURCE); |
|
|
|
|
cornerCell.setPreferredSize(new Dimension(225, 71)); |
|
|
|
|
return cornerCell; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 创建预览单元格标题 |
|
|
|
|
* |
|
|
|
|
* @param c 文本行数 |
|
|
|
|
* @return PreviewCell |
|
|
|
|
*/ |
|
|
|
|
private PreviewCell createPreviewCellHeader(int c) { |
|
|
|
|
PreviewCell headerCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); |
|
|
|
|
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER; |
|
|
|
|
if (c > 0) { |
|
|
|
@ -102,11 +125,7 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
headerCell.setBorderSourceFlag(flag); |
|
|
|
|
headerCellList.add(headerCell); |
|
|
|
|
eastSouthPane.add(headerCell); |
|
|
|
|
} |
|
|
|
|
centerPane.add(eastSouthPane, BorderLayout.CENTER); |
|
|
|
|
return northPane; |
|
|
|
|
return headerCell; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createCenterPane() { |
|
|
|
@ -117,21 +136,8 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
titleCellList.add(cell1); |
|
|
|
|
cell1.setPreferredSize(new Dimension(112, 93)); |
|
|
|
|
westPane.add(cell1, BorderLayout.WEST); |
|
|
|
|
JPanel gridPane = new UINoOpaquePanel(new GridLayout(3, 1)); |
|
|
|
|
for (int r = 0; r < 3; r++) { |
|
|
|
|
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); |
|
|
|
|
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER; |
|
|
|
|
if (r > 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.TOP_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (r < COL_COUNT - 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.BOTTOM_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
cell.setBorderSourceFlag(flag); |
|
|
|
|
cell.setPreferredSize(new Dimension(113, 31)); |
|
|
|
|
headerCellList.add(cell); |
|
|
|
|
gridPane.add(cell); |
|
|
|
|
} |
|
|
|
|
JPanel gridPane = createGridPane(); |
|
|
|
|
|
|
|
|
|
westPane.add(gridPane, BorderLayout.CENTER); |
|
|
|
|
JPanel innerCenterPane = new UINoOpaquePanel(new GridLayout(3, 3)); |
|
|
|
|
centerPane.add(innerCenterPane, BorderLayout.CENTER); |
|
|
|
@ -140,7 +146,26 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
int r = i / CONTENT_ROW_COUNT; |
|
|
|
|
int c = i % CONTENT_ROW_COUNT; |
|
|
|
|
if (c == CONTENT_ROW_COUNT - 1) { |
|
|
|
|
cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Highlight_Text")); |
|
|
|
|
cell = createPreviewCellHighlight(r); |
|
|
|
|
highLightCellList.add(cell); |
|
|
|
|
} else { |
|
|
|
|
cell = createPreviewCellMain(r, c); |
|
|
|
|
contentCellList.add(cell); |
|
|
|
|
} |
|
|
|
|
cell.setPreferredSize(new Dimension(123, 31)); |
|
|
|
|
innerCenterPane.add(cell); |
|
|
|
|
} |
|
|
|
|
return centerPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 创建高亮预览单元格 |
|
|
|
|
* |
|
|
|
|
* @param r 计算标志位 |
|
|
|
|
* @return 单元格 |
|
|
|
|
*/ |
|
|
|
|
private PreviewCell createPreviewCellHighlight(int r) { |
|
|
|
|
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Highlight_Text")); |
|
|
|
|
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER; |
|
|
|
|
if (r != 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.TOP_BORDER_SOURCE_INNER; |
|
|
|
@ -149,9 +174,18 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
flag |= CellBorderSourceFlag.BOTTOM_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
cell.setBorderSourceFlag(flag); |
|
|
|
|
highLightCellList.add(cell); |
|
|
|
|
} else { |
|
|
|
|
cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Main_Text")); |
|
|
|
|
return cell; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 创建正文预览单元格 |
|
|
|
|
* |
|
|
|
|
* @param r 计算标志位 |
|
|
|
|
* @param c 计算标志位 |
|
|
|
|
* @return 单元格 |
|
|
|
|
*/ |
|
|
|
|
private PreviewCell createPreviewCellMain(int r, int c) { |
|
|
|
|
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Main_Text")); |
|
|
|
|
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER; |
|
|
|
|
if (r > 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.TOP_BORDER_SOURCE_INNER; |
|
|
|
@ -162,19 +196,32 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
if (c > 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (c < CONTENT_ROW_COUNT - 2) { |
|
|
|
|
if (c < 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
cell.setBorderSourceFlag(flag); |
|
|
|
|
return cell; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
contentCellList.add(cell); |
|
|
|
|
private JPanel createGridPane() { |
|
|
|
|
int rowCount = 3; |
|
|
|
|
int columnCount = 1; |
|
|
|
|
JPanel gridPane = new UINoOpaquePanel(new GridLayout(rowCount, columnCount)); |
|
|
|
|
for (int r = 0; r < rowCount; r++) { |
|
|
|
|
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); |
|
|
|
|
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER; |
|
|
|
|
if (r > 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.TOP_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
cell.setPreferredSize(new Dimension(123, 31)); |
|
|
|
|
innerCenterPane.add(cell); |
|
|
|
|
if (r < COL_COUNT - 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.BOTTOM_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return centerPane; |
|
|
|
|
cell.setBorderSourceFlag(flag); |
|
|
|
|
cell.setPreferredSize(new Dimension(113, 31)); |
|
|
|
|
headerCellList.add(cell); |
|
|
|
|
gridPane.add(cell); |
|
|
|
|
} |
|
|
|
|
return gridPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createSouthPane(){ |
|
|
|
|