Browse Source

Merge pull request #1162 in BA/design from ~MANGO/design:release/8.0 to release/8.0

* commit '69b3a8e1792e270da8176404c98263b4fdb23350':
  去掉ChartEditPane对Prepare4DataSourceChange接口的实现。 解决  设计器切换模板时一直触发查询   客户bug
master
superman 7 years ago
parent
commit
bb96b689f2
  1. 24
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

24
designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

@ -6,8 +6,6 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.chart.ChartEditPaneProvider; import com.fr.design.gui.chart.ChartEditPaneProvider;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
@ -24,14 +22,12 @@ import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4DataSourceChange, ChartEditPaneProvider { public class ChartEditPane extends BasicPane implements AttributeChange, ChartEditPaneProvider {
private final static int CHANGE_MIN_TIME = 80; private final static int CHANGE_MIN_TIME = 80;
@ -69,7 +65,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
paneList.add(otherPane); paneList.add(otherPane);
createTabsPane(); createTabsPane();
registerDSChangeListener();
//TableDataComboBox 中有注册DSChangeListener,这里没有必要再次注册。
//registerDSChangeListener();
} }
//构建主面板 //构建主面板
@ -130,6 +128,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
/** /**
* 重新构造面板 * 重新构造面板
*
* @param currentChart 图表 * @param currentChart 图表
*/ */
public void reLayout(Chart currentChart) { public void reLayout(Chart currentChart) {
@ -280,6 +279,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
/** /**
* 当前界面是否是默认的界面 * 当前界面是否是默认的界面
*
* @return 是否是默认的界面 * @return 是否是默认的界面
*/ */
public boolean isDefaultPane() { public boolean isDefaultPane() {
@ -320,6 +320,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
/** /**
* 主要用于图表设计器判断样式改变是否来自工具栏的全局样式按钮 * 主要用于图表设计器判断样式改变是否来自工具栏的全局样式按钮
*
* @param isFromToolBar 是否来自工具栏 * @param isFromToolBar 是否来自工具栏
*/ */
public void styleChange(boolean isFromToolBar) { public void styleChange(boolean isFromToolBar) {
@ -335,15 +336,4 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
paneList.get(index).addAttributeChangeListener(listener); paneList.get(index).addAttributeChangeListener(listener);
} }
/**
* 数据集改变的事件监听
*/
public void registerDSChangeListener() {
DesignTableDataManager.addDsChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex());
attrPane.refreshChartDataPane(collection);
}
});
}
} }
Loading…
Cancel
Save