From 3fba57522082fb9d75209371325ffe61cf46f0d4 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 30 Aug 2021 17:18:23 +0800 Subject: [PATCH] =?UTF-8?q?CHART-20374=20&&=20REPORT-57978=20=E3=80=90?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2=E3=80=91=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E5=AE=9A=E5=88=B6-=E6=A8=A1=E6=9D=BF=E8=83=8C=E6=99=AF-?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9B=BE=E7=89=87=E9=80=82=E5=BA=94=EF=BC=8C?= =?UTF-8?q?=E5=B7=A6=E4=B8=8A=E8=A7=92=E6=9C=89=E5=A5=87=E6=80=AA=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=9B=E3=80=9011.0=E3=80=91=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98=E6=A0=87=E7=AD=BE=E3=80=81=E8=BD=B4=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=A2=9C=E8=89=B2=E8=87=AA=E5=8A=A8=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E6=88=AA=E6=96=AD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/theme/TemplateThemePreviewPane.java | 9 +++++++++ .../mainframe/theme/preview/FormThemePreviewPane.java | 8 +------- .../mainframe/theme/preview/ReportThemePreviewPane.java | 8 ++------ .../design/style/color/ColorControlWindowWithAuto.java | 4 +++- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java index ef9ad44693..fab425fbe7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java @@ -8,6 +8,7 @@ import com.fr.log.FineLoggerFactory; import javax.swing.JPanel; import java.awt.Color; +import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; @@ -81,4 +82,12 @@ public abstract class TemplateThemePreviewPane extends return null; } + + @Override + public void paintComponent(Graphics g) { + g.clearRect(0, 0, 517, 532); + paintBackground((Graphics2D) g); + } + + protected abstract void paintBackground(Graphics2D g); } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java index 0fc1944922..1445dab357 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java @@ -30,7 +30,6 @@ import java.awt.Graphics2D; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; -import java.awt.Graphics; import java.awt.geom.Rectangle2D; /** @@ -97,12 +96,7 @@ public class FormThemePreviewPane extends TemplateThemePreviewPane { } - @Override - public void paintComponent(Graphics g) { - paintBackground((Graphics2D) g); - } - - private void paintBackground(Graphics2D g2d) { + protected void paintBackground(Graphics2D g2d) { if (background == null) { background = ColorBackground.getInstance(Color.WHITE); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java index f4e23853d1..02d3aa96cf 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java @@ -23,7 +23,6 @@ import com.fr.plugin.chart.vanchart.VanChart; import java.awt.Graphics2D; import java.awt.BorderLayout; import java.awt.Color; -import java.awt.Graphics; import java.awt.geom.Rectangle2D; /** @@ -55,12 +54,9 @@ public class ReportThemePreviewPane extends TemplateThemePreviewPane