From 84b3103890b1620c393be4657a8ca9720301f800 Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 3 Dec 2021 14:40:32 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60161=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=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B9=9D=E7=82=B9=E5=9B=BE=E7=9A=84=E7=BA=BF=E5=9C=A8=E8=BE=B9?= =?UTF-8?q?=E7=95=8C=E4=B8=8A=E5=90=8E=EF=BC=8C=E5=85=B6=E4=BB=96=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=9B=9E=E6=9D=A5=E5=8F=91=E7=8E=B0=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=88=90=E9=BB=98=E8=AE=A4=E4=BA=95=E5=AD=97=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 点九图边界线值为0也是有效值 【改动思路 --- .../com/fr/design/gui/xpane/BorderLineAndImagePane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 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 1db2db2e2..47ea7fb0d 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 @@ -298,15 +298,16 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { Background borderImage = style.getBorderImage(); if (borderImage instanceof ImageBackground) { // 图片类型边框 - Image image = ((ImageBackground) borderImage).getImage(); - int[] ninePoint = ((ImageBackground) borderImage).getNinePoint(); + ImageBackground imageBackground = (ImageBackground) borderImage; + Image image = imageBackground.getImage(); if (image != null) { this.borderLineCombo.selectBorderImage(); this.imagePreviewPane.setImageWithSuffix(((ImageBackground) borderImage).getImageWithSuffix()); this.tweakNinePointButton.setEnabled(true); this.borderImageOpacityPane.populateBean(style.getBorderImageOpacity()); - if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] > 0 && ninePoint[1] > 0 && ninePoint[2] > 0 && ninePoint[3] > 0) { + int[] ninePoint = ((ImageBackground) borderImage).getNinePoint(); + if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] >= 0 && ninePoint[1] >= 0 && ninePoint[2] >= 0 && ninePoint[3] >= 0) { this.ninePoint = Arrays.copyOf(ninePoint, 4); } else { this.ninePoint = new int[4];