Browse Source

REPORT-65365 【主题边框】多次切换单元格样式后切换自定义,边框线有问题

【问题原因】
根据数据模型填充面板时,需要先重置面板清理掉旧的数据

【改动思路】
同上
new-design
Starryi 3 years ago
parent
commit
9c5a1e72f5
  1. 13
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

13
designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

@ -4,7 +4,6 @@ package com.fr.design.gui.style;
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. * Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/ */
import com.fr.base.BaseUtils;
import com.fr.base.CellBorderStyle; import com.fr.base.CellBorderStyle;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
@ -17,8 +16,8 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.style.color.NewColorSelectBox;
import com.fr.general.IOUtils;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.general.IOUtils;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
@ -206,6 +205,8 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
} }
public void populateLineStyleAndColor(CellBorderStyle cellBorderStyle, boolean onlyInspectTop) { public void populateLineStyleAndColor(CellBorderStyle cellBorderStyle, boolean onlyInspectTop) {
resetLineStyleAndColorSetting();
if (cellBorderStyle.getTopStyle() != Constants.LINE_NONE) { if (cellBorderStyle.getTopStyle() != Constants.LINE_NONE) {
this.currentLineCombo.setSelectedLineStyle(cellBorderStyle.getTopStyle()); this.currentLineCombo.setSelectedLineStyle(cellBorderStyle.getTopStyle());
this.currentLineColorPane.setSelectObject(cellBorderStyle.getTopColor()); this.currentLineColorPane.setSelectObject(cellBorderStyle.getTopColor());
@ -225,9 +226,6 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
} else if (cellBorderStyle.getHorizontalStyle() != Constants.LINE_NONE) { } else if (cellBorderStyle.getHorizontalStyle() != Constants.LINE_NONE) {
this.currentLineCombo.setSelectedLineStyle(cellBorderStyle.getHorizontalStyle()); this.currentLineCombo.setSelectedLineStyle(cellBorderStyle.getHorizontalStyle());
this.currentLineColorPane.setSelectObject(cellBorderStyle.getHorizontalColor()); this.currentLineColorPane.setSelectObject(cellBorderStyle.getHorizontalColor());
} else {
this.currentLineCombo.setSelectedLineStyle(Constants.LINE_NONE);
this.currentLineColorPane.setSelectObject(Color.BLACK);
} }
} }
@ -236,6 +234,11 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
} }
} }
private void resetLineStyleAndColorSetting() {
this.currentLineCombo.setSelectedLineStyle(Constants.LINE_NONE);
this.currentLineColorPane.setSelectObject(null);
}
@Override @Override
public Style update(Style style) { public Style update(Style style) {

Loading…
Cancel
Save