|
|
|
@ -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,15 +89,7 @@ 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 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); |
|
|
|
|
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER; |
|
|
|
|
if (c > 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (c < CONTENT_ROW_COUNT - 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
headerCell.setBorderSourceFlag(flag); |
|
|
|
|
PreviewCell headerCell = createPreviewCellHeader(c); |
|
|
|
|
headerCellList.add(headerCell); |
|
|
|
|
eastSouthPane.add(headerCell); |
|
|
|
|
} |
|
|
|
@ -109,6 +97,37 @@ public class WidgetThemeECReportPreviewPane extends UINoOpaquePanel implements T
|
|
|
|
|
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) { |
|
|
|
|
flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (c < CONTENT_ROW_COUNT - 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
headerCell.setBorderSourceFlag(flag); |
|
|
|
|
return headerCell; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createCenterPane() { |
|
|
|
|
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); |
|
|
|
|
JPanel westPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); |
|
|
|
@ -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,41 +146,82 @@ 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")); |
|
|
|
|
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 = createPreviewCellHighlight(r); |
|
|
|
|
highLightCellList.add(cell); |
|
|
|
|
} else { |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
if (r < COL_COUNT - 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.BOTTOM_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (c > 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (c < CONTENT_ROW_COUNT - 2) { |
|
|
|
|
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
cell.setBorderSourceFlag(flag); |
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
if (r != COL_COUNT - 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.BOTTOM_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
cell.setBorderSourceFlag(flag); |
|
|
|
|
return cell; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return centerPane; |
|
|
|
|
/** |
|
|
|
|
* 创建正文预览单元格 |
|
|
|
|
* |
|
|
|
|
* @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; |
|
|
|
|
} |
|
|
|
|
if (r < COL_COUNT - 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.BOTTOM_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (c > 0) { |
|
|
|
|
flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
if (c < 1) { |
|
|
|
|
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER; |
|
|
|
|
} |
|
|
|
|
cell.setBorderSourceFlag(flag); |
|
|
|
|
return 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; |
|
|
|
|
} |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
return gridPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createSouthPane(){ |
|
|
|
|