From 09d04fcb4abe901db54ba37bbfb19ae45fd98fbe Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 17 Feb 2020 17:42:51 +0800 Subject: [PATCH] =?UTF-8?q?CHART-12733=20=E6=A0=87=E7=AD=BE=E7=9A=84?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B0=83=E6=95=B4=20=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../label/VanChartPlotLabelDetailPane.java | 48 ++++++++++++------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index 48c45eb46c..521962fa3e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -15,7 +15,6 @@ import com.fr.design.style.color.ColorSelectBox; import com.fr.plugin.chart.attr.plot.VanChartLabelPositionPlot; import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; -import com.fr.plugin.chart.base.OverlapHandleType; import com.fr.stable.Constants; import com.fr.van.chart.designer.PlotFactory; import com.fr.van.chart.designer.TableLayout4VanChartHelper; @@ -42,6 +41,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane { protected UIButtonGroup position; + //标签的自动调整 恢复用注释。下面1行删除。 + protected UIButtonGroup autoAdjust; private UIButtonGroup allowOverlap; private UIComboBox overlapHandleType; @@ -124,6 +125,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } position = new UIButtonGroup(names, values); + autoAdjust = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false}); allowOverlap = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_YES"), Toolkit.i18nText("Fine-Design_Chart_NO")}, new Boolean[]{true, false}); @@ -143,7 +145,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane { panel.add(tractionLinePane, BorderLayout.SOUTH); initPositionListener(); } else if(PlotFactory.plotAutoAdjustLabelPosition(plot)){ - panel.add(createOverlapLabelPane(), BorderLayout.SOUTH); + //标签的自动调整 恢复用注释。下面1行删除。 + panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust"), autoAdjust), BorderLayout.SOUTH); + //标签的自动调整 恢复用注释。取消注释。 + //panel.add(createOverlapLabelPane(), BorderLayout.SOUTH); } return panel; } @@ -244,9 +249,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } private void checkOverlap() { - if (overlapHandleType != null && allowOverlap != null) { - overlapHandleType.setVisible(!allowOverlap.getSelectedItem()); - } + //标签的自动调整 恢复用注释。取消注释。 +// if (overlapHandleType != null && allowOverlap != null) { +// overlapHandleType.setVisible(!allowOverlap.getSelectedItem()); +// } } private void checkStyleUse() { @@ -270,12 +276,17 @@ public class VanChartPlotLabelDetailPane extends BasicPane { if(tractionLine != null){ tractionLine.setSelected(detail.isShowGuidLine()); } - if (allowOverlap != null) { - allowOverlap.setSelectedItem(detail.isAllowOverlap()); - } - if (overlapHandleType != null) { - overlapHandleType.setSelectedIndex(detail.getOverlapHandleType() == OverlapHandleType.HIDE ? 0 : 1); + //标签的自动调整 恢复用注释。下面3行删除。 + if (autoAdjust != null) { + autoAdjust.setSelectedIndex(detail.isAutoAdjust() == true ? 0 : 1); } + //标签的自动调整 恢复用注释。取消注释。 +// if (allowOverlap != null) { +// allowOverlap.setSelectedItem(detail.isAllowOverlap()); +// } +// if (overlapHandleType != null) { +// overlapHandleType.setSelectedIndex(detail.getOverlapHandleType() == OverlapHandleType.HIDE ? 0 : 1); +// } style.setSelectedIndex(detail.isCustom() ? 1 : 0); textFontPane.populate(detail.getTextAttr()); @@ -297,13 +308,16 @@ public class VanChartPlotLabelDetailPane extends BasicPane { position.setSelectedItem(detail.getPosition()); } - if (allowOverlap != null) { - detail.setAllowOverlap(allowOverlap.getSelectedItem()); - } - - if (overlapHandleType != null) { - detail.setOverlapHandleType(overlapHandleType.getSelectedIndex() == 0 ? OverlapHandleType.HIDE : OverlapHandleType.ADJUST); - } + //标签的自动调整 恢复用注释。下面1行删除。 + detail.setAutoAdjust(autoAdjust != null && autoAdjust.getSelectedItem()); + //标签的自动调整 恢复用注释。取消注释。 +// if (allowOverlap != null) { +// detail.setAllowOverlap(allowOverlap.getSelectedItem()); +// } +// +// if (overlapHandleType != null) { +// detail.setOverlapHandleType(overlapHandleType.getSelectedIndex() == 0 ? OverlapHandleType.HIDE : OverlapHandleType.ADJUST); +// } if(tractionLine != null){ detail.setShowGuidLine(tractionLine.isSelected() && detail.getPosition() == Constants.OUTSIDE);