Browse Source

Merge pull request #822 in BA/design from ~MANGO/design:master to master

* commit 'fed1ceaeea3185789c5a78b17671d7f29afe7850':
  面板中增加一些接口方法(Vancharts新插件发布需要,eason与FR商讨确认,可以直接修改master)
  调整布局
  还原代码,修改客户bug
master
superman 8 years ago
parent
commit
25c4fa32ff
  1. 29
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

29
designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -25,6 +25,10 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
private ChartDataPane parent; private ChartDataPane parent;
protected AbstractTableDataContentPane getDataContentPane() {
return dataContentPane;
}
public TableDataPane(ChartDataPane parent) { public TableDataPane(ChartDataPane parent) {
this.parent = parent; this.parent = parent;
initDataPane(); initDataPane();
@ -103,15 +107,18 @@ 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 = getContentPane(collection.getSelectedChart().getPlot()); dataContentPane = contentPane;
if(dataContentPane != null) { if(dataContentPane != null) {
add(dataContentPane, BorderLayout.CENTER); add(dataContentPane, BorderLayout.CENTER);
} }
} }
/** /**
* 更新界面属性 * 更新界面属性
*/ */
@ -120,17 +127,21 @@ 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(data != null) { if(dataDefinition != null) {
tableData = data.getTableData(); tableData = dataDefinition.getTableData();
} }
onSelectTableData(); onSelectTableData();
checkBoxUse(); checkBoxUse();
tableDataPane.populateBean(tableData); tableDataPane.populateBean(tableData);
if(dataContentPane != null) {
dataContentPane.populateBean(collection);
}
} }
/** /**
@ -141,6 +152,10 @@ 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){

Loading…
Cancel
Save