package com.dev.fbs9600_zdhj;
|
|
import javax.swing.JPanel;
|
|
import java.awt.GridLayout;
|
|
import javax.swing.border.TitledBorder;
|
|
import com.teechart.TBarChart_fbs;
|
|
import java.awt.BorderLayout;
|
|
public class zdhj_page_chart extends JPanel {
|
private TBarChart_fbs m_TBarMonVolChart;
|
private TBarChart_fbs m_TBarMonTmpChart;
|
private TBarChart_fbs m_TBarMonResChart;
|
private TBarChart_fbs m_TBarMonCurrChart;
|
private SPCommZDHJ SerialComm_ZDHJ = null;
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* Create the panel.
|
*/
|
public zdhj_page_chart() {
|
setLayout(new GridLayout(0, 2, 0, 0));
|
|
JPanel panel = new JPanel();
|
panel.setBorder(new TitledBorder(null, "\u5355\u4F53\u7535\u538B(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
add(panel);
|
panel.setLayout(new BorderLayout(0, 0));
|
m_TBarMonVolChart = new TBarChart_fbs(TBarChart_fbs.Bar_Type_MonVol);
|
panel.add(m_TBarMonVolChart, BorderLayout.CENTER);
|
|
JPanel panel_1 = new JPanel();
|
panel_1.setBorder(new TitledBorder(null, "\u5355\u4F53\u6E29\u5EA6(\u2103)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
add(panel_1);
|
panel_1.setLayout(new BorderLayout(0, 0));
|
m_TBarMonTmpChart = new TBarChart_fbs(TBarChart_fbs.Bar_Type_MonTmp);
|
panel_1.add(m_TBarMonTmpChart, BorderLayout.CENTER);
|
|
JPanel panel_2 = new JPanel();
|
panel_2.setBorder(new TitledBorder(null, "\u5355\u4F53\u5185\u963B(m\u03A9)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
add(panel_2);
|
panel_2.setLayout(new BorderLayout(0, 0));
|
m_TBarMonResChart = new TBarChart_fbs(TBarChart_fbs.Bar_Type_MonRes);
|
panel_2.add(m_TBarMonResChart, BorderLayout.CENTER);
|
|
JPanel panel_3 = new JPanel();
|
panel_3.setBorder(new TitledBorder(null, "\u5355\u4F53\u5747\u8861\u7535\u6D41(mA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
add(panel_3);
|
panel_3.setLayout(new BorderLayout(0, 0));
|
m_TBarMonCurrChart = new TBarChart_fbs(TBarChart_fbs.Bar_Type_MonSer);
|
panel_3.add(m_TBarMonCurrChart, BorderLayout.CENTER);
|
|
}
|
|
public void setSerialComm_ZDHJ(SPCommZDHJ sz) {
|
SerialComm_ZDHJ = sz;
|
}
|
|
public void updateDate() {
|
if(null == SerialComm_ZDHJ) {
|
return;
|
}
|
|
int mon_cnt = SerialComm_ZDHJ.ZDHJ_BattCount;
|
m_TBarMonVolChart.updateChartData(TBarChart_fbs.Bar_Type_MonVol, SerialComm_ZDHJ.monVol, mon_cnt);
|
m_TBarMonResChart.updateChartData(TBarChart_fbs.Bar_Type_MonRes, SerialComm_ZDHJ.monRes, mon_cnt);
|
m_TBarMonTmpChart.updateChartData(TBarChart_fbs.Bar_Type_MonTmp, SerialComm_ZDHJ.monTmp, mon_cnt);
|
m_TBarMonCurrChart.updateChartData(TBarChart_fbs.Bar_Type_MonSer, SerialComm_ZDHJ.monJHCurr, mon_cnt);
|
}
|
}
|