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 c2eefd3fa..d70463419 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 @@ -219,6 +219,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { } if (!borderLineCombo.isSelectedBorderImage()) { imagePreviewPane.setImageWithSuffix(null); + tweakNinePointButton.setEnabled(false); } fireStateChanged(); @@ -244,6 +245,9 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { ninePointLeft = ninePointRight = (image != null ? image.getWidth(null) / 3 : -1); ninePointTop = ninePointBottom = (image != null ? image.getHeight(null) / 3 : -1); borderImageOpacityPane.populateBean(1.0); + if (image != null) { + tweakNinePointButton.setEnabled(true); + } fireStateChanged(); } @@ -285,6 +289,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { 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) { ninePointLeft = ninePoint[0];