From 9f4560e4a9b96f5b784a8e1eb136a546787c198b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 3 Nov 2020 10:06:22 +0800 Subject: [PATCH] =?UTF-8?q?CHART-16560=20=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E5=8D=8A=E5=BE=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../series/VanChartAbstractPlotSeriesPane.java | 18 +++++++++++++++++- .../chart/gauge/VanChartGaugeSeriesPane.java | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) 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 667c73d3ac..0a6a7a39e2 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 @@ -9,11 +9,16 @@ import com.fr.chart.base.AttrFillStyle; import com.fr.chart.base.GradientStyle; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.style.series.AbstractPlotSeriesPane; +import com.fr.design.widget.FRWidgetFactory; import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; @@ -39,9 +44,11 @@ import com.fr.van.chart.pie.RadiusCardLayoutPane; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.BorderLayout; +import java.awt.Component; /** * 图表样式-系列抽象界面 @@ -183,7 +190,16 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP //半径界面 protected JPanel createRadiusPane(String title) { radiusPane = initRadiusPane(); - radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(title, radiusPane); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f, TableLayout4VanChartHelper.EDIT_AREA_WIDTH}; + double[] rowSize = {p}; + UILabel label = FRWidgetFactory.createLineWrapLabel(title); + label.setVerticalAlignment(SwingConstants.TOP); + Component[][] components = new Component[][]{ + new Component[]{label, radiusPane}, + }; + radiusPaneWithTitle = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, TableLayout4VanChartHelper.COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE); return ((VanChartPlot) plot).isInCustom() ? null : radiusPaneWithTitle; } 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 ed237d4c35..ab0019f741 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 @@ -68,7 +68,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double[] columnSize = {f}; - double[] rowSize = {p,p,p,p,p,p,p}; + double[] rowSize = {p,p,p,p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ new Component[]{createGaugeLayoutPane()}, new Component[]{createGaugeStylePane(rowSize, new double[]{f,e})},