Browse Source

Pull request #7270: REPORT-63808 & REPORT-64642

Merge in DESIGN/design from ~STARRYI/design:feature/x to feature/x

* commit 'd116628a5678a2a3276e1441dd1482ccdccc2fab':
  REPORT-64642 【主题边框】左侧预览图中单元格设置逻辑调整
  REPORT-63808 【主题优化】格式单独拿出来以后,发现数据列的弹窗配置中没有格式项
feature/x
starryi 3 years ago
parent
commit
c6244df10e
  1. 38
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/AbstractECPreviewPane.java
  2. 47
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECPreviewPane.java
  3. 88
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java
  4. 10
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/cell/AbstractPreviewCell.java
  5. 11
      designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.preview.ecpreview; package com.fr.design.mainframe.theme.preview.ecpreview;
import com.fr.base.CellBorderStyle;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.settings.ThemedCellStyle; import com.fr.base.theme.settings.ThemedCellStyle;
@ -11,29 +12,6 @@ import com.fr.design.mainframe.theme.preview.ecpreview.cell.AbstractPreviewCell;
import java.util.List; import java.util.List;
public abstract class AbstractECPreviewPane extends UINoOpaquePanel implements ThemePreviewed<TemplateTheme> { public abstract class AbstractECPreviewPane extends UINoOpaquePanel implements ThemePreviewed<TemplateTheme> {
protected Style getReportBigTitleStyle(ThemedCellStyleList cellStyleList) {
return getCellStyle(cellStyleList.getUse4BigTitle());
}
protected Style getReportHeaderStyle(ThemedCellStyleList cellStyleList) {
return getCellStyle(cellStyleList.getUse4Header());
}
protected Style getMainContentStyle(ThemedCellStyleList cellStyleList) {
return getCellStyle(cellStyleList.getUse4MainText());
}
protected Style getHighLightStyle(ThemedCellStyleList cellStyleList) {
return getCellStyle(cellStyleList.getUse4HighlightText());
}
protected Style getSmallTitleStyle(ThemedCellStyleList cellStyleList) {
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;
@ -42,9 +20,19 @@ public abstract class AbstractECPreviewPane extends UINoOpaquePanel implements T
return style != null ? style : Style.DEFAULT_STYLE; return style != null ? style : Style.DEFAULT_STYLE;
} }
protected void refresh(List<AbstractPreviewCell> list, Style style) { private CellBorderStyle getCellBorderStyle(ThemedCellStyle themedCellStyle) {
if (themedCellStyle == null) {
return null;
}
return themedCellStyle.getCellBorderStyle();
}
protected void refresh(List<AbstractPreviewCell> list, ThemedCellStyle themedCellStyle) {
Style style = getCellStyle(themedCellStyle);
CellBorderStyle borderStyle = getCellBorderStyle(themedCellStyle);
for (AbstractPreviewCell cell : list) { for (AbstractPreviewCell cell : list) {
cell.refresh(style); cell.refresh(style, borderStyle);
} }
} }

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.preview.ecpreview; package com.fr.design.mainframe.theme.preview.ecpreview;
import com.fr.base.CellBorderSourceFlag;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.settings.ThemedCellStyleList; import com.fr.base.theme.settings.ThemedCellStyleList;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -36,8 +37,16 @@ public class ECPreviewPane extends AbstractECPreviewPane {
JPanel extCenterPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); JPanel extCenterPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane();
this.add(extCenterPane, BorderLayout.CENTER); this.add(extCenterPane, BorderLayout.CENTER);
extCenterPane.add(titlePane, BorderLayout.NORTH); extCenterPane.add(titlePane, BorderLayout.NORTH);
for (int i = 0; i < COL_COUNT; i++) { for (int c = 0; c < COL_COUNT; c++) {
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); PreviewCell cell = 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 < COL_COUNT - 1) {
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER;
}
cell.setBorderSourceFlag(flag);
cell.setPreferredSize(new Dimension(103, 36)); cell.setPreferredSize(new Dimension(103, 36));
titlePane.add(cell); titlePane.add(cell);
headerCellList.add(cell); headerCellList.add(cell);
@ -46,6 +55,22 @@ public class ECPreviewPane extends AbstractECPreviewPane {
extCenterPane.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"));
int r = i / COL_COUNT;
int c = i % COL_COUNT;
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER;
if (r > 0) {
flag |= CellBorderSourceFlag.TOP_BORDER_SOURCE_INNER;
}
if (r < CONTENT_ROW_COUNT - 1) {
flag |= CellBorderSourceFlag.BOTTOM_BORDER_SOURCE_INNER;
}
if (c > 0) {
flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER;
}
if (c < COL_COUNT - 1) {
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER;
}
cell.setBorderSourceFlag(flag);
cell.setPreferredSize(new Dimension(103, 30)); cell.setPreferredSize(new Dimension(103, 30));
contentPane.add(cell); contentPane.add(cell);
contentCellList.add(cell); contentCellList.add(cell);
@ -53,8 +78,16 @@ public class ECPreviewPane extends AbstractECPreviewPane {
JPanel endPane = new UINoOpaquePanel(new GridLayout()); JPanel endPane = new UINoOpaquePanel(new GridLayout());
extCenterPane.add(endPane, BorderLayout.SOUTH); extCenterPane.add(endPane, BorderLayout.SOUTH);
for (int i = 0; i < COL_COUNT; i++) { for (int c = 0; c < COL_COUNT; c++) {
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"));
int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER;
if (c > 0) {
flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER;
}
if (c < COL_COUNT - 1) {
flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER;
}
cell.setBorderSourceFlag(flag);
cell.setPreferredSize(new Dimension(103, 30)); cell.setPreferredSize(new Dimension(103, 30));
endPane.add(cell); endPane.add(cell);
highLightCellList.add(cell); highLightCellList.add(cell);
@ -62,6 +95,7 @@ public class ECPreviewPane extends AbstractECPreviewPane {
JPanel extSouthPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); JPanel extSouthPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane();
PreviewCell assistCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Assist_Text")); PreviewCell assistCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Assist_Text"));
assistCell.setBorderSourceFlag(CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER);
assistCell.setPreferredSize(new Dimension(123, 30)); assistCell.setPreferredSize(new Dimension(123, 30));
assistCellList.add(assistCell); assistCellList.add(assistCell);
extSouthPane.add(assistCell); extSouthPane.add(assistCell);
@ -71,11 +105,10 @@ public class ECPreviewPane extends AbstractECPreviewPane {
@Override @Override
public void refresh(TemplateTheme theme) { public void refresh(TemplateTheme theme) {
ThemedCellStyleList cellStyleConfig = theme.getCellStyleList(); ThemedCellStyleList cellStyleConfig = theme.getCellStyleList();
refresh(headerCellList, getReportHeaderStyle(cellStyleConfig)); refresh(headerCellList, cellStyleConfig.getUse4Header());
refresh(contentCellList, getMainContentStyle(cellStyleConfig)); refresh(contentCellList, cellStyleConfig.getUse4MainText());
refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); refresh(highLightCellList, cellStyleConfig.getUse4HighlightText());
refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); refresh(assistCellList, cellStyleConfig.getUse4SupportInfo());
refresh(assistCellList, getAssistMsgStyle(cellStyleConfig));
} }

88
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.preview.ecpreview; package com.fr.design.mainframe.theme.preview.ecpreview;
import com.fr.base.CellBorderSourceFlag;
import com.fr.base.theme.ReportTheme; import com.fr.base.theme.ReportTheme;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.settings.ThemedCellStyleList; import com.fr.base.theme.settings.ThemedCellStyleList;
@ -22,12 +23,12 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreviewed<ReportTheme> { public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreviewed<ReportTheme> {
private final List<AbstractPreviewCell> headerTitleCellList = new ArrayList<>(); private final List<AbstractPreviewCell> headerTitleCellList = new ArrayList<>(); // 大标题样式单元格
private final List<AbstractPreviewCell> headerCellList = new ArrayList<>(); private final List<AbstractPreviewCell> headerCellList = new ArrayList<>(); // 表头样式单元格
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 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;
@ -64,31 +65,38 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
private JPanel createNorthPane() { private JPanel createNorthPane() {
JPanel northPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane();
AbstractPreviewCell bigTitleCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Cell_Style_Big_Title")); AbstractPreviewCell bigTitleCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Cell_Style_Big_Title"));
bigTitleCell.setBorderSourceFlag(CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER);
bigTitleCell.setPreferredSize(new Dimension(615, 46)); bigTitleCell.setPreferredSize(new Dimension(615, 46));
headerTitleCellList.add(bigTitleCell); headerTitleCellList.add(bigTitleCell);
northPane.add(bigTitleCell, BorderLayout.NORTH); northPane.add(bigTitleCell, BorderLayout.NORTH);
CornerPreviewCell cornerCell = new CornerPreviewCell(new String[]{Toolkit.i18nText("Fine-Design_Basic_Column_Name"), 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")}, 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)}); new Point2D[]{new Point(159, 71), new Point(225, 49)});
cornerCell.setBorderSourceFlag(CellBorderSourceFlag.INVALID_BORDER_SOURCE);
cornerCell.setPreferredSize(new Dimension(225, 71)); cornerCell.setPreferredSize(new Dimension(225, 71));
titleCellList.add(cornerCell); titleCellList.add(cornerCell);
northPane.add(cornerCell, BorderLayout.WEST); northPane.add(cornerCell, BorderLayout.WEST);
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane();
northPane.add(centerPane, BorderLayout.CENTER); northPane.add(centerPane, BorderLayout.CENTER);
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Small_Title")); PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Small_Title"));
cell.setBorderSourceFlag(CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER);
titleCellList.add(cell); titleCellList.add(cell);
cell.setPreferredSize(new Dimension(308, 38)); cell.setPreferredSize(new Dimension(308, 38));
centerPane.add(cell, BorderLayout.NORTH); centerPane.add(cell, BorderLayout.NORTH);
JPanel eastSouthPane = new UINoOpaquePanel(new GridLayout()); JPanel eastSouthPane = new UINoOpaquePanel(new GridLayout());
PreviewCell cell1 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); for (int c = 0; c < CONTENT_ROW_COUNT; c++) {
PreviewCell cell2 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); PreviewCell headerCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header"));
PreviewCell cell3 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); int flag = CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER;
headerCellList.add(cell1); if (c > 0) {
headerCellList.add(cell2); flag |= CellBorderSourceFlag.LEFT_BORDER_SOURCE_INNER;
headerCellList.add(cell3); }
eastSouthPane.add(cell1); if (c < CONTENT_ROW_COUNT - 1) {
eastSouthPane.add(cell2); flag |= CellBorderSourceFlag.RIGHT_BORDER_SOURCE_INNER;
eastSouthPane.add(cell3); }
headerCell.setBorderSourceFlag(flag);
headerCellList.add(headerCell);
eastSouthPane.add(headerCell);
}
centerPane.add(eastSouthPane, BorderLayout.CENTER); centerPane.add(eastSouthPane, BorderLayout.CENTER);
return northPane; return northPane;
} }
@ -102,8 +110,16 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
cell1.setPreferredSize(new Dimension(112, 153)); cell1.setPreferredSize(new Dimension(112, 153));
westPane.add(cell1, BorderLayout.WEST); westPane.add(cell1, BorderLayout.WEST);
JPanel gridPane = new UINoOpaquePanel(new GridLayout(5, 1)); JPanel gridPane = new UINoOpaquePanel(new GridLayout(5, 1));
for (int i = 0; i < COL_COUNT; i++) { for (int r = 0; r < COL_COUNT; r++) {
PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Header")); 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)); cell.setPreferredSize(new Dimension(113, 31));
headerCellList.add(cell); headerCellList.add(cell);
gridPane.add(cell); gridPane.add(cell);
@ -114,11 +130,36 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
centerPane.add(innerCenterPane, BorderLayout.CENTER); centerPane.add(innerCenterPane, 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 ; PreviewCell cell ;
if ((i + 1) % CONTENT_ROW_COUNT == 0) { 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 = 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);
highLightCellList.add(cell); highLightCellList.add(cell);
} else { } else {
cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Main_Text")); 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);
contentCellList.add(cell); contentCellList.add(cell);
} }
cell.setPreferredSize(new Dimension(123, 31)); cell.setPreferredSize(new Dimension(123, 31));
@ -132,6 +173,7 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
private JPanel createSouthPane(){ private JPanel createSouthPane(){
JPanel southPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); JPanel southPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane();
PreviewCell assistCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Assist_Text")); PreviewCell assistCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Assist_Text"));
assistCell.setBorderSourceFlag(CellBorderSourceFlag.ALL_BORDER_SOURCE_OUTER);
assistCell.setPreferredSize(new Dimension(123, 30)); assistCell.setPreferredSize(new Dimension(123, 30));
assistCellList.add(assistCell); assistCellList.add(assistCell);
southPane.add(assistCell, BorderLayout.CENTER); southPane.add(assistCell, BorderLayout.CENTER);
@ -141,12 +183,12 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview
@Override @Override
public void refresh(TemplateTheme theme) { public void refresh(TemplateTheme theme) {
ThemedCellStyleList cellStyleConfig = theme.getCellStyleList(); ThemedCellStyleList cellStyleConfig = theme.getCellStyleList();
refresh(headerTitleCellList, getReportBigTitleStyle(cellStyleConfig)); refresh(headerTitleCellList, cellStyleConfig.getUse4BigTitle());
refresh(headerCellList, getReportHeaderStyle(cellStyleConfig)); refresh(headerCellList, cellStyleConfig.getUse4Header());
refresh(contentCellList, getMainContentStyle(cellStyleConfig)); refresh(contentCellList, cellStyleConfig.getUse4MainText());
refresh(titleCellList, getSmallTitleStyle(cellStyleConfig)); refresh(titleCellList, cellStyleConfig.getUse4SmallTitle());
refresh(highLightCellList, getHighLightStyle(cellStyleConfig)); refresh(highLightCellList, cellStyleConfig.getUse4HighlightText());
refresh(assistCellList, getAssistMsgStyle(cellStyleConfig)); refresh(assistCellList, cellStyleConfig.getUse4SupportInfo());
} }
} }
} }

10
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/cell/AbstractPreviewCell.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe.theme.preview.ecpreview.cell; package com.fr.design.mainframe.theme.preview.ecpreview.cell;
import com.fr.base.CellBorderSourceFlag;
import com.fr.base.CellBorderStyle;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -12,10 +14,14 @@ public abstract class AbstractPreviewCell extends JComponent {
private static final double BORDER_INSET = 0.5D; private static final double BORDER_INSET = 0.5D;
protected Style style = Style.DEFAULT_STYLE; protected Style style = Style.DEFAULT_STYLE;
private static final int NO_SCALE_RESOLUTION = 100; private static final int NO_SCALE_RESOLUTION = 100;
private int borderSourceFlag = CellBorderSourceFlag.INVALID_BORDER_SOURCE;
public void setBorderSourceFlag(int borderSourceFlag) {
this.borderSourceFlag = borderSourceFlag;
}
public void refresh(Style style) { public void refresh(Style style, CellBorderStyle borderStyle) {
this.style = style; this.style = CellBorderSourceFlag.deriveBorderedStyle(style, borderStyle, borderSourceFlag);
} }
public void paint(Graphics g) { public void paint(Graphics g) {

11
designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java

@ -3,6 +3,7 @@ package com.fr.design.dscolumn;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.data.util.SortOrder; import com.fr.data.util.SortOrder;
import com.fr.design.border.UITitledBorder; import com.fr.design.border.UITitledBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
@ -33,6 +34,7 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.Arrays;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.BOTTOM; import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.BOTTOM;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.SPECIFY; import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.SPECIFY;
@ -513,10 +515,11 @@ public class DSColumnAdvancedPane extends BasicPane {
public static class FormatAttrPane extends TextFormatPane { public static class FormatAttrPane extends TextFormatPane {
protected void initLayout() { protected void initLayout() {
JPanel settingPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(0, 4, 0); JComponent[][] components = new JComponent[][] { {typeComboBox, textField, roundingBox} };
settingPane.add(typeComboBox); double[] rowSize = new double[] { TableLayout.FILL };
settingPane.add(textField); double[] columnSize = {TableLayout.PREFERRED, 200, TableLayout.PREFERRED};
settingPane.add(roundingBox);
JPanel settingPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 4, 0);
addComponents(4, new JComponent[]{settingPane, previewLabel}); addComponents(4, new JComponent[]{settingPane, previewLabel});
} }

Loading…
Cancel
Save