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