From dbf0cba2f6542b9ebfaa15ffaed028ddfa4788df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 20 Jan 2021 13:36:27 +0800 Subject: [PATCH] =?UTF-8?q?CHART-17958=20=20=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E5=8F=96=E8=89=B2=E5=99=A8=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/style/color/ColorAdjustPane.java | 4 ++++ .../java/com/fr/design/style/color/ColorSelectPane.java | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java b/designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java index 909501857..fcdc594b5 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java @@ -206,6 +206,10 @@ public class ColorAdjustPane extends JPanel implements UIObserver { public void setVisible(boolean b) { super.setVisible(b); } + + protected boolean selectRealTime() { + return false; + } }; colorPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java index c82eac0c0..68c1b2b99 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java @@ -115,12 +115,16 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7 // 最近使用 - UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, this, true, true); + UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, this, true, selectRealTime()); usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8)); row1Pane.add(usedColorPane.getPane()); return row1Pane; } + protected boolean selectRealTime() { + return true; + } + protected Color[] getColorArray() { return ColorFactory.MenuColors; }