From 977e23dbc5278f317659d57b11933cf62f68b9eb Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 15 Dec 2021 10:36:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-64262=20=E3=80=90=E8=A7=86=E8=A7=89?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=E3=80=91=E4=B8=BB=E9=A2=98=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=9A=84=E8=BE=B9=E6=A1=86=E9=85=8D=E7=BD=AE=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 单元格样式预览区域四周要留有外边距 【改动思路】 同上 --- .../theme/edit/cell/CellStyleEditPane.java | 6 ++++-- .../java/com/fr/design/report/ReportStylePane.java | 13 ++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java index c3ba368a3..0e3f74acb 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java @@ -117,8 +117,10 @@ public class CellStyleEditPane extends MultiTabPane { JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); previewArea = new CellRectangleStylePreviewPane(true); - previewArea.setPreferredSize(new Dimension(223, 60)); - previewPane.setBorder(BorderUtils.createTitleBorder(i18nText("Fine-Design_Basic_Preview"))); + previewArea.setPreferredSize(new Dimension(215, 52)); + previewPane.setBorder(BorderFactory.createCompoundBorder( + BorderUtils.createTitleBorder(i18nText("Fine-Design_Basic_Preview")), + BorderFactory.createEmptyBorder(4, 4, 4, 4))); previewPane.add(previewArea, BorderLayout.CENTER); this.add(previewPane, BorderLayout.NORTH); diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java index 49df4b41f..250861dbe 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java @@ -118,13 +118,12 @@ public class ReportStylePane extends BasicPane { private JPanel createPreviewPane() { JPanel container = FRGUIPaneFactory.createBorderLayout_S_Pane(); - container.setBorder(createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Preview"))); - container.setPreferredSize(new Dimension(container.getPreferredSize().width, 60)); - JPanel content = FRGUIPaneFactory.createBorderLayout_S_Pane(); - content.setBorder(BorderFactory.createEmptyBorder(4, 4, 2, 2)); - previewArea.setPreferredSize(new Dimension(container.getPreferredSize().width, 42)); - content.add(previewArea, BorderLayout.NORTH); - container.add(content, BorderLayout.NORTH); + container.setBorder(BorderFactory.createCompoundBorder( + createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Preview")), + BorderFactory.createEmptyBorder(4, 4, 4, 4) + )); + previewArea.setPreferredSize(new Dimension(container.getPreferredSize().width, 40)); + container.add(previewArea, BorderLayout.CENTER); return container; }