From d325410286cbe8b3de5ae33fc7eb129105afbacc Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 3 Mar 2020 23:01:36 +0800 Subject: [PATCH] =?UTF-8?q?CHART-9435=20=E8=AF=95=E7=AE=A1=E5=9E=8B?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E8=AE=BE=E8=AE=A1=E5=99=A8=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../series/VanChartAbstractPlotSeriesPane.java | 7 +++++++ .../chart/gauge/VanChartGaugeSeriesPane.java | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java index 47b205f85..cea370897 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java @@ -166,6 +166,13 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP return ((VanChartPlot) plot).isInCustom() ? null : radiusPaneWithTitle; } + //沿用半径界面,使用不同的title和radius + protected JPanel createRadiusPane(String title) { + radiusPane = initRadiusPane(); + radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(title, radiusPane); + return ((VanChartPlot) plot).isInCustom() ? null : radiusPaneWithTitle; + } + //大数据模式 恢复用注释。删除下面4个方法 createLargeDataModelPane checkLarge createLargeDataModelPane createLargeDataModelGroup。 protected JPanel createLargeDataModelPane() { largeDataModelGroup = createLargeDataModelGroup(); 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 79509aee2..6fc02b40e 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 @@ -4,6 +4,7 @@ import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; @@ -46,6 +47,8 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { private UIColorPickerPane colorPickerPane; + private UISpinner thermometerWidth; + public VanChartGaugeSeriesPane(ChartStylePane parent, Plot plot) { super(parent, plot); } @@ -133,7 +136,8 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { new Component[]{null, null}, getNeedleColor(), getSlotBackgroundColor(), - new Component[]{createRadiusPane(), null} + new Component[]{createRadiusPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Length_Set")), null}, + getThermometerWidth() }; default: return new Component[][]{ @@ -172,6 +176,11 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Slot_Background")),slotBackgroundColor}; } + private Component[] getThermometerWidth() { + thermometerWidth = new UISpinner(0, Double.MAX_VALUE, 0.1, 10); + return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Thermometer_Width")),thermometerWidth}; + } + private void initRotate() { rotate = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AntiClockWise"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_ClockWise")}); } @@ -218,6 +227,9 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { if(innerPaneBackgroundColor != null){ innerPaneBackgroundColor.setSelectObject(detailStyle.getInnerPaneBackgroundColor()); } + if(thermometerWidth != null){ + thermometerWidth.setValue(detailStyle.getThermometerWidth()); + } colorPickerPane.populateBean(detailStyle.getHotAreaColor()); } @@ -256,6 +268,9 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { if(innerPaneBackgroundColor != null){ detailStyle.setInnerPaneBackgroundColor(innerPaneBackgroundColor.getSelectObject()); } + if(thermometerWidth != null){ + detailStyle.setThermometerWidth(thermometerWidth.getValue()); + } colorPickerPane.updateBean(detailStyle.getHotAreaColor()); }