Browse Source

xchart rename to chartProvider

research/10.0
zheng 6 years ago
parent
commit
77d9207fc4
  1. 4
      designer-base/src/main/java/com/fr/design/gui/chart/MiddleChartComponent.java
  2. 4
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  3. 6
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  4. 4
      designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java
  5. 6
      designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java
  6. 6
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  7. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  8. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  9. 4
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java

4
designer-base/src/main/java/com/fr/design/gui/chart/MiddleChartComponent.java

@ -1,7 +1,7 @@
package com.fr.design.gui.chart; package com.fr.design.gui.chart;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.stable.core.PropertyChangeListener; import com.fr.stable.core.PropertyChangeListener;
import javax.swing.JComponent; import javax.swing.JComponent;
@ -18,7 +18,7 @@ public abstract class MiddleChartComponent extends JComponent {
public abstract void reset(); public abstract void reset();
public abstract XChart getEditingChart(); public abstract ChartProvider getEditingChart();
public abstract void addStopEditingListener(PropertyChangeListener list); public abstract void addStopEditingListener(PropertyChangeListener list);
} }

4
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -5,7 +5,7 @@ import com.fr.chart.base.ChartInternationalNameContentBean;
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.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chart.fun.IndependentChartUIProvider; import com.fr.design.chart.fun.IndependentChartUIProvider;
@ -162,7 +162,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
int index = 0; int index = 0;
for (ChartInternationalNameContentBean bean : typeName) { for (ChartInternationalNameContentBean bean : typeName) {
String plotID = bean.getPlotID(); String plotID = bean.getPlotID();
XChart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); ChartProvider[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID);
if (ArrayUtils.isEmpty(rowChart) && !ChartTypeManager.innerChart(plotID)) { if (ArrayUtils.isEmpty(rowChart) && !ChartTypeManager.innerChart(plotID)) {
continue; continue;
} }

6
designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java

@ -11,7 +11,7 @@ import com.fr.chart.chartattr.ChartIcon;
import com.fr.chart.chartattr.MapPlot; import com.fr.chart.chartattr.MapPlot;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -43,7 +43,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
{ {
charts4Icon = new Chart[this.typeName.length][]; charts4Icon = new Chart[this.typeName.length][];
for (int i = 0; i < this.typeName.length; i++) { for (int i = 0; i < this.typeName.length; i++) {
XChart[] rowCharts = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.typeName[i].getPlotID()); ChartProvider[] rowCharts = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.typeName[i].getPlotID());
int rowChartsCount = rowCharts.length; int rowChartsCount = rowCharts.length;
charts4Icon[i] = new Chart[rowChartsCount]; charts4Icon[i] = new Chart[rowChartsCount];
for (int j = 0; j < rowChartsCount; j++) { for (int j = 0; j < rowChartsCount; j++) {
@ -147,7 +147,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
int subIndex = 0; int subIndex = 0;
for (int i = 0; i < typeName.length; i++) { for (int i = 0; i < typeName.length; i++) {
XChart[] charts = ChartTypeManager.getInstanceWithCheck().getChartTypes(typeName[i].getPlotID()); ChartProvider[] charts = ChartTypeManager.getInstanceWithCheck().getChartTypes(typeName[i].getPlotID());
for (int j = 0; j < charts.length; j++) { for (int j = 0; j < charts.length; j++) {
if (((Chart) charts[j]).getPlot().match4GUI(plot)) { if (((Chart) charts[j]).getPlot().match4GUI(plot)) {
mainIndex = i; mainIndex = i;

4
designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java

@ -9,7 +9,7 @@ import com.fr.chart.chartattr.Axis;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartglyph.AxisGlyph; import com.fr.chart.chartglyph.AxisGlyph;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.chart.gui.active.ActiveGlyph; import com.fr.design.chart.gui.active.ActiveGlyph;
import com.fr.design.chart.gui.active.ChartActiveGlyph; import com.fr.design.chart.gui.active.ChartActiveGlyph;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -162,7 +162,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
return (this.chartCollection4Design == null) ? 0 : this.chartCollection4Design.getChartCount(); return (this.chartCollection4Design == null) ? 0 : this.chartCollection4Design.getChartCount();
} }
public XChart getEditingChart() { public ChartProvider getEditingChart() {
return editingChart; return editingChart;
} }

6
designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java

@ -1,7 +1,7 @@
package com.fr.design.chart.gui; package com.fr.design.chart.gui;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.form.ui.ChartEditor; import com.fr.form.ui.ChartEditor;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
@ -38,8 +38,8 @@ public class ChartWidgetOption extends WidgetOption {
Class<? extends ChartEditor> clz = widgetClass(); Class<? extends ChartEditor> clz = widgetClass();
try { try {
ChartEditor widget = clz.newInstance(); ChartEditor widget = clz.newInstance();
XChart chart = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.chartID)[0]; ChartProvider chart = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.chartID)[0];
widget.addChart((XChart) chart.clone()); widget.addChart((ChartProvider) chart.clone());
return widget; return widget;
} catch (InstantiationException e) { } catch (InstantiationException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);

6
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java

@ -6,7 +6,7 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.hyperlink.AbstractHyperLinkPane; import com.fr.design.hyperlink.AbstractHyperLinkPane;
@ -67,10 +67,10 @@ public class ChartHyperPoplinkPane extends AbstractHyperLinkPane<ChartHyperPopli
private ChartCollection createChartCollection() { private ChartCollection createChartCollection() {
ChartCollection cc = new ChartCollection(); ChartCollection cc = new ChartCollection();
XChart chart = ChartTypeManager.getInstanceWithCheck().getFirstChart(); ChartProvider chart = ChartTypeManager.getInstanceWithCheck().getFirstChart();
if (chart != null) { if (chart != null) {
try { try {
cc.addChart((XChart) chart.clone()); cc.addChart((ChartProvider) chart.clone());
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }

6
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -5,7 +5,7 @@ import com.fr.chart.base.AttrChangeConfig;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.SwitchState; import com.fr.chart.chartattr.SwitchState;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionListener; import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
@ -135,9 +135,9 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
if (editingCollection != null) { if (editingCollection != null) {
//点击添加按钮,则会触发切换状态 //点击添加按钮,则会触发切换状态
XChart chart = editingCollection.getChangeStateNewChart(); ChartProvider chart = editingCollection.getChangeStateNewChart();
try { try {
XChart newChart = (XChart) chart.clone(); ChartProvider newChart = (ChartProvider) chart.clone();
editingCollection.addNamedChart(name, newChart); editingCollection.addNamedChart(name, newChart);
} catch (CloneNotSupportedException e1) { } catch (CloneNotSupportedException e1) {
FineLoggerFactory.getLogger().error("Error in Clone"); FineLoggerFactory.getLogger().error("Error in Clone");

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -17,7 +17,7 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartattr.Title; import com.fr.chart.chartattr.Title;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.charttypes.BarIndependentChart; import com.fr.chart.charttypes.BarIndependentChart;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chart.series.PlotStyle.ChartSelectDemoPane; import com.fr.design.chart.series.PlotStyle.ChartSelectDemoPane;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -617,7 +617,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
return typePane; return typePane;
} }
public XChart getDefaultChart() { public ChartProvider getDefaultChart() {
return BarIndependentChart.barChartTypes[0]; return BarIndependentChart.barChartTypes[0];
} }
} }

4
designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java

@ -2,7 +2,7 @@ package com.fr.extended.chart;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.XChart; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
@ -66,7 +66,7 @@ public class ExtendedTypePane<T extends AbstractChart> extends AbstractChartType
} }
@Override @Override
public XChart getDefaultChart() { public ChartProvider getDefaultChart() {
return ChartTypeManager.getInstance().getChartTypes(getPlotID())[0]; return ChartTypeManager.getInstance().getChartTypes(getPlotID())[0];
} }

Loading…
Cancel
Save