| | |
| | | add(tabbedPane, BorderLayout.CENTER); |
| | | |
| | | JPanel panel_11 = new JPanel(); |
| | | tabbedPane.addTab("\u57FA\u672C\u6D4B\u8BD5", new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png")), panel_11, null); |
| | | //基本测试 |
| | | tabbedPane.addTab("\u57FA\u672C\u6D4B\u8BD5", new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png")), panel_11, null); |
| | | panel_11.setLayout(new BorderLayout(0, 0)); |
| | | |
| | | JPanel panel_1 = new JPanel(); |
| | |
| | | JPanel panel_2 = new JPanel(); |
| | | panel.add(panel_2, BorderLayout.NORTH); |
| | | panel_2.setLayout(new GridLayout(5, 2, 0, 0)); |
| | | panel_2.setBorder(new TitledBorder(null, "\u6a21\u5757\u72b6\u6001\u4fe1\u606f", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | |
| | | JPanel panel_4 = new JPanel(); |
| | | //模块版本 |
| | | panel_4.setBorder(new TitledBorder(null, "\u6A21\u5757\u7248\u672C", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_4); |
| | | panel_4.setLayout(new BorderLayout(0, 0)); |
| | |
| | | panel_4.add(tf_zdhj_version); |
| | | tf_zdhj_version.setColumns(10); |
| | | |
| | | |
| | | JPanel panel_3 = new JPanel(); |
| | | //单体总数 |
| | | panel_3.setBorder(new TitledBorder(null, "\u5355\u4F53\u603B\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_3); |
| | | panel_3.setLayout(new BorderLayout(0, 0)); |
| | |
| | | tf_zdhj_moncount.setColumns(10); |
| | | |
| | | JPanel panel_5 = new JPanel(); |
| | | panel_5.setBorder(new TitledBorder(null, "\u7EC4\u7AEF\u7535\u538B(V) / \u7535\u6D41(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | //组端电压(V) / 电流(A) |
| | | panel_5.setBorder(new TitledBorder(null, "\u7EC4\u7AEF\u7535\u538B(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_5); |
| | | panel_5.setLayout(new GridLayout(0, 1, 0, 0)); |
| | | |
| | |
| | | panel_5.add(tf_zdhj_zdvol); |
| | | tf_zdhj_zdvol.setColumns(10); |
| | | |
| | | |
| | | JPanel panel_16 = new JPanel(); |
| | | //组端电流(A) |
| | | panel_16.setBorder(new TitledBorder(null, "\u7EC4\u7AEF\u7535\u6D41(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_16); |
| | | panel_16.setLayout(new GridLayout(0, 1, 0, 0)); |
| | | |
| | | tf_zdhj_curr = new JTextField(); |
| | | panel_5.add(tf_zdhj_curr); |
| | | panel_16.add(tf_zdhj_curr); |
| | | tf_zdhj_curr.setColumns(10); |
| | | |
| | | JPanel panel_6 = new JPanel(); |
| | | //模块状态 |
| | | panel_6.setBorder(new TitledBorder(null, "\u6A21\u5757\u72B6\u6001", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_6); |
| | | panel_6.setLayout(new BorderLayout(0, 0)); |
| | | |
| | | |
| | | cb_zdhj_state = new JComboBox(); |
| | | //正常采集/内阻测试/单体编号 |
| | | cb_zdhj_state.setModel(new DefaultComboBoxModel(new String[] {"\u6B63\u5E38\u91C7\u96C6", "\u5185\u963B\u6D4B\u8BD5", "\u5355\u4F53\u7F16\u53F7"})); |
| | | panel_6.add(cb_zdhj_state); |
| | | |
| | | |
| | | JPanel panel_17 = new JPanel(); |
| | | //组端电流(A) |
| | | panel_17.setBorder(new TitledBorder(null, "\u5185\u963B\u5DF2\u6D4B\u6B21\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_17); |
| | | panel_17.setLayout(new GridLayout(0, 1, 0, 0)); |
| | | |
| | | |
| | | JPanel panel_7 = new JPanel(); |
| | | //电流方向 |
| | | panel_7.setBorder(new TitledBorder(null, "\u7535\u6D41\u65B9\u5411", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_7); |
| | | panel_7.setLayout(new BorderLayout(0, 0)); |
| | |
| | | panel_7.add(cb_zdhj_curr_dir); |
| | | |
| | | JPanel panel_8 = new JPanel(); |
| | | //电池状态 |
| | | panel_8.setBorder(new TitledBorder(null, "\u7535\u6C60\u72B6\u6001", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_8); |
| | | panel_8.setLayout(new BorderLayout(0, 0)); |
| | | |
| | | cb_zdhj_batt_state = new JComboBox(); |
| | | //浮充状态 |
| | | cb_zdhj_batt_state.setModel(new DefaultComboBoxModel(new String[] {"\u6D6E\u5145\u72B6\u6001", "\u653E\u7535\u72B6\u6001", "\u5145\u7535\u72B6\u6001"})); |
| | | panel_8.add(cb_zdhj_batt_state); |
| | | |
| | | JPanel panel_9 = new JPanel(); |
| | | //平均因子 |
| | | panel_9.setBorder(new TitledBorder(null, "\u5E73\u5747\u56E0\u5B50", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_9); |
| | | panel_9.setLayout(new BorderLayout(0, 0)); |
| | |
| | | tf_wenbo_curr_avg.setColumns(10); |
| | | |
| | | JPanel panel_10 = new JPanel(); |
| | | //峰值因子 |
| | | panel_10.setBorder(new TitledBorder(null, "\u5CF0\u503C\u56E0\u5B50", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_2.add(panel_10); |
| | | panel_10.setLayout(new BorderLayout(0, 0)); |
| | |
| | | |
| | | JPanel panel_13 = new JPanel(); |
| | | panel.add(panel_13, BorderLayout.SOUTH); |
| | | panel_13.setLayout(new GridLayout(2, 0, 0, 0)); |
| | | panel_13.setLayout(new GridLayout(2, 0, 0, 0)); |
| | | panel_13.setBorder(new TitledBorder(null, "\u5185\u963b\u6d4b\u8bd5", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | |
| | | |
| | | |
| | | JPanel panel_14 = new JPanel(); |
| | | panel_14.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u5185\u963B\u6D4B\u8BD5\u65B9\u6CD5 / \u5185\u963B\u5DF2\u6D4B\u6B21\u6570 / \u64CD\u4F5C", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0))); |
| | | //内阻测试方法 / 操作 / 内阻已测次数 |
| | | panel_14.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u5185\u963B\u6D4B\u8BD5\u65B9\u6CD5 / \u64CD\u4F5C ", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0))); |
| | | panel_13.add(panel_14); |
| | | panel_14.setLayout(new BoxLayout(panel_14, BoxLayout.X_AXIS)); |
| | | |
| | | cb_zdhj_current_res_test_mode = new JComboBox(); |
| | | //单节放电/同时放电/录播 |
| | | cb_zdhj_current_res_test_mode.setModel(new DefaultComboBoxModel(new String[] {"\u5355\u8282\u653E\u7535", "\u540C\u65F6\u653E\u7535", "\u5F55\u64AD"})); |
| | | panel_14.add(cb_zdhj_current_res_test_mode); |
| | | |
| | | tf_zdhj_res_test_count = new JTextField(); |
| | | panel_14.add(tf_zdhj_res_test_count); |
| | | tf_zdhj_res_test_count.setColumns(10); |
| | | |
| | | btn_zdhj_restest_start = new JButton("\u542F\u52A8"); |
| | | //启动 |
| | | //btn_zdhj_restest_start = new JButton("\u542F\u52A8"); |
| | | btn_zdhj_restest_start = new JButton("\u542f\u52a8\u5185\u963b\u6d4b\u8bd5"); |
| | | btn_zdhj_restest_start.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | | if(null == Comm_ZDHJ) { |
| | |
| | | }); |
| | | panel_14.add(btn_zdhj_restest_start); |
| | | |
| | | btn_zdhj_restest_stop = new JButton("\u505C\u6B62"); |
| | | //ֹͣ |
| | | //btn_zdhj_restest_stop = new JButton("\u505C\u6B62"); |
| | | btn_zdhj_restest_stop = new JButton("\u505c\u6b62\u5185\u963b\u6d4b\u8bd5"); |
| | | btn_zdhj_restest_stop.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent e) { |
| | | if(null == Comm_ZDHJ) { |
| | |
| | | }); |
| | | panel_14.add(btn_zdhj_restest_stop); |
| | | |
| | | //内阻已测次数 |
| | | tf_zdhj_res_test_count = new JTextField(); |
| | | //panel_14.add(tf_zdhj_res_test_count); |
| | | panel_17.add(tf_zdhj_res_test_count); |
| | | tf_zdhj_res_test_count.setColumns(10); |
| | | tf_zdhj_res_test_count.setEditable(false); |
| | | |
| | | |
| | | JPanel panel_15 = new JPanel(); |
| | | //操作结果信息 |
| | | panel_15.setBorder(new TitledBorder(null, "\u64CD\u4F5C\u7ED3\u679C\u4FE1\u606F", TitledBorder.LEADING, TitledBorder.TOP, null, null)); |
| | | panel_13.add(panel_15); |
| | | panel_15.setLayout(new BorderLayout(0, 0)); |
| | |
| | | tf_op_rest_inf.setColumns(10); |
| | | |
| | | panel_ZDHJ_chart = new zdhj_page_chart(); |
| | | //图形数据 |
| | | tabbedPane.addTab("\u56FE\u5F62\u6570\u636E", new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/chart_bar.png")), panel_ZDHJ_chart, null); |
| | | |
| | | panel_ZDHJ_param = new zdhj_page_param(); |
| | | //参数设置 |
| | | tabbedPane.addTab("\u53C2\u6570\u8BBE\u7F6E", new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/application_edit.png")), panel_ZDHJ_param, null); |
| | | |
| | | panel_ZDHJ_record = new zdhj_page_record(); |
| | | //数据记录 |
| | | tabbedPane.addTab("\u6570\u636E\u8BB0\u5F55", new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/disk.png")), panel_ZDHJ_record, null); |
| | | |
| | | panel_ZDHJ_debug = new page_debug_inf(); |
| | | //调试信息 |
| | | tabbedPane.addTab("\u8C03\u8BD5\u4FE1\u606F", new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/exclamation.png")), panel_ZDHJ_debug, null); |
| | | setButttonState(false); |
| | | setButttonState(true); |
| | | } |
| | | |
| | | public boolean openCommPort(int comm_type, String spname_or_ipaddr, |
| | |
| | | package com.dev.fbs9600_zdhj; |
| | | |
| | | import javax.swing.ImageIcon; |
| | | import javax.swing.JPanel; |
| | | import javax.swing.JTabbedPane; |
| | | |
| | | import java.awt.GridLayout; |
| | | |
| | |
| | | private TBarChart_fbs m_TBarMonResChart; |
| | | private TBarChart_fbs m_TBarMonCurrChart; |
| | | private SPCommZDHJ SerialComm_ZDHJ = null; |
| | | |
| | | |
| | | private JTabbedPane chartabbedPane = null; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | |
| | | * Create the panel. |
| | | */ |
| | | public zdhj_page_chart() { |
| | | setLayout(new GridLayout(0, 2, 0, 0)); |
| | | |
| | | chartabbedPane = new JTabbedPane(JTabbedPane.TOP); |
| | | add(chartabbedPane, BorderLayout.CENTER); |
| | | |
| | | |
| | | |
| | | setLayout(new GridLayout(0, 1, 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.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); |
| | | //单体电压(V) |
| | | chartabbedPane.addTab("\u5355\u4F53\u7535\u538B(V)",null, panel, null); |
| | | |
| | | |
| | | 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.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); |
| | | //单体温度 |
| | | chartabbedPane.addTab("\u5355\u4F53\u6E29\u5EA6(\u2103)",null, panel_1, null); |
| | | |
| | | |
| | | 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.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); |
| | | //单体内阻(mΩ) |
| | | chartabbedPane.addTab("\u5355\u4F53\u5185\u963B(m\u03A9)",null, panel_2, null); |
| | | |
| | | 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.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); |
| | | |
| | | //单体均衡电流(mA) |
| | | chartabbedPane.addTab("\u5355\u4F53\u5747\u8861\u7535\u6D41(mA)",null, panel_3, null); |
| | | } |
| | | |
| | | public void setSerialComm_ZDHJ(SPCommZDHJ sz) { |