|
|
@ -1,8 +1,7 @@ |
|
|
|
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.ChartCollection; |
|
|
|
import com.fr.chart.chartattr.*; |
|
|
|
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; |
|
|
@ -12,7 +11,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; |
|
|
|
import com.fr.design.gui.ilable.BoldFontTextLabel; |
|
|
|
import com.fr.design.gui.ilable.BoldFontTextLabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
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.*; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
@ -24,10 +23,6 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{ |
|
|
|
private DatabaseTableDataPane tableDataPane; |
|
|
|
private DatabaseTableDataPane tableDataPane; |
|
|
|
private AbstractTableDataContentPane dataContentPane; |
|
|
|
private AbstractTableDataContentPane dataContentPane; |
|
|
|
|
|
|
|
|
|
|
|
protected AbstractTableDataContentPane getDataContentPane() { |
|
|
|
|
|
|
|
return dataContentPane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChartDataPane parent; |
|
|
|
private ChartDataPane parent; |
|
|
|
|
|
|
|
|
|
|
|
public TableDataPane(ChartDataPane parent) { |
|
|
|
public TableDataPane(ChartDataPane parent) { |
|
|
@ -108,20 +103,15 @@ 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())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void refreshContentPane(AbstractTableDataContentPane contentPane) { |
|
|
|
|
|
|
|
if(dataContentPane != null) { |
|
|
|
if(dataContentPane != null) { |
|
|
|
remove(dataContentPane); |
|
|
|
remove(dataContentPane); |
|
|
|
} |
|
|
|
} |
|
|
|
dataContentPane = contentPane; |
|
|
|
dataContentPane = getContentPane(collection.getSelectedChart().getPlot()); |
|
|
|
if(dataContentPane != null) { |
|
|
|
if(dataContentPane != null) { |
|
|
|
add(dataContentPane, BorderLayout.CENTER); |
|
|
|
add(dataContentPane, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 更新界面属性 |
|
|
|
* 更新界面属性 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -130,21 +120,17 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{ |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
TableDataDefinition data = (TableDataDefinition)collection.getSelectedChart().getFilterDefinition(); |
|
|
|
TableDataDefinition data = (TableDataDefinition)collection.getSelectedChart().getFilterDefinition(); |
|
|
|
populateDSName(data); |
|
|
|
|
|
|
|
if(dataContentPane != null) { |
|
|
|
|
|
|
|
dataContentPane.populateBean(collection); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected void populateDSName(TableDataDefinition dataDefinition){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TableData tableData = null; |
|
|
|
TableData tableData = null; |
|
|
|
if(dataDefinition != null) { |
|
|
|
if(data != null) { |
|
|
|
tableData = dataDefinition.getTableData(); |
|
|
|
tableData = data.getTableData(); |
|
|
|
} |
|
|
|
} |
|
|
|
onSelectTableData(); |
|
|
|
onSelectTableData(); |
|
|
|
checkBoxUse(); |
|
|
|
checkBoxUse(); |
|
|
|
|
|
|
|
|
|
|
|
tableDataPane.populateBean(tableData); |
|
|
|
tableDataPane.populateBean(tableData); |
|
|
|
|
|
|
|
if(dataContentPane != null) { |
|
|
|
|
|
|
|
dataContentPane.populateBean(collection); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -155,10 +141,6 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{ |
|
|
|
dataContentPane.updateBean(collection); |
|
|
|
dataContentPane.updateBean(collection); |
|
|
|
} |
|
|
|
} |
|
|
|
TopDefinition dataDefinition = (TopDefinition)collection.getSelectedChart().getFilterDefinition(); |
|
|
|
TopDefinition dataDefinition = (TopDefinition)collection.getSelectedChart().getFilterDefinition(); |
|
|
|
updateDSName(dataDefinition); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void updateDSName(TopDefinition dataDefinition) { |
|
|
|
|
|
|
|
if(dataDefinition instanceof TableDataDefinition) { |
|
|
|
if(dataDefinition instanceof TableDataDefinition) { |
|
|
|
TableDataWrapper tableDataWrapper = tableDataPane.getTableDataWrapper(); |
|
|
|
TableDataWrapper tableDataWrapper = tableDataPane.getTableDataWrapper(); |
|
|
|
if (dataDefinition != null && tableDataWrapper != null){ |
|
|
|
if (dataDefinition != null && tableDataWrapper != null){ |
|
|
|