Browse Source

CHART-2144 910

master
zheng 6 years ago
parent
commit
9b5e4c0a95
  1. 19
      designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java

19
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.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -165,6 +167,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
} }
axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"), axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"),
Inter.getLocText("Plugin-ChartF_Close")}); Inter.getLocText("Plugin-ChartF_Close")});
axisRotation.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
checkZoomEnabled();
}
});
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation}
@ -173,6 +181,15 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel); 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() { protected String[] getNameArray() {
return new String[]{Inter.getLocText("ChartF-X_Axis"), Inter.getLocText("ChartF-Y_Axis") return new String[]{Inter.getLocText("ChartF-X_Axis"), Inter.getLocText("ChartF-Y_Axis")
,Inter.getLocText("Plugin-ChartF_XYAxis"),Inter.getLocText("Chart-Use_None")}; ,Inter.getLocText("Plugin-ChartF_XYAxis"),Inter.getLocText("Chart-Use_None")};
@ -275,6 +292,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
populateAutoRefresh((VanChart)chart); populateAutoRefresh((VanChart)chart);
populateHyperlink(plot); populateHyperlink(plot);
checkZoomEnabled();
} }

Loading…
Cancel
Save