From c203418493a93177dcff78f7214fe5a044d8521f Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 23 Jul 2021 15:06:29 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-55715=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8-=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=92=8C=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=87=8C=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E5=9C=B0=E6=96=B9=E7=9A=84=E9=A2=9C=E8=89=B2=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=E4=B8=8D=E5=A4=AA=E4=B8=80=E6=A0=B7=EF=BC=8C?= =?UTF-8?q?=E7=9C=8B=E8=B5=B7=E6=9D=A5=E6=9C=89=E7=82=B9=E5=A5=87=E6=80=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 修改边框颜色选择器类型,与单元格中的边框颜色选择器保持一致 【改动思路】 同上 --- .../design/gui/xpane/BorderLineAndImagePane.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java index 324213bc3..b25d66e30 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java @@ -26,6 +26,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.backgroundpane.ImagePreviewPane; import com.fr.design.style.background.image.ImageFileChooser; +import com.fr.design.style.color.NewColorSelectBox; import com.fr.env.utils.DesignerInteractionHistory; import com.fr.form.ui.LayoutBorderStyle; import com.fr.general.Background; @@ -85,7 +86,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { private UIObserverListener uiObserverListener; private BorderLineAndImageComboBox borderLineCombo; - private UIColorButton borderColorPane; + private NewColorSelectBox borderColorPane; private ImagePreviewPane imagePreviewPane; private UIButton chooseImageButton; private UIButton tweakNinePointHelpButton; @@ -104,10 +105,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { private void initComponents() { borderLineCombo = new BorderLineAndImageComboBox(); - borderColorPane = new UIColorButton(null) {{ - setUI(createButtonUI(this)); - set4ToolbarButton(); - }}; + borderColorPane = new NewColorSelectBox(145); imagePreviewPane = new ImagePreviewPane() {{ setImageStyle(Style.DEFAULT_STYLE); }}; @@ -228,7 +226,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { getComponent(2).setVisible(borderLineCombo.isSelectedBorderImage()); if (!borderLineCombo.isSelectedBorderLine()) { - borderColorPane.setColor(Color.BLACK); + borderColorPane.setSelectObject(Color.BLACK); } if (!borderLineCombo.isSelectedBorderImage()) { imagePreviewPane.setImageWithSuffix(null); @@ -294,7 +292,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { Color borderColor = style.getColor(); this.borderLineCombo.setSelectedLineStyle(borderLine); - this.borderColorPane.setColor(borderColor); + this.borderColorPane.setSelectObject(borderColor); Background borderImage = style.getBorderImage(); if (borderImage instanceof ImageBackground) { @@ -332,13 +330,13 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { } this.borderLineCombo.setSelectedLineStyle(style.getBorder()); - this.borderColorPane.setColor(style.getColor()); + this.borderColorPane.setSelectObject(style.getColor()); } public void updateBean(LayoutBorderStyle style) { style.setBorder(this.borderLineCombo.getSelectedLineStyle()); - style.setColor(this.borderColorPane.getColor()); + style.setColor(this.borderColorPane.getSelectObject()); style.setBorderImage(null); if (this.borderLineCombo.isSelectedBorderImage()) {