Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~wim.zhai/Xdesign into release/10.0

final/10.0
Wim.Zhai 6 years ago
parent
commit
8e545d846a
  1. 8
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  2. 14
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  3. 19
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java
  4. 28
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java
  5. 28
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedStylePane.java
  6. 44
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java
  7. 4
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataPane.java

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

@ -278,6 +278,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
} }
return name; return name;
} }
public String getTitle4PopupWindow(String plotID) {
IndependentChartUIProvider provider = getChartTypeInterface(plotID);
if (provider != null) {
return provider.getPlotTypeTitle4PopupWindow();
}
return StringUtils.EMPTY;
}
/** /**
* 获取指定图表的标题 * 获取指定图表的标题

14
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -1,8 +1,8 @@
package com.fr.design.mainframe.chart.gui.data; package com.fr.design.mainframe.chart.gui.data;
import com.fr.base.TableData; import com.fr.base.TableData;
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.chartdata.TableDataDefinition; import com.fr.chart.chartdata.TableDataDefinition;
import com.fr.chart.chartdata.TopDefinition; import com.fr.chart.chartdata.TopDefinition;
import com.fr.data.impl.NameTableData; import com.fr.data.impl.NameTableData;
@ -14,9 +14,9 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import javax.swing.BorderFactory;
import javax.swing.*; import java.awt.BorderLayout;
import java.awt.*; import java.awt.Dimension;
public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
private static final long serialVersionUID = 4740461028440155147L; private static final long serialVersionUID = 4740461028440155147L;
@ -72,8 +72,8 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
} }
} }
protected AbstractTableDataContentPane getContentPane(Plot plot) { protected AbstractTableDataContentPane getContentPane(Chart chart) {
return ChartTypeInterfaceManager.getInstance().getTableDataSourcePane(plot, parent); return ChartTypeInterfaceManager.getInstance().getTableDataSourcePane(chart.getPlot(), parent);
} }
/** /**
@ -106,7 +106,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
* @param collection 图表属性的集合 * @param collection 图表属性的集合
*/ */
public void refreshContentPane(ChartCollection collection) { public void refreshContentPane(ChartCollection collection) {
refreshContentPane(getContentPane(collection.getSelectedChart().getPlot())); refreshContentPane(getContentPane(collection.getSelectedChart()));
} }
protected void refreshContentPane(AbstractTableDataContentPane contentPane) { protected void refreshContentPane(AbstractTableDataContentPane contentPane) {

19
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java

@ -58,17 +58,20 @@ public abstract class AbstractExtendedChartReportDataPane<T extends AbstractData
protected abstract T update(); protected abstract T update();
public void populateBean(ChartCollection collection) { public void populateBean(ChartCollection collection) {
if (collection == null || collection.getSelectedChart() == null) {
return;
}
Chart chart = collection.getSelectedChart();
if (collection != null) { if (chart.getFilterDefinition() instanceof ExtendedReportDataSet) {
Chart chart = collection.getSelectedChart(); ExtendedReportDataSet dataSet = (ExtendedReportDataSet) chart.getFilterDefinition();
if (chart != null && chart instanceof AbstractChart) { AbstractDataConfig dataConfig = dataSet.getDataConfig();
AbstractDataConfig dataConfig = ((AbstractChart) chart).getDataConfig();
if (dataConfig != null) { if (dataConfig != null) {
populate((T) dataConfig); populate((T) dataConfig);
}
} }
} }
} }

28
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java

@ -84,20 +84,26 @@ public abstract class AbstractExtendedChartTableDataPane<T extends AbstractDataC
@Override @Override
public void populateBean(ChartCollection collection) { public void populateBean(ChartCollection collection) {
if (collection == null || collection.getSelectedChart() == null) {
return;
}
if (collection != null) { Chart chart = collection.getSelectedChart();
Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart) { if (chart.getFilterDefinition() instanceof ExtendedTableDataSet) {
AbstractDataConfig dataConfig = ((AbstractChart) chart).getDataConfig(); ExtendedTableDataSet dataSet = (ExtendedTableDataSet) chart.getFilterDefinition();
if (dataConfig != null) {
populate((T) dataConfig); AbstractDataConfig dataConfig = dataSet.getDataConfig();
} if (dataConfig != null) {
if (hasFunction() && chart.getFilterDefinition() instanceof ExtendedTableDataSet) { populate((T) dataConfig);
ExtendedTableDataSet dataSet = (ExtendedTableDataSet) chart.getFilterDefinition();
function.populateBean((AbstractDataFunction) dataSet.getDataFunction());
}
} }
if (hasFunction()) {
function.populateBean((AbstractDataFunction) dataSet.getDataFunction());
}
} }
} }

28
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedStylePane.java

@ -38,6 +38,20 @@ public abstract class AbstractExtendedStylePane<T extends AbstractChart> extends
this.listener = listener; this.listener = listener;
} }
protected void setChart(Chart chart) {
if (chart instanceof AbstractChart) {
this.chart = (T) chart;
}
}
protected T getChart() {
return this.chart;
}
protected AttributeChangeListener getListener() {
return this.listener;
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
@ -95,8 +109,11 @@ public abstract class AbstractExtendedStylePane<T extends AbstractChart> extends
if (collection != null) { if (collection != null) {
Chart chart = collection.getSelectedChart(); Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart){ if (chart != null) {
this.chart = (T)chart; setChart(chart);
}
if (this.chart != null) {
paneList.get(tabPane.getSelectedIndex()).populateBean(this.chart); paneList.get(tabPane.getSelectedIndex()).populateBean(this.chart);
} }
@ -109,8 +126,11 @@ public abstract class AbstractExtendedStylePane<T extends AbstractChart> extends
if (collection != null) { if (collection != null) {
Chart chart = collection.getSelectedChart(); Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart){ if (chart != null) {
this.chart = (T)chart; setChart(chart);
}
if (this.chart != null) {
paneList.get(tabPane.getSelectedIndex()).updateBean(this.chart); paneList.get(tabPane.getSelectedIndex()).updateBean(this.chart);
} }

44
designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java

@ -9,7 +9,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -28,29 +27,42 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
private UISpinner autoRefreshTime; private UISpinner autoRefreshTime;
private JPanel contentPane; private JPanel contentPane;
protected AbstractChart getAbstractChart(Chart chart) {
if (chart != null && chart instanceof AbstractChart) {
return (AbstractChart) chart;
}
return null;
}
@Override @Override
public void populate(ChartCollection collection) { public void populate(ChartCollection collection) {
if (collection != null) { if (collection == null || collection.getSelectedChart() == null) {
Chart chart = collection.getSelectedChart(); return;
if (chart != null && chart instanceof AbstractChart) { }
hyperLinkPane.populateBean((AbstractChart) chart);
autoRefreshTime.setValue(((AbstractChart) chart).getAutoRefreshTime()); AbstractChart chart = getAbstractChart(collection.getSelectedChart());
refreshEnabled.setSelectedIndex(((AbstractChart) chart).isRefreshEnabled() ? 0 : 1);
checkRefreshEnable(); if (chart != null) {
} hyperLinkPane.populateBean(chart);
autoRefreshTime.setValue(chart.getAutoRefreshTime());
refreshEnabled.setSelectedIndex(chart.isRefreshEnabled() ? 0 : 1);
checkRefreshEnable();
} }
} }
@Override @Override
public void update(ChartCollection collection) { public void update(ChartCollection collection) {
if (collection != null) { if (collection == null || collection.getSelectedChart() == null) {
Chart chart = collection.getSelectedChart(); return;
if (chart != null && chart instanceof AbstractChart) { }
hyperLinkPane.updateBean((AbstractChart) chart);
((AbstractChart) chart).setAutoRefreshTime(autoRefreshTime.getValue()); AbstractChart chart = getAbstractChart(collection.getSelectedChart());
((AbstractChart) chart).setRefreshEnabled(refreshEnabled.getSelectedIndex() == 0);
} if (chart != null) {
hyperLinkPane.updateBean(chart);
chart.setAutoRefreshTime(autoRefreshTime.getValue());
chart.setRefreshEnabled(refreshEnabled.getSelectedIndex() == 0);
} }
} }

4
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataPane.java

@ -1,6 +1,6 @@
package com.fr.van.chart.gantt.designer.data.link; package com.fr.van.chart.gantt.designer.data.link;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Chart;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.TableDataPane; import com.fr.design.mainframe.chart.gui.data.TableDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
@ -14,7 +14,7 @@ public class GanttLinkTableDataPane extends TableDataPane {
} }
@Override @Override
protected AbstractTableDataContentPane getContentPane(Plot plot) { protected AbstractTableDataContentPane getContentPane(Chart chart) {
return new GanttLinkTableDataContentPane(); return new GanttLinkTableDataContentPane();
} }
} }

Loading…
Cancel
Save