|
|
|
@ -9,9 +9,7 @@ import com.fr.design.dialog.BasicScrollPane;
|
|
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
|
import com.fr.design.gui.chart.MiddleChartDialog; |
|
|
|
|
import com.fr.design.gui.frpane.UIComboBoxPane; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.mainframe.chart.AbstractChartAttrPane; |
|
|
|
|
import com.fr.design.mainframe.chart.ChartEditPane; |
|
|
|
@ -39,6 +37,7 @@ import java.awt.event.ItemListener;
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 图表 属性表, 类型选择 界面. |
|
|
|
|
* |
|
|
|
|
* @author kunsnat E-mail:kunsnat@gmail.com |
|
|
|
|
* @version 创建时间:2012-12-26 上午10:56:51 |
|
|
|
|
*/ |
|
|
|
@ -47,10 +46,11 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
private ChartTypeButtonPane buttonPane; |
|
|
|
|
private ChartEditPane editPane; |
|
|
|
|
private ChartCollection editingCollection; |
|
|
|
|
private UIButton autoButton; |
|
|
|
|
private ActionListener autoButtonListener; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected JPanel createContentPane() { |
|
|
|
|
initButtonListener(); |
|
|
|
|
JPanel content = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
|
|
buttonPane = new ChartTypeButtonPane(this); |
|
|
|
@ -88,11 +88,6 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
|
|
|
|
|
buttonPane.setEditingChartPane(chartTypeComBox); |
|
|
|
|
|
|
|
|
|
if(ChartTypeManager.AUTO_CHART) { |
|
|
|
|
initAutoButton(); |
|
|
|
|
content.add(autoButton, BorderLayout.SOUTH); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return content; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -105,16 +100,15 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 界面标题 |
|
|
|
|
* |
|
|
|
|
* @return 界面标题 |
|
|
|
|
*/ |
|
|
|
|
public String title4PopupWindow() { |
|
|
|
|
return PaneTitleConstants.CHART_TYPE_TITLE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initAutoButton(){ |
|
|
|
|
//TODO @Bjorn 视觉样式优化
|
|
|
|
|
autoButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_M_Popup_Auto_Chart_Type")); |
|
|
|
|
autoButton.addActionListener(new ActionListener() { |
|
|
|
|
public void initButtonListener() { |
|
|
|
|
autoButtonListener = new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
final MiddleChartDialog autoChartDialog = DesignModuleFactory.getAutoChartDialog(DesignerContext.getDesignerFrame()); |
|
|
|
@ -127,7 +121,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
}); |
|
|
|
|
autoChartDialog.setVisible(true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class ComboBoxPane extends UIComboBoxPane<ChartProvider> { |
|
|
|
@ -137,7 +131,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
protected List<FurtherBasicBeanPane<? extends ChartProvider>> initPaneList() { |
|
|
|
|
List<FurtherBasicBeanPane<? extends ChartProvider>> paneList = new ArrayList<FurtherBasicBeanPane<? extends ChartProvider>>(); |
|
|
|
|
allChartTypePane = new LinkedHashMap<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>>(); |
|
|
|
|
ChartTypeInterfaceManager.getInstance().addPlotTypePaneList(paneList, allChartTypePane); |
|
|
|
|
ChartTypeInterfaceManager.getInstance().addPlotTypePaneList(paneList, allChartTypePane, autoButtonListener); |
|
|
|
|
return paneList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -150,6 +144,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
* 不同图表切换分同一个selected的不同图表切换和不同selected的不同图表切换 |
|
|
|
|
* 如果是切换图表的某个图表发生变化,则collection的选择下标不会变 |
|
|
|
|
* 如果是切换图表的不同图表之间切换,则collection的选择下标会改变 |
|
|
|
|
* |
|
|
|
|
* @param chart |
|
|
|
|
*/ |
|
|
|
|
public void updateBean(ChartProvider chart) { |
|
|
|
@ -323,6 +318,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 面板重构 |
|
|
|
|
* |
|
|
|
|
* @param lastPlotID |
|
|
|
|
* @param collection |
|
|
|
|
*/ |
|
|
|
@ -373,6 +369,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 所有图表的类型界面 |
|
|
|
|
* |
|
|
|
|
* @return 类型界面 |
|
|
|
|
*/ |
|
|
|
|
public FurtherBasicBeanPane[] getPaneList() { |
|
|
|
@ -381,6 +378,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 当前选中的图表的index |
|
|
|
|
* |
|
|
|
|
* @return 当前选中的图表的index |
|
|
|
|
*/ |
|
|
|
|
public int getSelectedIndex() { |
|
|
|
@ -389,6 +387,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 返回选中的图表的index |
|
|
|
|
* |
|
|
|
|
* @return 选中的图标的序号 |
|
|
|
|
*/ |
|
|
|
|
public int getSelectedChartIndex() { |
|
|
|
@ -397,6 +396,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 设置下编辑的面板 |
|
|
|
|
* |
|
|
|
|
* @param currentEditPane 设置下编辑的面板 |
|
|
|
|
*/ |
|
|
|
|
public void registerChartEditPane(ChartEditPane currentEditPane) { |
|
|
|
|