From e40b2d1c1fa5a9aefdeb301e8fcc0d546127451e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 11 Aug 2021 11:03:44 +0800 Subject: [PATCH] =?UTF-8?q?CHART-20211=20=E9=9D=A2=E6=9D=BF=E9=97=B4?= =?UTF-8?q?=E8=B7=9D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/style/series/UIColorPickerPane.java | 10 +++++++--- .../fr/van/chart/gauge/VanChartGaugeSeriesPane.java | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) 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 fb2d1c31ad..6529efce05 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 @@ -277,11 +277,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { */ public Dimension getPreferredSize() { if (designTypeButtonGroup.getSelectedIndex() == 0) { - return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + getBoundY()); + return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + getPreferredMarginY()); } else { - int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + getBoundY(); + int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + getPreferredMarginY(); return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, - extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT + getBoundY()); + extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT + getPreferredMarginY()); } } @@ -662,6 +662,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { return UPCONTROLPANE_WIDTH; } + protected int getPreferredMarginY() { + return MARGIN_TOP; + } + /** *刷新颜色选取器 * @param colorArray 颜色值 diff --git a/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java index afdd2d4ca9..d3f997295b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java @@ -132,6 +132,10 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane { return 10; } + protected int getPreferredMarginY() { + return 10; + } + protected double getDescriptionWidth() { double descriptionWidth = super.getDescriptionWidth(); if (valueFillStylePane == null) {