diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java index 2f10e968c4..78490c4fcd 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java @@ -28,6 +28,8 @@ import com.fr.plugin.chart.vanchart.VanChart; import com.fr.stable.StableUtils; import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -163,6 +165,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} @@ -171,6 +179,14 @@ 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")}; @@ -273,6 +289,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { populateAutoRefresh((VanChart)chart); populateHyperlink(plot); + + checkZoomEnabled(); }