From 8804789738b514c02ce8afaf6aaaee3bf9cda878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 6 Sep 2021 17:38:56 +0800 Subject: [PATCH] =?UTF-8?q?CHART-20498=20=E4=B8=BB=E9=A2=98=E9=85=8D?= =?UTF-8?q?=E8=89=B2=E6=8E=A7=E4=BB=B6=E9=80=89=E4=B8=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/style/color/ColorControlWindow.java | 13 +++++++++++-- .../chart/gui/style/series/UIColorPickerPane.java | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java b/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java index 7fccbfde23..b84173f1db 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java @@ -62,19 +62,28 @@ public abstract class ColorControlWindow extends JPopupMenu { } protected void initSelectionPopupPane(boolean isSupportTransparent) { - selectionPopupPane = new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor()); + selectionPopupPane = createColorSelectionPopupPane(isSupportTransparent); this.add(selectionPopupPane, BorderLayout.CENTER); } + protected ColorSelectionPopupPane createColorSelectionPopupPane(boolean isSupportTransparent) { + return new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor()); + } + protected boolean supportThemeColor(){ return true; } - class ColorSelectionPopupPane extends NewColorSelectPane { + protected class ColorSelectionPopupPane extends NewColorSelectPane { private static final long serialVersionUID = 7822856562329146354L; public ColorSelectionPopupPane(boolean isSupportTransparent, boolean isSupportThemeColor) { + this(isSupportTransparent, isSupportThemeColor, null); + } + + public ColorSelectionPopupPane(boolean isSupportTransparent, boolean isSupportThemeColor, Color color) { super(isSupportTransparent, isSupportThemeColor); + this.setColor(color); this.addChangeListener(new ChangeListener() { @Override diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index 6529efce05..736ae5b3f7 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java @@ -370,6 +370,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { ColorRecButton.this.repaint(); } + @Override + protected ColorSelectionPopupPane createColorSelectionPopupPane(boolean isSupportTransparent) { + return new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor(), ColorRecButton.this.color); + } + }; }