From 0a530fdd684101bf0054bb7e99f0ba64abba90aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Fri, 17 Apr 2020 17:14:07 +0800 Subject: [PATCH] =?UTF-8?q?CHART-13559=20=E5=A4=A7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8B=E5=8A=A8=E7=94=BB=E7=89=B9=E6=95=88=E5=92=8C=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E7=9A=84label=E4=B9=9F=E8=A6=81=E5=8F=98=E7=81=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/VanChartInteractivePane.java | 18 ++++++++++++++++-- .../designer/style/VanChartPlotLegendPane.java | 9 ++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java index f25cbe992..f402418d7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java @@ -14,6 +14,7 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.plugin.chart.attr.axis.VanChartAxis; @@ -60,6 +61,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { private UIComboBox largeDataMode; private UISpinner largeModeThresholdNumber; + protected UILabel chartAnimationLabel; protected UIButtonGroup isChartAnimation; //坐标轴翻转属性 @@ -371,7 +373,17 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { protected JPanel createAnimationPane() { isChartAnimation = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation_Effects"), isChartAnimation); + chartAnimationLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Animation_Effects")); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; + double[] rowSize = {p,p}; + Component[][] components = new Component[][]{ + new Component[]{null,null}, + new Component[]{chartAnimationLabel,isChartAnimation} + }; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation"), panel); } @@ -499,7 +511,9 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { private void populateChartAnimate(Chart chart, Plot plot) { if (plot.isSupportAnimate()) { isChartAnimation.setSelectedIndex(chart.isJSDraw() ? 0 : 1); - isChartAnimation.setEnabled(!largeModel(plot)); + boolean largeModel = largeModel(plot); + isChartAnimation.setEnabled(!largeModel); + chartAnimationLabel.setEnabled(!largeModel); } } 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 4ab88f616..7e597bd5d 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 @@ -70,6 +70,7 @@ public class VanChartPlotLegendPane extends BasicPane { //private LimitPane limitPane; //高亮显示的按钮 + private UILabel highlightLabel; private UIButtonGroup highlightButton; private JPanel highlightPane; @@ -318,7 +319,7 @@ public class VanChartPlotLegendPane extends BasicPane { private JPanel createHighlightPane(){ highlightButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_On"), Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false}); - + highlightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Highlight")); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; @@ -326,7 +327,7 @@ public class VanChartPlotLegendPane extends BasicPane { double[] rowSize = {p,p}; Component[][] components = new Component[][]{ new Component[]{null,null}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Highlight")),highlightButton} + new Component[]{highlightLabel, highlightButton} }; return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); } @@ -429,7 +430,9 @@ public class VanChartPlotLegendPane extends BasicPane { //limitPane.populateBean(legend.getLimitAttribute()); if(highlightButton != null){ highlightButton.setSelectedItem(legend.isHighlight()); - highlightButton.setEnabled(!PlotFactory.largeDataModel(plot)); + boolean largeDataModel = PlotFactory.largeDataModel(plot); + highlightButton.setEnabled(!largeDataModel); + highlightLabel.setEnabled(!largeDataModel); } }