|
|
@ -2,18 +2,30 @@ package com.fr.van.chart.designer.other; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.chart.chartattr.Chart; |
|
|
|
import com.fr.chart.chartattr.Chart; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
|
|
|
|
import com.fr.chart.chartglyph.ConditionAttr; |
|
|
|
|
|
|
|
import com.fr.chart.chartglyph.ConditionCollection; |
|
|
|
|
|
|
|
import com.fr.chartx.attr.LargeDataAttribute; |
|
|
|
|
|
|
|
import com.fr.chartx.attr.LargeDataModeType; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
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.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.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartPlot; |
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartPlot; |
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
|
|
|
import com.fr.plugin.chart.axis.type.AxisPlotType; |
|
|
|
import com.fr.plugin.chart.axis.type.AxisPlotType; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.base.AttrEffect; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.base.AttrLabel; |
|
|
|
import com.fr.plugin.chart.base.RefreshMoreLabel; |
|
|
|
import com.fr.plugin.chart.base.RefreshMoreLabel; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.base.VanChartAttrMarker; |
|
|
|
import com.fr.plugin.chart.base.VanChartTools; |
|
|
|
import com.fr.plugin.chart.base.VanChartTools; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.map.line.condition.AttrLineEffect; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel; |
|
|
|
import com.fr.plugin.chart.vanchart.VanChart; |
|
|
|
import com.fr.plugin.chart.vanchart.VanChart; |
|
|
|
import com.fr.van.chart.custom.component.VanChartHyperLinkPane; |
|
|
|
import com.fr.van.chart.custom.component.VanChartHyperLinkPane; |
|
|
|
import com.fr.van.chart.designer.AbstractVanChartScrollPane; |
|
|
|
import com.fr.van.chart.designer.AbstractVanChartScrollPane; |
|
|
@ -22,7 +34,10 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
import com.fr.van.chart.designer.other.zoom.ZoomPane; |
|
|
|
import com.fr.van.chart.designer.other.zoom.ZoomPane; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
|
|
|
|
public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
|
|
|
|
|
|
|
@ -34,6 +49,10 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
protected UICheckBox fullScreenDisplay; |
|
|
|
protected UICheckBox fullScreenDisplay; |
|
|
|
protected UIToggleButton collapse; |
|
|
|
protected UIToggleButton collapse; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected VanChart chart; |
|
|
|
|
|
|
|
private UIComboBox largeDataMode; |
|
|
|
|
|
|
|
private UISpinner largeModeThresholdNumber; |
|
|
|
|
|
|
|
|
|
|
|
protected UIButtonGroup isChartAnimation; |
|
|
|
protected UIButtonGroup isChartAnimation; |
|
|
|
|
|
|
|
|
|
|
|
//坐标轴翻转属性
|
|
|
|
//坐标轴翻转属性
|
|
|
@ -44,12 +63,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
private ZoomPane zoomPane; |
|
|
|
private ZoomPane zoomPane; |
|
|
|
|
|
|
|
|
|
|
|
protected VanChartHyperLinkPane superLink; |
|
|
|
protected VanChartHyperLinkPane superLink; |
|
|
|
|
|
|
|
private JPanel largeModeThresholdNumberPane; |
|
|
|
protected Chart chart; |
|
|
|
|
|
|
|
protected JPanel interactivePane; |
|
|
|
protected JPanel interactivePane; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 界面标题. |
|
|
|
* 界面标题. |
|
|
|
|
|
|
|
* |
|
|
|
* @return 返回标题. |
|
|
|
* @return 返回标题. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
@ -63,7 +82,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
return new JPanel(); |
|
|
|
return new JPanel(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void reLayoutContentPane(VanChartPlot plot){ |
|
|
|
private void reLayoutContentPane(VanChartPlot plot) { |
|
|
|
if (interactivePane != null) { |
|
|
|
if (interactivePane != null) { |
|
|
|
interactivePane.removeAll(); |
|
|
|
interactivePane.removeAll(); |
|
|
|
} |
|
|
|
} |
|
|
@ -71,26 +90,64 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
reloaPane(interactivePane); |
|
|
|
reloaPane(interactivePane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel getInteractivePane(VanChartPlot plot){ |
|
|
|
protected JPanel getInteractivePane(VanChartPlot plot) { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
double[] columnSize = {f, e}; |
|
|
|
double[] columnSize = {f, e}; |
|
|
|
double[] rowSize = {p,p,p,p,p,p}; |
|
|
|
double[] rowSize = {p, p, p, p, p, p}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{createToolBarPane(getToolBarRowSize(), columnSize),null}, |
|
|
|
new Component[]{createToolBarPane(getToolBarRowSize(), columnSize), null}, |
|
|
|
new Component[]{createAnimationPane(),null}, |
|
|
|
new Component[]{createLargeDataModePane(), null}, |
|
|
|
new Component[]{createAxisRotationPane(new double[]{p,p}, columnSize, plot),null}, |
|
|
|
new Component[]{createAnimationPane(), null}, |
|
|
|
new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null}, |
|
|
|
new Component[]{createAxisRotationPane(new double[]{p, p}, columnSize, plot), null}, |
|
|
|
new Component[]{createAutoRefreshPane(plot),null}, |
|
|
|
new Component[]{createZoomPane(new double[]{p, p, p}, columnSize, plot), null}, |
|
|
|
new Component[]{createHyperlinkPane(),null} |
|
|
|
new Component[]{createAutoRefreshPane(plot), null}, |
|
|
|
|
|
|
|
new Component[]{createHyperlinkPane(), null} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createLargeDataModePane() { |
|
|
|
|
|
|
|
if (!isCurrentChartSupportLargeDataMode()) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
largeDataMode = new UIComboBox(new LargeDataModeType[]{LargeDataModeType.CLOSE, LargeDataModeType.OPEN_BEYOND_THRESHOLD}); |
|
|
|
|
|
|
|
largeModeThresholdNumber = new UISpinner(0, Integer.MAX_VALUE, 100, chart.getPlot().getLargeDataAttribute().getLargeModeThresholdNumber()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
largeDataMode.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
checkLargeDataMode(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component[][] comps1 = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Large_Model")), largeDataMode} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
Component[][] comps2 = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Threshold_Number")), largeModeThresholdNumber} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double[] row = {TableLayout.PREFERRED}, col = {TableLayout.FILL, TableLayout4VanChartHelper.EDIT_AREA_WIDTH}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel contentPane = new JPanel(new BorderLayout(0, 6)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contentPane.add(TableLayout4VanChartHelper.createGapTableLayoutPane(comps1, row, col), BorderLayout.CENTER); |
|
|
|
|
|
|
|
largeModeThresholdNumberPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps2, row, col); |
|
|
|
|
|
|
|
contentPane.add(largeModeThresholdNumberPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Large_Data"), contentPane); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected boolean isCurrentChartSupportLargeDataMode() { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createZoomPane(double[] row, double[] col, VanChartPlot plot) { |
|
|
|
protected JPanel createZoomPane(double[] row, double[] col, VanChartPlot plot) { |
|
|
|
zoomPane = createZoomPane(); |
|
|
|
zoomPane = createZoomPane(); |
|
|
|
if (zoomPane == null) { |
|
|
|
if (zoomPane == null) { |
|
|
@ -103,23 +160,23 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createAxisRotationPane(double[] row, double[] col, VanChartPlot plot){ |
|
|
|
private JPanel createAxisRotationPane(double[] row, double[] col, VanChartPlot plot) { |
|
|
|
if (!(plot.getAxisPlotType() == AxisPlotType.RECTANGLE)){ |
|
|
|
if (!(plot.getAxisPlotType() == AxisPlotType.RECTANGLE)) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
axisRotation = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), |
|
|
|
axisRotation = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); |
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{null,null}, |
|
|
|
new Component[]{null, null}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Reversal")),axisRotation} |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Reversal")), axisRotation} |
|
|
|
}; |
|
|
|
}; |
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); |
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis"), panel); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis"), panel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createToolBarPane(double[] row, double[] col){ |
|
|
|
protected JPanel createToolBarPane(double[] row, double[] col) { |
|
|
|
isSort = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Sort")); |
|
|
|
isSort = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Sort")); |
|
|
|
exportImages = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Export_Image")); |
|
|
|
exportImages = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Export_Image")); |
|
|
|
fullScreenDisplay = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_FullScreen_Display")); |
|
|
|
fullScreenDisplay = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_FullScreen_Display")); |
|
|
@ -131,17 +188,17 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_ToolBar"), panel); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_ToolBar"), panel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected double[] getToolBarRowSize () { |
|
|
|
protected double[] getToolBarRowSize() { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
return new double[]{p,p,p,p,p}; |
|
|
|
return new double[]{p, p, p, p, p}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Component[][] createToolBarComponents() { |
|
|
|
protected Component[][] createToolBarComponents() { |
|
|
|
return new Component[][]{ |
|
|
|
return new Component[][]{ |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")),isSort}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")), isSort}, |
|
|
|
new Component[]{null, exportImages}, |
|
|
|
new Component[]{null, exportImages}, |
|
|
|
new Component[]{null, fullScreenDisplay}, |
|
|
|
new Component[]{null, fullScreenDisplay}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout")),collapse}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout")), collapse}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -149,18 +206,18 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
return new Component[][]{ |
|
|
|
return new Component[][]{ |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")), exportImages}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")), exportImages}, |
|
|
|
new Component[]{null, fullScreenDisplay}, |
|
|
|
new Component[]{null, fullScreenDisplay}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout")),collapse} |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout")), collapse} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createAnimationPane(){ |
|
|
|
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")}); |
|
|
|
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); |
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation_Effects"), isChartAnimation); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation"), panel); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation"), panel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createAutoRefreshPane(VanChartPlot plot){ |
|
|
|
protected JPanel createAutoRefreshPane(VanChartPlot plot) { |
|
|
|
|
|
|
|
|
|
|
|
autoRefreshPane = getMoreLabelPane(plot); |
|
|
|
autoRefreshPane = getMoreLabelPane(plot); |
|
|
|
|
|
|
|
|
|
|
@ -169,7 +226,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
|
|
|
|
|
|
|
|
protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) { |
|
|
|
protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) { |
|
|
|
boolean isLargeModel = largeModel(plot); |
|
|
|
boolean isLargeModel = largeModel(plot); |
|
|
|
return new AutoRefreshPane((VanChart) chart, isLargeModel); |
|
|
|
return new AutoRefreshPane(chart, isLargeModel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createHyperlinkPane() { |
|
|
|
protected JPanel createHyperlinkPane() { |
|
|
@ -177,31 +234,69 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert_Hyperlink"), superLink); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert_Hyperlink"), superLink); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void checkLargeDataMode() { |
|
|
|
|
|
|
|
largeModeThresholdNumberPane.setVisible(largeDataMode.getSelectedItem() == LargeDataModeType.OPEN_BEYOND_THRESHOLD); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resetAttr(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void resetAttr() { |
|
|
|
|
|
|
|
if (largeDataMode.getSelectedItem() == LargeDataModeType.OPEN_BEYOND_THRESHOLD) { |
|
|
|
|
|
|
|
VanChartPlot plot = this.chart.getPlot(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AttrLabel attrLabel = plot.getAttrLabelFromConditionCollection(); |
|
|
|
|
|
|
|
if (attrLabel == null) { |
|
|
|
|
|
|
|
attrLabel = plot.getDefaultAttrLabel(); |
|
|
|
|
|
|
|
ConditionAttr defaultAttr = plot.getConditionCollection().getDefaultAttr(); |
|
|
|
|
|
|
|
defaultAttr.addDataSeriesCondition(attrLabel); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
attrLabel.setEnable(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resetCustomCondition(plot.getConditionCollection()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void resetCustomCondition(ConditionCollection conditionCollection) { |
|
|
|
|
|
|
|
for (int i = 0, len = conditionCollection.getConditionAttrSize(); i < len; i++) { |
|
|
|
|
|
|
|
ConditionAttr conditionAttr = conditionCollection.getConditionAttr(i); |
|
|
|
|
|
|
|
conditionAttr.remove(AttrLabel.class); |
|
|
|
|
|
|
|
conditionAttr.remove(ScatterAttrLabel.class); |
|
|
|
|
|
|
|
conditionAttr.remove(AttrEffect.class); |
|
|
|
|
|
|
|
conditionAttr.remove(AttrLineEffect.class); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VanChartAttrMarker attrMarker = conditionAttr.getExisted(VanChartAttrMarker.class); |
|
|
|
|
|
|
|
if (attrMarker != null && !attrMarker.isCommon()) { |
|
|
|
|
|
|
|
conditionAttr.remove(VanChartAttrMarker.class); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void populateBean(Chart chart) { |
|
|
|
public void populateBean(Chart chart) { |
|
|
|
if (chart == null || chart.getPlot() == null) { |
|
|
|
if (chart == null || chart.getPlot() == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
this.chart = chart; |
|
|
|
this.chart = (VanChart) chart; |
|
|
|
VanChartPlot plot = chart.getPlot(); |
|
|
|
VanChartPlot plot = chart.getPlot(); |
|
|
|
|
|
|
|
|
|
|
|
if(interactivePane == null){ |
|
|
|
if (interactivePane == null) { |
|
|
|
this.remove(leftcontentPane); |
|
|
|
this.remove(leftcontentPane); |
|
|
|
reLayoutContentPane(plot); |
|
|
|
reLayoutContentPane(plot); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (zoomPane != null) { |
|
|
|
if (zoomPane != null) { |
|
|
|
zoomPane.populateBean(((VanChart) chart).getZoomAttribute()); |
|
|
|
zoomPane.populateBean(this.chart.getZoomAttribute()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE){ |
|
|
|
if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE) { |
|
|
|
populateChartAxisRotation(plot); |
|
|
|
populateChartAxisRotation(plot); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
populateChartTools((VanChart) chart); |
|
|
|
populateChartTools(this.chart); |
|
|
|
populateChartAnimate(chart, plot); |
|
|
|
populateLargeMode(plot); |
|
|
|
populateAutoRefresh((VanChart)chart); |
|
|
|
populateChartAnimate(this.chart, plot); |
|
|
|
|
|
|
|
populateAutoRefresh(this.chart); |
|
|
|
|
|
|
|
|
|
|
|
populateHyperlink(plot); |
|
|
|
populateHyperlink(plot); |
|
|
|
} |
|
|
|
} |
|
|
@ -219,12 +314,21 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
collapse.setSelected(vanChartTools.isHidden()); |
|
|
|
collapse.setSelected(vanChartTools.isHidden()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void populateLargeMode(Plot plot) { |
|
|
|
|
|
|
|
if (largeDataMode != null) { |
|
|
|
|
|
|
|
LargeDataAttribute attribute = plot.getLargeDataAttribute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
largeDataMode.setSelectedItem(attribute.getLargeDataModeType()); |
|
|
|
|
|
|
|
largeModeThresholdNumber.setValue(attribute.getLargeModeThresholdNumber()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populateChartAxisRotation(VanChartPlot plot) { |
|
|
|
private void populateChartAxisRotation(VanChartPlot plot) { |
|
|
|
axisRotation.setSelectedIndex(plot.isAxisRotation() ? 0 : 1); |
|
|
|
axisRotation.setSelectedIndex(plot.isAxisRotation() ? 0 : 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populateChartAnimate(Chart chart, Plot plot) { |
|
|
|
private void populateChartAnimate(Chart chart, Plot plot) { |
|
|
|
if(plot.isSupportAnimate()) { |
|
|
|
if (plot.isSupportAnimate()) { |
|
|
|
isChartAnimation.setSelectedIndex(chart.isJSDraw() ? 0 : 1); |
|
|
|
isChartAnimation.setSelectedIndex(chart.isJSDraw() ? 0 : 1); |
|
|
|
isChartAnimation.setEnabled(!largeModel(plot)); |
|
|
|
isChartAnimation.setEnabled(!largeModel(plot)); |
|
|
|
} |
|
|
|
} |
|
|
@ -235,11 +339,11 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void populateAutoRefresh(VanChart chart) { |
|
|
|
protected void populateAutoRefresh(VanChart chart) { |
|
|
|
VanChartPlot plot = (VanChartPlot)chart.getPlot(); |
|
|
|
VanChartPlot plot = chart.getPlot(); |
|
|
|
|
|
|
|
|
|
|
|
RefreshMoreLabel refreshMoreLabel = chart.getRefreshMoreLabel(); |
|
|
|
RefreshMoreLabel refreshMoreLabel = chart.getRefreshMoreLabel(); |
|
|
|
if(refreshMoreLabel == null) { |
|
|
|
if (refreshMoreLabel == null) { |
|
|
|
refreshMoreLabel = new RefreshMoreLabel(((VanChartPlot)chart.getPlot()).getAutoAttrTooltip()); |
|
|
|
refreshMoreLabel = new RefreshMoreLabel(((VanChartPlot) chart.getPlot()).getAutoAttrTooltip()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
autoRefreshPane.populateBean(refreshMoreLabel); |
|
|
|
autoRefreshPane.populateBean(refreshMoreLabel); |
|
|
@ -252,22 +356,24 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VanChart vanChart = (VanChart) chart; |
|
|
|
VanChartPlot plot = chart.getPlot(); |
|
|
|
VanChartPlot plot = chart.getPlot(); |
|
|
|
|
|
|
|
|
|
|
|
if (zoomPane != null) { |
|
|
|
if (zoomPane != null) { |
|
|
|
((VanChart) chart).setZoomAttribute(zoomPane.updateBean()); |
|
|
|
vanChart.setZoomAttribute(zoomPane.updateBean()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(plot.getAxisPlotType() == AxisPlotType.RECTANGLE){ |
|
|
|
if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE) { |
|
|
|
updateChartAxisRotation((VanChart)chart); |
|
|
|
updateChartAxisRotation(vanChart); |
|
|
|
} |
|
|
|
} |
|
|
|
updateChartTools((VanChart)chart); |
|
|
|
updateChartTools(vanChart); |
|
|
|
updateChartAnimate(chart, plot); |
|
|
|
updateChartAnimate(vanChart, plot); |
|
|
|
updateAutoRefresh((VanChart)chart); |
|
|
|
updateLargeData(plot); |
|
|
|
|
|
|
|
updateAutoRefresh(vanChart); |
|
|
|
updateHyperlink(plot); |
|
|
|
updateHyperlink(plot); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void updateHyperlink(Plot plot){ |
|
|
|
protected void updateHyperlink(Plot plot) { |
|
|
|
superLink.update(plot); |
|
|
|
superLink.update(plot); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -282,7 +388,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
|
|
|
|
|
|
|
|
private void updateChartAxisRotation(VanChart chart) { |
|
|
|
private void updateChartAxisRotation(VanChart chart) { |
|
|
|
//坐标轴和plot都需要这个属性,因为坐标轴和plot是分开画的
|
|
|
|
//坐标轴和plot都需要这个属性,因为坐标轴和plot是分开画的
|
|
|
|
VanChartPlot plot = (VanChartPlot) chart.getPlot(); |
|
|
|
VanChartPlot plot = chart.getPlot(); |
|
|
|
plot.setAxisRotation(axisRotation.getSelectedIndex() == 0); |
|
|
|
plot.setAxisRotation(axisRotation.getSelectedIndex() == 0); |
|
|
|
//同时更新坐标轴旋转属性
|
|
|
|
//同时更新坐标轴旋转属性
|
|
|
|
for (VanChartAxis axis : ((VanChartRectanglePlot) plot).getXAxisList()) { |
|
|
|
for (VanChartAxis axis : ((VanChartRectanglePlot) plot).getXAxisList()) { |
|
|
@ -294,14 +400,23 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//更新数据表属性
|
|
|
|
//更新数据表属性
|
|
|
|
if (plot.isAxisRotation()){ |
|
|
|
if (plot.isAxisRotation()) { |
|
|
|
plot.getDataSheet().setVisible(false); |
|
|
|
plot.getDataSheet().setVisible(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void updateLargeData(Plot plot) { |
|
|
|
|
|
|
|
if (largeDataMode != null) { |
|
|
|
|
|
|
|
LargeDataAttribute attribute = new LargeDataAttribute(); |
|
|
|
|
|
|
|
attribute.setLargeDataModeType((LargeDataModeType) largeDataMode.getSelectedItem()); |
|
|
|
|
|
|
|
attribute.setLargeModeThresholdNumber(largeModeThresholdNumber.getValue()); |
|
|
|
|
|
|
|
plot.setLargeDataAttribute(attribute); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void updateChartAnimate(Chart chart, Plot plot) { |
|
|
|
private void updateChartAnimate(Chart chart, Plot plot) { |
|
|
|
if(plot.isSupportAnimate()) { |
|
|
|
if (plot.isSupportAnimate()) { |
|
|
|
chart.setJSDraw(isChartAnimation.getSelectedIndex()==0); |
|
|
|
chart.setJSDraw(isChartAnimation.getSelectedIndex() == 0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -309,15 +424,15 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> { |
|
|
|
private void updateAutoRefresh(VanChart chart) { |
|
|
|
private void updateAutoRefresh(VanChart chart) { |
|
|
|
|
|
|
|
|
|
|
|
RefreshMoreLabel refreshMoreLabel = chart.getRefreshMoreLabel(); |
|
|
|
RefreshMoreLabel refreshMoreLabel = chart.getRefreshMoreLabel(); |
|
|
|
if(refreshMoreLabel == null) { |
|
|
|
if (refreshMoreLabel == null) { |
|
|
|
refreshMoreLabel = new RefreshMoreLabel(((VanChartPlot)chart.getPlot()).getAutoAttrTooltip()); |
|
|
|
refreshMoreLabel = new RefreshMoreLabel(((VanChartPlot) chart.getPlot()).getAutoAttrTooltip()); |
|
|
|
chart.setRefreshMoreLabel(refreshMoreLabel); |
|
|
|
chart.setRefreshMoreLabel(refreshMoreLabel); |
|
|
|
} |
|
|
|
} |
|
|
|
autoRefreshPane.updateBean(refreshMoreLabel); |
|
|
|
autoRefreshPane.updateBean(refreshMoreLabel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Chart updateBean() { |
|
|
|
public VanChart updateBean() { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|