diff --git a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java index 0dcfe4c217..9f948e7a18 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java @@ -217,18 +217,36 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse int lineStyle = currentLineCombo.getSelectedLineStyle(); Color lineColor = currentLineColorPane.getSelectObject(); CellBorderStyle cellBorderStyle = new CellBorderStyle(); - cellBorderStyle.setTopColor(lineColor); + if (topToggleButton.isSelected()) { + cellBorderStyle.setTopColor(lineColor); + } cellBorderStyle.setTopStyle(topToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - cellBorderStyle.setBottomColor(lineColor); + + if (bottomToggleButton.isSelected()) { + cellBorderStyle.setBottomColor(lineColor); + } cellBorderStyle.setBottomStyle(bottomToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - cellBorderStyle.setLeftColor(lineColor); + + if (leftToggleButton.isSelected()) { + cellBorderStyle.setLeftColor(lineColor); + } cellBorderStyle.setLeftStyle(leftToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - cellBorderStyle.setRightColor(lineColor); + + if (rightToggleButton.isSelected()) { + cellBorderStyle.setRightColor(lineColor); + } cellBorderStyle.setRightStyle(rightToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - cellBorderStyle.setVerticalColor(lineColor); + + if (verticalToggleButton.isSelected()) { + cellBorderStyle.setVerticalColor(lineColor); + } cellBorderStyle.setVerticalStyle(verticalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - cellBorderStyle.setHorizontalColor(lineColor); + + if (horizontalToggleButton.isSelected()) { + cellBorderStyle.setHorizontalColor(lineColor); + } cellBorderStyle.setHorizontalStyle(horizontalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); + if (leftToggleButton.isSelected() && bottomToggleButton.isSelected() && rightToggleButton.isSelected() && topToggleButton.isSelected()) { outerToggleButton.setSelected(true); } else { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java index 3706778609..4bfd9fa46c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.cell.settingpane; import com.fr.base.Style; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.cell.settingpane.style.StylePane; +import com.fr.design.style.BorderUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.report.cell.DefaultTemplateCellElement; @@ -67,6 +68,7 @@ public class CellStylePane extends AbstractCellAttrPane { @Override public void updateBeans() { + Object[] selectionCellBorderObjects = BorderUtils.createCellBorderObject(elementCasePane); if (stylePane.getSelectedIndex() == 1) { Style s = stylePane.updateBean(); TemplateElementCase elementCase = elementCasePane.getEditingElementCase(); @@ -110,7 +112,8 @@ public class CellStylePane extends AbstractCellAttrPane { } } } - stylePane.updateBorder();// border必须特别处理 + // border必须特别处理 + stylePane.updateBorder(selectionCellBorderObjects); } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java index 2d72772399..268dbebe6a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java @@ -136,8 +136,8 @@ public class CustomStylePane extends MultiTabPane