Browse Source

REPORT-64125 【主题边框】新设计器远程旧服务器,设置的边框预览图上看不到

【问题原因】
远程服务器不支持主题内边框时,CellBorderStyle应该从Style中
导出,否则会导致预览时使用错误的空的边框的对象

【改动思路】
同上
feature/x
Starryi 3 years ago
parent
commit
a5d1cd190b
  1. 29
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java

29
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<ThemedCellStyle> {
@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) {

Loading…
Cancel
Save