From a5d1cd190b9a02347efa5c8a131df7f06455e14e Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 15 Dec 2021 18:39:30 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-64125=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=BE=B9=E6=A1=86=E3=80=91=E6=96=B0=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E6=97=A7=E6=9C=8D=E5=8A=A1=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E8=BE=B9=E6=A1=86=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E5=9B=BE=E4=B8=8A=E7=9C=8B=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 远程服务器不支持主题内边框时,CellBorderStyle应该从Style中 导出,否则会导致预览时使用错误的空的边框的对象 【改动思路】 同上 --- .../theme/edit/cell/CellStyleEditPane.java | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java index 0e3f74acb..172ac3c3f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java @@ -1,5 +1,7 @@ package com.fr.design.mainframe.theme.edit.cell; +import com.fr.base.CellBorderStyle; +import com.fr.base.Style; import com.fr.base.theme.settings.ThemedCellStyle; import com.fr.design.cell.CellRectangleStylePreviewPane; import com.fr.design.constants.UIConstants; @@ -87,12 +89,35 @@ public class CellStyleEditPane extends MultiTabPane { @Override public ThemedCellStyle updateBean() { AbstractBasicStylePane basicStylePane = (AbstractBasicStylePane) paneList.get(tabPane.getSelectedIndex()); - this.cellStyle.setStyle(basicStylePane.update(this.cellStyle.getStyle())); + Style style = basicStylePane.update(this.cellStyle.getStyle()); + CellBorderStyle borderStyle = createDefaultBorderStyleFromStyle(style); + + if (ThemedFeatureController.isCellStyleSupportInnerBorder() && basicStylePane instanceof BorderPane) { - this.cellStyle.setCellBorderStyle(((BorderPane) basicStylePane).update()); + borderStyle = ((BorderPane) basicStylePane).update(); } + + this.cellStyle.setStyle(style); + this.cellStyle.setCellBorderStyle(borderStyle); + return this.cellStyle; } + private CellBorderStyle createDefaultBorderStyleFromStyle(Style style) { + CellBorderStyle cellBorderStyle = new CellBorderStyle(); + cellBorderStyle.setTopStyle(style.getBorderTop()); + cellBorderStyle.setTopColor(style.getBorderTopColor()); + + cellBorderStyle.setBottomStyle(style.getBorderBottom()); + cellBorderStyle.setBottomColor(style.getBorderBottomColor()); + + cellBorderStyle.setLeftStyle(style.getBorderLeft()); + cellBorderStyle.setLeftColor(style.getBorderLeftColor()); + + cellBorderStyle.setRightStyle(style.getBorderRight()); + cellBorderStyle.setRightColor(style.getBorderRightColor()); + + return cellBorderStyle; + } @Override public boolean accept(Object ob) {