|
|
|
@ -8,16 +8,20 @@ import com.fr.chart.chartglyph.ConditionAttr;
|
|
|
|
|
import com.fr.chart.chartglyph.ConditionCollection; |
|
|
|
|
import com.fr.chartx.attr.LargeDataModeType; |
|
|
|
|
import com.fr.design.formula.TinyFormulaPane; |
|
|
|
|
import com.fr.design.gui.frpane.UINumberDragPane; |
|
|
|
|
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
|
import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
|
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.gui.ispinner.UnsignedIntUISpinner; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
import com.fr.design.mainframe.chart.mode.ChartEditContext; |
|
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartPlot; |
|
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
|
|
|
@ -33,6 +37,8 @@ import com.fr.plugin.chart.base.VanChartZoom;
|
|
|
|
|
import com.fr.plugin.chart.gantt.attr.AttrGanttLabel; |
|
|
|
|
import com.fr.plugin.chart.map.line.condition.AttrLineEffect; |
|
|
|
|
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel; |
|
|
|
|
import com.fr.plugin.chart.type.AxisType; |
|
|
|
|
import com.fr.plugin.chart.type.ControlType; |
|
|
|
|
import com.fr.plugin.chart.vanchart.VanChart; |
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
import com.fr.van.chart.custom.component.VanChartHyperLinkPane; |
|
|
|
@ -46,14 +52,15 @@ import javax.swing.JPanel;
|
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.CardLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
|
|
public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 8135452818502145597L; |
|
|
|
|
private static final int AUTO_REFRESH_LEFT_GAP = 18; |
|
|
|
|
private static final double PERCENT = 100.0; |
|
|
|
|
|
|
|
|
|
protected UICheckBox isSort; |
|
|
|
|
protected UICheckBox exportImages; |
|
|
|
@ -73,15 +80,20 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
private AutoRefreshPane autoRefreshPane; |
|
|
|
|
|
|
|
|
|
//图表缩放新设计 恢复用注释。删除下面八行代码。
|
|
|
|
|
private UIButtonGroup zoomWidget; |
|
|
|
|
private UICheckBox zoomWidget; |
|
|
|
|
protected UIButtonGroup zoomGesture;//地图手势缩放
|
|
|
|
|
private UIButtonGroup zoomResize; |
|
|
|
|
private TinyFormulaPane from; |
|
|
|
|
private TinyFormulaPane to; |
|
|
|
|
private UIButtonGroup<String> zoomType; |
|
|
|
|
private JPanel changeEnablePane; |
|
|
|
|
private JPanel zoomTypePane; |
|
|
|
|
|
|
|
|
|
private UIButtonGroup<ControlType> controlType; |
|
|
|
|
protected JPanel centerPane; |
|
|
|
|
private UISpinner categoryNum; |
|
|
|
|
private UINumberDragPane scaling; |
|
|
|
|
private UIButtonGroup zoomResize; |
|
|
|
|
private TinyFormulaPane from; |
|
|
|
|
private TinyFormulaPane to; |
|
|
|
|
|
|
|
|
|
//图表缩放新设计 恢复用注释。取消注释。
|
|
|
|
|
//private ZoomPane zoomPane;
|
|
|
|
|
|
|
|
|
@ -127,14 +139,14 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
//new Component[]{createLargeDataModePane(), null},
|
|
|
|
|
new Component[]{createAnimationPane(), null}, |
|
|
|
|
new Component[]{createAxisRotationPane(new double[]{p, p}, columnSize, plot), null}, |
|
|
|
|
new Component[]{createZoomPane(new double[]{p, p, p}, columnSize, plot), null}, |
|
|
|
|
new Component[]{createZoomPane(plot), null}, |
|
|
|
|
new Component[]{createAutoRefreshPane(plot), null}, |
|
|
|
|
new Component[]{createHyperlinkPane(), null} |
|
|
|
|
} : new Component[][]{ |
|
|
|
|
new Component[]{createToolBarPane(getToolBarRowSize(), columnSize), null}, |
|
|
|
|
new Component[]{createAnimationPane(), null}, |
|
|
|
|
new Component[]{createAxisRotationPane(new double[]{p, p}, columnSize, plot), null}, |
|
|
|
|
new Component[]{createZoomPane(new double[]{p, p, p}, columnSize, plot), null} |
|
|
|
|
new Component[]{createZoomPane(plot), null} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
@ -178,7 +190,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createZoomPane(double[] row, double[] col, VanChartPlot plot) { |
|
|
|
|
protected JPanel createZoomPane(VanChartPlot plot) { |
|
|
|
|
//图表缩放新设计 恢复用注释。取消注释。
|
|
|
|
|
// zoomPane = createZoomPane();
|
|
|
|
|
// if (zoomPane == null) {
|
|
|
|
@ -190,47 +202,118 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
if (!plot.isSupportZoomDirection()) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
zoomWidget = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); |
|
|
|
|
zoomResize = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Change"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Non_Adjustment")}); |
|
|
|
|
from = new TinyFormulaPane(); |
|
|
|
|
to = new TinyFormulaPane(); |
|
|
|
|
zoomWidget = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Open_Zoom_Control")); |
|
|
|
|
zoomGesture = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Open"), Toolkit.i18nText("Fine-Design_Chart_Close")}); |
|
|
|
|
JPanel zoomWidgetPane = TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_Zoom_Widget"), zoomWidget); |
|
|
|
|
JPanel zoomGesturePane = TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_ZoomGesture"), zoomGesture); |
|
|
|
|
zoomType = new UIButtonGroup(getNameArray(), getValueArray()); |
|
|
|
|
zoomGesture = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); |
|
|
|
|
zoomTypePane = getZoomTypePane(zoomType); |
|
|
|
|
|
|
|
|
|
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, plot); |
|
|
|
|
zoomWidget.addActionListener((event) -> checkZoomPane()); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Use_Zoom"), panel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JPanel zoomWidgetPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Zoom_Widget"), zoomWidget); |
|
|
|
|
JPanel zoomGesturePane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_ZoomGesture"), zoomGesture); |
|
|
|
|
private void createChangeEnablePane(VanChartRectanglePlot plot) { |
|
|
|
|
String scroll = Toolkit.i18nText("Fine-Design_Chart_Scroll"); |
|
|
|
|
String scaleAxis = Toolkit.i18nText("Fine-Design_Chart_Scale_Axis"); |
|
|
|
|
controlType = new UIButtonGroup<>(new String[]{scroll, scaleAxis}, ControlType.values()); |
|
|
|
|
JPanel scaleAxisPane = createScaleAxisPane(); |
|
|
|
|
JPanel scrollPane = createScrollPane(plot); |
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Boundary")), zoomResize}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_From")), from}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_To")), to}, |
|
|
|
|
centerPane = new JPanel(new CardLayout()) { |
|
|
|
|
@Override |
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
|
if (controlType.getSelectedItem() == ControlType.ZOOM) { |
|
|
|
|
return scaleAxisPane.getPreferredSize(); |
|
|
|
|
} else { |
|
|
|
|
return scrollPane.getPreferredSize(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
centerPane.add(scaleAxisPane, scroll); |
|
|
|
|
centerPane.add(scrollPane, scaleAxis); |
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; |
|
|
|
|
double[] columnSize = {f, e}; |
|
|
|
|
double[] row = {p, p}; |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Control_Type")), controlType}, |
|
|
|
|
new Component[]{centerPane, null} |
|
|
|
|
}; |
|
|
|
|
changeEnablePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize); |
|
|
|
|
changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10, 12, 0, 0)); |
|
|
|
|
zoomTypePane = getzoomTypePane(zoomType); |
|
|
|
|
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot); |
|
|
|
|
zoomWidget.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
checkZoomPane(); |
|
|
|
|
changeEnablePane.setBorder(BorderFactory.createEmptyBorder(5, 12, 0, 0)); |
|
|
|
|
|
|
|
|
|
controlType.addActionListener((event) -> checkCardPane()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createScaleAxisPane() { |
|
|
|
|
zoomResize = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Change"), Toolkit.i18nText("Fine-Design_Chart_Non_Adjustment")}); |
|
|
|
|
from = new TinyFormulaPane(); |
|
|
|
|
to = new TinyFormulaPane(); |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Boundary")), zoomResize}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_From")), from}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_To")), to}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; |
|
|
|
|
double[] columnSize = {f, e}; |
|
|
|
|
double[] row = {p, p, p}; |
|
|
|
|
JPanel resizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize); |
|
|
|
|
return resizePane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createScrollPane(VanChartRectanglePlot plot) { |
|
|
|
|
VanChartAxis vanChartAxis = plot.getCategoryAxisList().get(0); |
|
|
|
|
AxisType axisType = vanChartAxis.getAxisType(); |
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; |
|
|
|
|
double[] columnSize = {f, e}; |
|
|
|
|
double[] row = {p}; |
|
|
|
|
Component[][] components; |
|
|
|
|
if (axisType == AxisType.AXIS_CATEGORY) { |
|
|
|
|
categoryNum = new UnsignedIntUISpinner(1, Double.MAX_VALUE, 1); |
|
|
|
|
components = new Component[][]{ |
|
|
|
|
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Initial_Cate_Num")), categoryNum}, |
|
|
|
|
}; |
|
|
|
|
} else { |
|
|
|
|
scaling = new UINumberDragPaneWithPercent(1, 100, 1); |
|
|
|
|
components = new Component[][]{ |
|
|
|
|
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Scaling")), scaling}, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void checkCardPane() { |
|
|
|
|
if (centerPane != null && controlType != null) { |
|
|
|
|
CardLayout cardLayout = (CardLayout) centerPane.getLayout(); |
|
|
|
|
if (controlType.getSelectedItem() == ControlType.ZOOM) { |
|
|
|
|
cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Scroll")); |
|
|
|
|
} else { |
|
|
|
|
cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Scale_Axis")); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Zoom"), panel); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//图表缩放新设计 恢复用注释。删除下面八个方法getzoomTypePane createZoomPaneContent
|
|
|
|
|
// checkZoomEnabled getNameArray getValueArray checkZoomPane populateChartZoom updateChartZoom。
|
|
|
|
|
protected JPanel getzoomTypePane(UIButtonGroup zoomType) { |
|
|
|
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction"), zoomType); |
|
|
|
|
protected JPanel getZoomTypePane(UIButtonGroup zoomType) { |
|
|
|
|
return TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction"), zoomType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) { |
|
|
|
|
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, VanChartPlot plot) { |
|
|
|
|
JPanel panel = new JPanel(new BorderLayout(0, 4)); |
|
|
|
|
if (plot.isSupportZoomCategoryAxis()) {//支持缩放控件
|
|
|
|
|
createChangeEnablePane((VanChartRectanglePlot) plot); |
|
|
|
|
panel.add(zoomWidgetPane, BorderLayout.NORTH); |
|
|
|
|
panel.add(changeEnablePane, BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
@ -242,17 +325,18 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
if (zoomWidget != null && axisRotation != null) { |
|
|
|
|
if (axisRotation.getSelectedIndex() == 0) { |
|
|
|
|
//只有开启坐标轴翻转,才需要将缩放控件强制关闭。
|
|
|
|
|
zoomWidget.setSelectedIndex(1); |
|
|
|
|
zoomWidget.setSelected(false); |
|
|
|
|
} |
|
|
|
|
checkZoomPane(); |
|
|
|
|
zoomWidget.setEnabled(axisRotation.getSelectedIndex() == 1); |
|
|
|
|
} |
|
|
|
|
checkCardPane(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected String[] getNameArray() { |
|
|
|
|
return new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_X_Axis"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Y_Axis") |
|
|
|
|
, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_XY_Axis"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")}; |
|
|
|
|
return new String[]{Toolkit.i18nText("Fine-Design_Chart_X_Axis"), Toolkit.i18nText("Fine-Design_Chart_Y_Axis") |
|
|
|
|
, Toolkit.i18nText("Fine-Design_Chart_XY_Axis"), Toolkit.i18nText("Fine-Design_Chart_Use_None")}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected String[] getValueArray() { |
|
|
|
@ -262,9 +346,11 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void checkZoomPane() { |
|
|
|
|
boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0; |
|
|
|
|
changeEnablePane.setVisible(zoomWidgetEnabled); |
|
|
|
|
zoomType.setEnabled(!zoomWidgetEnabled); |
|
|
|
|
boolean zoomWidgetEnabled = zoomWidget.isSelected(); |
|
|
|
|
if (changeEnablePane != null) { |
|
|
|
|
changeEnablePane.setVisible(zoomWidgetEnabled); |
|
|
|
|
} |
|
|
|
|
zoomTypePane.setVisible(!zoomWidgetEnabled); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void populateChartZoom(VanChart chart) { |
|
|
|
@ -272,20 +358,31 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
if (zoom == null) { |
|
|
|
|
zoom = new VanChartZoom(); |
|
|
|
|
} |
|
|
|
|
zoomWidget.setSelectedIndex(zoom.isZoomVisible() ? 0 : 1); |
|
|
|
|
zoomWidget.setSelected(zoom.isZoomVisible()); |
|
|
|
|
zoomGesture.setSelectedIndex(zoom.isZoomGesture() ? 0 : 1); |
|
|
|
|
zoomResize.setSelectedIndex(zoom.isZoomResize() ? 0 : 1); |
|
|
|
|
if (zoom.getFrom() instanceof BaseFormula) { |
|
|
|
|
from.populateBean(((BaseFormula) zoom.getFrom()).getContent()); |
|
|
|
|
} else { |
|
|
|
|
from.populateBean(Utils.objectToString(zoom.getFrom())); |
|
|
|
|
} |
|
|
|
|
if (zoom.getTo() instanceof BaseFormula) { |
|
|
|
|
to.populateBean(((BaseFormula) zoom.getTo()).getContent()); |
|
|
|
|
} else { |
|
|
|
|
to.populateBean(Utils.objectToString(zoom.getTo())); |
|
|
|
|
} |
|
|
|
|
zoomType.setSelectedItem(zoom.getZoomType()); |
|
|
|
|
|
|
|
|
|
if (changeEnablePane != null) { |
|
|
|
|
controlType.setSelectedItem(zoom.getControlType()); |
|
|
|
|
|
|
|
|
|
zoomResize.setSelectedIndex(zoom.isZoomResize() ? 0 : 1); |
|
|
|
|
if (zoom.getFrom() instanceof BaseFormula) { |
|
|
|
|
from.populateBean(((BaseFormula) zoom.getFrom()).getContent()); |
|
|
|
|
} else { |
|
|
|
|
from.populateBean(Utils.objectToString(zoom.getFrom())); |
|
|
|
|
} |
|
|
|
|
if (zoom.getTo() instanceof BaseFormula) { |
|
|
|
|
to.populateBean(((BaseFormula) zoom.getTo()).getContent()); |
|
|
|
|
} else { |
|
|
|
|
to.populateBean(Utils.objectToString(zoom.getTo())); |
|
|
|
|
} |
|
|
|
|
if (categoryNum != null) { |
|
|
|
|
categoryNum.setValue(zoom.getCategoryNum()); |
|
|
|
|
} |
|
|
|
|
if (scaling != null) { |
|
|
|
|
scaling.populateBean(zoom.getScaling() * PERCENT); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void updateChartZoom(VanChart chart) { |
|
|
|
@ -294,26 +391,38 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
zoom = new VanChartZoom(); |
|
|
|
|
chart.setVanChartZoom(zoom); |
|
|
|
|
} |
|
|
|
|
zoom.setZoomVisible(zoomWidget.getSelectedIndex() == 0); |
|
|
|
|
zoom.setZoomVisible(zoomWidget.isSelected()); |
|
|
|
|
zoom.setZoomGesture(zoomGesture.getSelectedIndex() == 0); |
|
|
|
|
zoom.setZoomResize(zoomResize.getSelectedIndex() == 0); |
|
|
|
|
String fromString = from.updateBean(); |
|
|
|
|
Object fromObject; |
|
|
|
|
if (StableUtils.maybeFormula(fromString)) { |
|
|
|
|
fromObject = BaseFormula.createFormulaBuilder().build(fromString); |
|
|
|
|
} else { |
|
|
|
|
fromObject = fromString; |
|
|
|
|
} |
|
|
|
|
zoom.setFrom(fromObject); |
|
|
|
|
String toString = to.updateBean(); |
|
|
|
|
Object toObject; |
|
|
|
|
if (StableUtils.maybeFormula(toString)) { |
|
|
|
|
toObject = BaseFormula.createFormulaBuilder().build(toString); |
|
|
|
|
} else { |
|
|
|
|
toObject = toString; |
|
|
|
|
} |
|
|
|
|
zoom.setTo(toObject); |
|
|
|
|
zoom.setZoomType(zoomType.getSelectedItem()); |
|
|
|
|
if (changeEnablePane != null) { |
|
|
|
|
zoom.setControlType(controlType.getSelectedItem()); |
|
|
|
|
if (zoom.getControlType() == ControlType.ZOOM) { |
|
|
|
|
zoom.setZoomResize(zoomResize.getSelectedIndex() == 0); |
|
|
|
|
String fromString = from.updateBean(); |
|
|
|
|
Object fromObject; |
|
|
|
|
if (StableUtils.maybeFormula(fromString)) { |
|
|
|
|
fromObject = BaseFormula.createFormulaBuilder().build(fromString); |
|
|
|
|
} else { |
|
|
|
|
fromObject = fromString; |
|
|
|
|
} |
|
|
|
|
zoom.setFrom(fromObject); |
|
|
|
|
String toString = to.updateBean(); |
|
|
|
|
Object toObject; |
|
|
|
|
if (StableUtils.maybeFormula(toString)) { |
|
|
|
|
toObject = BaseFormula.createFormulaBuilder().build(toString); |
|
|
|
|
} else { |
|
|
|
|
toObject = toString; |
|
|
|
|
} |
|
|
|
|
zoom.setTo(toObject); |
|
|
|
|
} else { |
|
|
|
|
if (categoryNum != null) { |
|
|
|
|
zoom.setCategoryNum((int) categoryNum.getValue()); |
|
|
|
|
} |
|
|
|
|
if (scaling != null) { |
|
|
|
|
zoom.setScaling(scaling.updateBean() / PERCENT); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected ZoomPane createZoomPane() { |
|
|
|
@ -386,12 +495,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
|
double[] columnSize = {f, e}; |
|
|
|
|
double[] rowSize = {p,p}; |
|
|
|
|
double[] rowSize = {p, p}; |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{null,null}, |
|
|
|
|
new Component[]{chartAnimationLabel,isChartAnimation} |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
new Component[]{chartAnimationLabel, isChartAnimation} |
|
|
|
|
}; |
|
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); |
|
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation"), panel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -473,7 +582,6 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
//图表缩放新设计 恢复用注释。删除下面三行代码。
|
|
|
|
|
if (plot.isSupportZoomDirection()) {//支持缩放方向=方向+控件
|
|
|
|
|
populateChartZoom((VanChart) chart); |
|
|
|
|
checkZoomPane(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE) { |
|
|
|
|