Browse Source

CHART-12733 图表缩放新设计 回退

research/11.0
shine 5 years ago
parent
commit
baed43a117
  1. 19
      designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java
  2. 10
      designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubblePlotPane.java
  3. 189
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  4. 20
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePaneWithMapZoom.java
  5. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  6. 13
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java
  7. 51
      designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractMultiCategoryVanChartUI.java
  8. 13
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java

19
designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java

@ -19,6 +19,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa
import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.van.chart.bubble.data.VanChartBubblePlotTableDataContentPane; import com.fr.van.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
@ -103,6 +104,24 @@ public class BubbleIndependentVanChartInterface extends AbstractIndependentVanCh
VanChartOtherPane otherPane = new VanChartOtherPane() { VanChartOtherPane otherPane = new VanChartOtherPane() {
protected BasicBeanPane<Chart> createInteractivePane() { protected BasicBeanPane<Chart> createInteractivePane() {
return new VanChartInteractivePaneWithOutSort() { return new VanChartInteractivePaneWithOutSort() {
//图表缩放新设计 恢复用注释。删除下面两个方法 getNameArray getValueArray。
protected String[] getNameArray() {
Plot plot = chart.getPlot();
if (plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble()) {
return new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_XY_Axis"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")};
}
return super.getNameArray();
}
protected String[] getValueArray() {
Plot plot = chart.getPlot();
if (plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble()) {
return new String[]{VanChartConstants.ZOOM_TYPE_XY, VanChartConstants.ZOOM_TYPE_NONE};
}
return super.getValueArray();
}
@Override @Override
protected ZoomPane createZoomPane() { protected ZoomPane createZoomPane() {
return new ZoomPane(); return new ZoomPane();

10
designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubblePlotPane.java

@ -6,7 +6,6 @@ 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.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.attr.ZoomAttribute;
import com.fr.chartx.data.AbstractDataDefinition; import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider; import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection; import com.fr.chartx.data.field.AbstractColumnFieldCollection;
@ -15,6 +14,7 @@ import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.bubble.BubbleIndependentVanChart; import com.fr.plugin.chart.bubble.BubbleIndependentVanChart;
import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel; import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel;
@ -123,7 +123,13 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
*/ */
@Override @Override
protected void resetChartAttr4SamePlot(Chart chart) { protected void resetChartAttr4SamePlot(Chart chart) {
((VanChart) chart).setZoomAttribute(new ZoomAttribute()); //图表缩放新设计 恢复用注释。下面2行删除。
VanChartZoom vanChartZoom = new VanChartZoom();
((VanChart) chart).setVanChartZoom(vanChartZoom);
//图表缩放新设计 恢复用注释。下面一行取消注释。
//((VanChart) chart).setZoomAttribute(new ZoomAttribute());
//重置监控刷新选项 //重置监控刷新选项
resetRefreshMoreLabelAttr((VanChart) chart); resetRefreshMoreLabelAttr((VanChart) chart);
} }

189
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -1,11 +1,14 @@
package com.fr.van.chart.designer.other; package com.fr.van.chart.designer.other;
import com.fr.base.BaseFormula;
import com.fr.base.Utils;
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.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.attr.LargeDataAttribute; import com.fr.chartx.attr.LargeDataAttribute;
import com.fr.chartx.attr.LargeDataModeType; import com.fr.chartx.attr.LargeDataModeType;
import com.fr.design.formula.TinyFormulaPane;
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;
@ -23,17 +26,23 @@ import com.fr.plugin.chart.base.AttrEffect;
import com.fr.plugin.chart.base.AttrLabel; 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.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.map.line.condition.AttrLineEffect; import com.fr.plugin.chart.map.line.condition.AttrLineEffect;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel; 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.stable.StableUtils;
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;
import com.fr.van.chart.designer.PlotFactory; import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; 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.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;
@ -60,7 +69,18 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
private AutoRefreshPane autoRefreshPane; private AutoRefreshPane autoRefreshPane;
private ZoomPane zoomPane; //图表缩放新设计 恢复用注释。删除下面八行代码。
private UIButtonGroup zoomWidget;
protected UIButtonGroup zoomGesture;//地图手势缩放
private UIButtonGroup zoomResize;
private TinyFormulaPane from;
private TinyFormulaPane to;
private UIButtonGroup<String> zoomType;
private JPanel changeEnablePane;
private JPanel zoomTypePane;
//图表缩放新设计 恢复用注释。取消注释。
//private ZoomPane zoomPane;
protected VanChartHyperLinkPane superLink; protected VanChartHyperLinkPane superLink;
private JPanel largeModeThresholdNumberPane; private JPanel largeModeThresholdNumberPane;
@ -149,11 +169,141 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
} }
protected JPanel createZoomPane(double[] row, double[] col, VanChartPlot plot) { protected JPanel createZoomPane(double[] row, double[] col, VanChartPlot plot) {
zoomPane = createZoomPane(); //图表缩放新设计 恢复用注释。取消注释。
if (zoomPane == null) { // zoomPane = createZoomPane();
// if (zoomPane == null) {
// return null;
// }
// return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Zoom"), zoomPane);
//图表缩放新设计 恢复用注释。删除下面方法体所有代码。
if (!plot.isSupportZoomDirection()) {
return null; return null;
} }
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Zoom"), zoomPane); 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();
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")});
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);
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},
};
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
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();
}
});
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 createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) {
JPanel panel = new JPanel(new BorderLayout(0, 4));
if (plot.isSupportZoomCategoryAxis()) {//支持缩放控件
panel.add(zoomWidgetPane, BorderLayout.NORTH);
panel.add(changeEnablePane, BorderLayout.CENTER);
}
panel.add(zoomTypePane, BorderLayout.SOUTH);
return panel;
}
private void checkZoomEnabled() {
if (zoomWidget != null && axisRotation != null) {
if (axisRotation.getSelectedIndex() == 0) {
//只有开启坐标轴翻转,才需要将缩放控件强制关闭。
zoomWidget.setSelectedIndex(1);
}
checkZoomPane();
zoomWidget.setEnabled(axisRotation.getSelectedIndex() == 1);
}
}
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")};
}
protected String[] getValueArray() {
return new String[]{VanChartConstants.ZOOM_TYPE_X, VanChartConstants.ZOOM_TYPE_Y
, VanChartConstants.ZOOM_TYPE_XY, VanChartConstants.ZOOM_TYPE_NONE};
}
private void checkZoomPane() {
boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0;
changeEnablePane.setVisible(zoomWidgetEnabled);
zoomType.setEnabled(!zoomWidgetEnabled);
}
private void populateChartZoom(VanChart chart) {
VanChartZoom zoom = chart.getVanChartZoom();
if (zoom == null) {
zoom = new VanChartZoom();
}
zoomWidget.setSelectedIndex(zoom.isZoomVisible() ? 0 : 1);
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());
}
private void updateChartZoom(VanChart chart) {
VanChartZoom zoom = chart.getVanChartZoom();
if (zoom == null) {
zoom = new VanChartZoom();
chart.setVanChartZoom(zoom);
}
zoom.setZoomVisible(zoomWidget.getSelectedIndex() == 0);
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());
} }
protected ZoomPane createZoomPane() { protected ZoomPane createZoomPane() {
@ -167,6 +317,14 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
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")});
//图表缩放新设计 恢复用注释。删除下面六行代码。
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(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}
@ -285,8 +443,15 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
reLayoutContentPane(plot); reLayoutContentPane(plot);
} }
if (zoomPane != null) { //图表缩放新设计 恢复用注释。下面3行取消注释。
zoomPane.populateBean(this.chart.getZoomAttribute()); // if (zoomPane != null) {
// zoomPane.populateBean(this.chart.getZoomAttribute());
// }
//图表缩放新设计 恢复用注释。删除下面三行代码。
if (plot.isSupportZoomDirection()) {//支持缩放方向=方向+控件
populateChartZoom((VanChart) chart);
checkZoomPane();
} }
if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE) { if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE) {
@ -299,6 +464,9 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
populateAutoRefresh(this.chart); populateAutoRefresh(this.chart);
populateHyperlink(plot); populateHyperlink(plot);
//图表缩放新设计 恢复用注释。删除下面一行代码。
checkZoomEnabled();
} }
@ -359,8 +527,13 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
VanChart vanChart = (VanChart) chart; VanChart vanChart = (VanChart) chart;
VanChartPlot plot = chart.getPlot(); VanChartPlot plot = chart.getPlot();
if (zoomPane != null) { //图表缩放新设计 恢复用注释。下面3行取消注释。
vanChart.setZoomAttribute(zoomPane.updateBean()); // if (zoomPane != null) {
// vanChart.setZoomAttribute(zoomPane.updateBean());
// }
//图表缩放新设计 恢复用注释。下面3行删除。
if (plot.isSupportZoomDirection()) {
updateChartZoom((VanChart) chart);
} }
if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE) { if (plot.getAxisPlotType() == AxisPlotType.RECTANGLE) {

20
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePaneWithMapZoom.java

@ -1,15 +1,27 @@
package com.fr.van.chart.designer.other; package com.fr.van.chart.designer.other;
import com.fr.van.chart.designer.other.zoom.MapZoomPane; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.van.chart.designer.other.zoom.ZoomPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/** /**
* Created by mengao on 2017/4/7. * Created by mengao on 2017/4/7.
*/ */
public class VanChartInteractivePaneWithMapZoom extends VanChartInteractivePaneWithOutSort { public class VanChartInteractivePaneWithMapZoom extends VanChartInteractivePaneWithOutSort {
//图表缩放新设计 恢复用注释。删除下面方法 createZoomPaneContent。
@Override @Override
protected ZoomPane createZoomPane() { protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) {
return new MapZoomPane(); JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(zoomWidgetPane, BorderLayout.NORTH);
panel.add(zoomGesturePane, BorderLayout.CENTER);
return panel;
} }
//图表缩放新设计 恢复用注释。取消注释。
// @Override
// protected ZoomPane createZoomPane() {
// return new MapZoomPane();
// }
} }

7
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -7,7 +7,6 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chart.chartglyph.DataSheet; import com.fr.chart.chartglyph.DataSheet;
import com.fr.chartx.attr.ZoomAttribute;
import com.fr.chartx.data.AbstractDataDefinition; import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider; import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection; import com.fr.chartx.data.field.AbstractColumnFieldCollection;
@ -22,6 +21,7 @@ import com.fr.js.NameJavaScriptGroup;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -132,7 +132,10 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
protected void resetChartAttr(Chart chart, Plot newPlot){ protected void resetChartAttr(Chart chart, Plot newPlot){
chart.setPlot(newPlot); chart.setPlot(newPlot);
if(newPlot.isSupportZoomDirection() && !newPlot.isSupportZoomCategoryAxis()){ if(newPlot.isSupportZoomDirection() && !newPlot.isSupportZoomCategoryAxis()){
((VanChart) chart).setZoomAttribute(new ZoomAttribute()); //图表缩放新设计 恢复用注释。下面一行删除。
((VanChart) chart).setVanChartZoom(new VanChartZoom());
//图表缩放新设计 恢复用注释。下面一行取消注释。
// ((VanChart) chart).setZoomAttribute(new ZoomAttribute());
} }
//重置工具栏选项 //重置工具栏选项
((VanChart)chart).setVanChartTools(createVanChartTools()); ((VanChart)chart).setVanChartTools(createVanChartTools());

13
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java

@ -16,6 +16,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.other.VanChartOtherPane;
import com.fr.van.chart.designer.other.zoom.ZoomPane; import com.fr.van.chart.designer.other.zoom.ZoomPane;
@ -88,6 +89,18 @@ public class VanStructureChartTypeUI extends AbstractIndependentVanChartUI {
protected BasicBeanPane<Chart> createInteractivePane() { protected BasicBeanPane<Chart> createInteractivePane() {
return new VanChartInteractivePaneWithOutSort(){ return new VanChartInteractivePaneWithOutSort(){
//图表缩放新设计 恢复用注释。删除下面两个方法 getNameArray getValueArray。
@Override
protected String[] getNameArray() {
return new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_XY_Axis"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")};
}
@Override
protected String[] getValueArray() {
return new String[]{VanChartConstants.ZOOM_TYPE_XY, VanChartConstants.ZOOM_TYPE_NONE};
}
@Override @Override
protected ZoomPane createZoomPane() { protected ZoomPane createZoomPane() {
return new ZoomPaneWithOutMode(); return new ZoomPaneWithOutMode();

51
designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractMultiCategoryVanChartUI.java

@ -1,15 +1,12 @@
package com.fr.van.chart.vanchart; package com.fr.van.chart.vanchart;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane; import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane; import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane; import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane; import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane;
@ -24,10 +21,6 @@ import com.fr.plugin.chart.type.AxisType;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.data.VanChartMoreCateReportDataContentPane; import com.fr.van.chart.designer.data.VanChartMoreCateReportDataContentPane;
import com.fr.van.chart.designer.data.VanChartMoreCateTableDataContentPane; import com.fr.van.chart.designer.data.VanChartMoreCateTableDataContentPane;
import com.fr.van.chart.designer.other.VanChartInteractivePane;
import com.fr.van.chart.designer.other.VanChartOtherPane;
import com.fr.van.chart.designer.other.zoom.ZoomPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
/** /**
* Created by mengao on 2017/7/6. * Created by mengao on 2017/7/6.
@ -49,28 +42,30 @@ public abstract class AbstractMultiCategoryVanChartUI extends AbstractIndependen
return new VanChartMoreCateReportDataContentPane(parent); return new VanChartMoreCateReportDataContentPane(parent);
} }
@Override
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) {
VanChartStylePane stylePane = new VanChartStylePane(listener);
VanChartOtherPane otherPane = new VanChartOtherPane() {
@Override
protected BasicBeanPane<Chart> createInteractivePane() {
return new VanChartInteractivePane() {
@Override
protected ZoomPane createZoomPane() {
return new ZoomPane();
}
@Override //图表缩放新设计 恢复用注释。取消注释。
protected boolean isCurrentChartSupportLargeDataMode() { // @Override
return true; // public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) {
} //
}; // VanChartStylePane stylePane = new VanChartStylePane(listener);
} // VanChartOtherPane otherPane = new VanChartOtherPane() {
}; // @Override
return new AbstractChartAttrPane[]{stylePane, otherPane}; // protected BasicBeanPane<Chart> createInteractivePane() {
} // return new VanChartInteractivePane() {
// @Override
// protected ZoomPane createZoomPane() {
// return new ZoomPane();
// }
//
// @Override
// protected boolean isCurrentChartSupportLargeDataMode() {
// return true;
// }
// };
// }
// };
// return new AbstractChartAttrPane[]{stylePane, otherPane};
// }
@Override @Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { public ChartDataPane getChartDataPane(AttributeChangeListener listener) {

13
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java

@ -17,6 +17,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.other.VanChartOtherPane;
import com.fr.van.chart.designer.other.zoom.ZoomPane; import com.fr.van.chart.designer.other.zoom.ZoomPane;
@ -102,6 +103,18 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa
protected BasicBeanPane<Chart> createInteractivePane() { protected BasicBeanPane<Chart> createInteractivePane() {
return new VanChartInteractivePaneWithOutSort(){ return new VanChartInteractivePaneWithOutSort(){
//图表缩放新设计 恢复用注释。删除下面两个方法 getNameArray getValueArray。
@Override
protected String[] getNameArray() {
return new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_XY_Axis"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")};
}
@Override
protected String[] getValueArray() {
return new String[]{VanChartConstants.ZOOM_TYPE_XY, VanChartConstants.ZOOM_TYPE_NONE};
}
@Override @Override
protected ZoomPane createZoomPane() { protected ZoomPane createZoomPane() {
return new ZoomPaneWithOutMode(); return new ZoomPaneWithOutMode();

Loading…
Cancel
Save