Browse Source

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

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

* commit 'a5d1cd190b9a02347efa5c8a131df7f06455e14e':
  REPORT-64125 【主题边框】新设计器远程旧服务器,设置的边框预览图上看不到
feature/x
starryi 3 years ago
parent
commit
6a5e5f889d
  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; 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.base.theme.settings.ThemedCellStyle;
import com.fr.design.cell.CellRectangleStylePreviewPane; import com.fr.design.cell.CellRectangleStylePreviewPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
@ -87,12 +89,35 @@ public class CellStyleEditPane extends MultiTabPane<ThemedCellStyle> {
@Override @Override
public ThemedCellStyle updateBean() { public ThemedCellStyle updateBean() {
AbstractBasicStylePane basicStylePane = (AbstractBasicStylePane) paneList.get(tabPane.getSelectedIndex()); 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) { 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; 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 @Override
public boolean accept(Object ob) { public boolean accept(Object ob) {

Loading…
Cancel
Save