From 9b5e4c0a959db0f7f82d816100d3557a0f1fe0bc Mon Sep 17 00:00:00 2001 From: zheng Date: Sat, 30 Jun 2018 11:17:20 +0800 Subject: [PATCH] CHART-2144 910 --- .../other/VanChartInteractivePane.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java b/designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java index 30af94591..d23eea910 100644 --- a/designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java +++ b/designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java @@ -29,6 +29,8 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.BorderFactory; import javax.swing.JPanel; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ActionEvent; @@ -165,6 +167,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { } axisRotation = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); + axisRotation.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + checkZoomEnabled(); + } + }); Component[][] components = new Component[][]{ new Component[]{null,null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation} @@ -173,6 +181,15 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel); } + private void checkZoomEnabled() { + if (zoomWidget != null && axisRotation != null) { + zoomWidget.setSelectedIndex(1); + checkZoomPane(); + zoomWidget.setEnabled(axisRotation.getSelectedIndex() == 1); + } + } + + protected String[] getNameArray() { return new String[]{Inter.getLocText("ChartF-X_Axis"), Inter.getLocText("ChartF-Y_Axis") ,Inter.getLocText("Plugin-ChartF_XYAxis"),Inter.getLocText("Chart-Use_None")}; @@ -275,6 +292,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { populateAutoRefresh((VanChart)chart); populateHyperlink(plot); + + checkZoomEnabled(); }