From fc7c0f090cf1e38d7b5b2c8a51c273bd62d064b1 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 3 Apr 2020 13:23:20 +0800 Subject: [PATCH] =?UTF-8?q?CHART-12817=20=E5=85=BC=E5=AE=B9=E6=97=A7?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E4=B8=AD=E7=9A=84=E5=8C=BA=E5=9F=9F=E9=99=90?= =?UTF-8?q?=E5=88=B6=E4=B8=8D=E9=99=90=E5=88=B6=E4=B8=BA=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/VanChartPlotLegendPane.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index faa112952..5a9d8ebda 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -59,9 +59,8 @@ public class VanChartPlotLegendPane extends BasicPane { private VanChartFloatPositionPane customFloatPositionPane; //区域显示策略 恢复用注释。下面4行删除。 - private UIButtonGroup limitSize; + private UIButtonGroup customSize; private UISpinner maxProportion; - private UILabel limitSizeTitle; private JPanel maxProportionPane; //区域显示策略 恢复用注释。取消注释。 //private LimitPane limitPane; @@ -286,17 +285,16 @@ public class VanChartPlotLegendPane extends BasicPane { private JPanel createDisplayStrategy() { //区域显示策略 恢复用注释。开始删除。 maxProportion = new UISpinner(0, 100, 1, 30); - limitSize = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Auto"), Toolkit.i18nText("Fine-Design_Chart_Custom")}); - limitSizeTitle = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Max_Proportion")); + customSize = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Auto"), Toolkit.i18nText("Fine-Design_Chart_Custom")}); - JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Area_Size"), limitSize); + JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Area_Size"), customSize); maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Max_Proportion"), maxProportion, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); JPanel panel = new JPanel(new BorderLayout()); panel.add(limitSizePane, BorderLayout.NORTH); panel.add(maxProportionPane, BorderLayout.CENTER); - limitSize.addActionListener(new ActionListener() { + customSize.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { checkMaxProPortionUse(); @@ -349,7 +347,7 @@ public class VanChartPlotLegendPane extends BasicPane { //检查显示策略界面是否可用 protected void checkDisplayStrategyUse() { //区域显示策略 恢复用注释。下面2行删除。 - limitSize.setEnabled(!customFloatPositionButton.isSelected()); + customSize.setEnabled(!customFloatPositionButton.isSelected()); checkMaxProPortionUse(); //区域显示策略 恢复用注释。取消注释。 // GUICoreUtils.setEnabled(limitPane, !customFloatPositionButton.isSelected()); @@ -359,7 +357,7 @@ public class VanChartPlotLegendPane extends BasicPane { //区域显示策略 恢复用注释。删除下面方法。 //检查最大显示占比是否可用 private void checkMaxProPortionUse() { - maxProportionPane.setVisible(limitSize.getSelectedIndex() == 1 && limitSize.isEnabled()); + maxProportionPane.setVisible(customSize.getSelectedIndex() == 1 && customSize.isEnabled()); } protected void checkBoxUse() { @@ -392,7 +390,7 @@ public class VanChartPlotLegendPane extends BasicPane { legend.setFloating(customFloatPositionButton.isSelected()); legend.setLayout(layoutButton.getSelectedItem()); //区域显示策略 恢复用注释。下面2行删除。 - legend.setLimitSize(limitSize.getSelectedIndex() == 1); + legend.setCustomSize(customSize.getSelectedIndex() == 1); legend.setMaxHeight(maxProportion.getValue()); //区域显示策略 恢复用注释。取消注释。 //legend.setLimitAttribute(limitPane.updateBean()); @@ -417,7 +415,7 @@ public class VanChartPlotLegendPane extends BasicPane { customFloatPositionPane.setFloatPosition_y(legend.getFloatPercentY()); layoutButton.setSelectedItem(legend.getLayout()); //区域显示策略 恢复用注释。下面2行删除。 - limitSize.setSelectedIndex(legend.isLimitSize() ? 1 : 0); + customSize.setSelectedIndex(legend.isCustomSize() ? 1 : 0); maxProportion.setValue(legend.getMaxHeight()); //区域显示策略 恢复用注释。取消注释。 //limitPane.populateBean(legend.getLimitAttribute());