|
|
|
@ -6,6 +6,8 @@ import com.fr.chart.chartattr.Chart;
|
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
|
import com.fr.design.ChartTypeInterfaceManager; |
|
|
|
|
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.gui.chart.ChartEditPaneProvider; |
|
|
|
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
|
|
@ -22,12 +24,23 @@ import com.fr.general.FRLogger;
|
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Calendar; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
public class ChartEditPane extends BasicPane implements AttributeChange, ChartEditPaneProvider { |
|
|
|
|
public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4DataSourceChange, ChartEditPaneProvider { |
|
|
|
|
|
|
|
|
|
public synchronized static ChartEditPane getInstance() { |
|
|
|
|
if (singleton == null) { |
|
|
|
|
singleton = new ChartEditPane(); |
|
|
|
|
} |
|
|
|
|
return singleton; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static ChartEditPane singleton; |
|
|
|
|
|
|
|
|
|
private final static int CHANGE_MIN_TIME = 80; |
|
|
|
|
|
|
|
|
@ -65,9 +78,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange, ChartEd
|
|
|
|
|
paneList.add(otherPane); |
|
|
|
|
|
|
|
|
|
createTabsPane(); |
|
|
|
|
|
|
|
|
|
//TableDataComboBox 中有注册DSChangeListener,这里没有必要再次注册。
|
|
|
|
|
//registerDSChangeListener();
|
|
|
|
|
registerDSChangeListener(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//构建主面板
|
|
|
|
@ -128,7 +139,6 @@ public class ChartEditPane extends BasicPane implements AttributeChange, ChartEd
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 重新构造面板 |
|
|
|
|
* |
|
|
|
|
* @param currentChart 图表 |
|
|
|
|
*/ |
|
|
|
|
public void reLayout(Chart currentChart){ |
|
|
|
@ -279,7 +289,6 @@ public class ChartEditPane extends BasicPane implements AttributeChange, ChartEd
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 当前界面是否是默认的界面 |
|
|
|
|
* |
|
|
|
|
* @return 是否是默认的界面 |
|
|
|
|
*/ |
|
|
|
|
public boolean isDefaultPane(){ |
|
|
|
@ -320,7 +329,6 @@ public class ChartEditPane extends BasicPane implements AttributeChange, ChartEd
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
*主要用于图表设计器,判断样式改变是否来自工具栏的全局样式按钮 |
|
|
|
|
* |
|
|
|
|
* @param isFromToolBar 是否来自工具栏 |
|
|
|
|
*/ |
|
|
|
|
public void styleChange(boolean isFromToolBar){ |
|
|
|
@ -336,4 +344,15 @@ public class ChartEditPane extends BasicPane implements AttributeChange, ChartEd
|
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |