| | |
| | | import com.dev.fbs9600_zdhj.zdhj_page_base; |
| | | import com.dev.nrf_lora_tester.loratester_page_base; |
| | | import com.dev.ntm.ntm_page_base; |
| | | import com.dev.simpower.power_page_base; |
| | | import com.dev.switchdev.SwitchDevice_page_base; |
| | | import com.ueky.ukeycfg_page_base; |
| | | |
| | |
| | | public static int CommDevType_DummyLoad = -1; //12 假负载 |
| | | public static int CommDevType_IEC61850 = -1; //13 IEC61850 |
| | | public static int CommDevType_UKEY = -1; //14 UKEY |
| | | public static int CommDevType_SIMPOWER = -1; //15 极简化电源 |
| | | |
| | | public static final int CommDevType_MAX = 17; |
| | | |
| | |
| | | public static final boolean APP_DummyLoad_EN = false; //假负载 |
| | | public static final boolean APP_IEC61850_EN = true; //IEC61850 |
| | | public static final boolean APP_UKEY_EN = true; //UKEY |
| | | public static final boolean APP_SIMPOWER_EN = true; //极简化电源 |
| | | |
| | | public int CommDevType = 2; //默认显示tab选项卡 |
| | | public int CommDevType = 5; //默认显示tab选项卡 |
| | | |
| | | public static final int DebugMode_TYPE_Debug = 0; //调试模拟 |
| | | public static final int DebugMode_TYPE_Package = 1; //电脑打包模式 |
| | |
| | | private JPanel main_TabbedTopPane12; |
| | | private JPanel main_TabbedTopPane13; |
| | | private JPanel main_TabbedTopPane14; |
| | | private JPanel main_TabbedTopPane15; |
| | | |
| | | private JPanel main_TabbedRightPane0; |
| | | private JPanel main_TabbedRightPane1; |
| | |
| | | private JPanel main_TabbedRightPane12; |
| | | private JPanel main_TabbedRightPane13; |
| | | private JPanel main_TabbedRightPane14; |
| | | private JPanel main_TabbedRightPane15; |
| | | |
| | | |
| | | private JButton btn_renew_commport; |
| | |
| | | private DummyLoad_page_base panel_dummyload_base; // |
| | | private iec61850_page_base panel_iec61850_base; // |
| | | private ukeycfg_page_base panel_ueky_page_base; |
| | | |
| | | private power_page_base panel_power_page_base; //极简化电源 |
| | | |
| | | private List<JPanel> pre_panels = new ArrayList<>(); //前置面板空白面板 |
| | | |
| | |
| | | frmSerialport.setFont(new Font("宋体", Font.PLAIN, 12)); |
| | | //frmSerialport.setResizable(false); |
| | | |
| | | frmSerialport.setIconImage(Toolkit.getDefaultToolkit().getImage(main_window_computer.class.getResource("/main/fuguang.png"))); |
| | | //frmSerialport.setIconImage(Toolkit.getDefaultToolkit().getImage(main_window_computer.class.getResource("/main/fuguang.png"))); |
| | | frmSerialport.setIconImage(Toolkit.getDefaultToolkit().getImage(main_window_computer.class.getResource("/main/12164006.png"))); |
| | | frmSerialport.setBounds(100, 100, 1180, 640); |
| | | frmSerialport.setMinimumSize(new Dimension(1160, 640)); |
| | | //frmSerialport.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); |
| | |
| | | |
| | | //前置界面 |
| | | pre_panel = new JPanel(); |
| | | pre_panel.setLayout(new GridLayout(0, 4, 20, 20)); |
| | | pre_panel.setLayout(new GridLayout(0,4, 20, 20)); |
| | | //设置边框宽度 |
| | | pre_panel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20)); |
| | | |
| | |
| | | |
| | | |
| | | JButton btn_mon = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/batt_mon.png"))); |
| | | btn_mon.setText("单体模块调试工具"); |
| | | //JButton btn_mon = new JButton(new ImageIcon(main_window_computer.class.getResource("/icon/mon_ied.png"))); |
| | | btn_mon.setText("单体模块"); |
| | | setButtonType(btn_mon); |
| | | btn_mon.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | |
| | | |
| | | JButton btn_curr = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/curr_model.png"))); |
| | | btn_curr.setText("电流模块调试工具"); |
| | | btn_curr.setText("电流模块"); |
| | | setButtonType(btn_curr); |
| | | btn_curr.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | }); |
| | | |
| | | JButton btn_groupvol = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/groupvol.png"))); |
| | | btn_groupvol.setText("组压模块调试工具"); |
| | | btn_groupvol.setText("组压模块"); |
| | | setButtonType(btn_groupvol); |
| | | btn_groupvol.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | |
| | | |
| | | JButton btn_fcf651vol = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/groupvol1.png"))); |
| | | btn_fcf651vol.setText("FCF组压调试工具"); |
| | | btn_fcf651vol.setText("FCF组压"); |
| | | setButtonType(btn_fcf651vol); |
| | | btn_fcf651vol.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | }); |
| | | |
| | | JButton btn_zdhj = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/zdhj_mon.png"))); |
| | | btn_zdhj.setText("汇集模块调试工具"); |
| | | btn_zdhj.setText("组端汇集模块"); |
| | | setButtonType(btn_zdhj); |
| | | btn_zdhj.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | |
| | | setJTableSelectIndex(CommDevType_ZDHJ); |
| | | |
| | | mTitle = "汇集模块调试工具"; |
| | | mTitle = "组端汇集模块调试工具"; |
| | | frmSerialport.setTitle(mTitle+ mVerSioin + " " + Com.get_DTF(new Date(), Com.DTF_YMDhms)); |
| | | |
| | | frmSerialport.getContentPane().revalidate(); // 重新验证布局 |
| | |
| | | }); |
| | | |
| | | JButton btn_fbs9100 = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/control.png"))); |
| | | btn_fbs9100.setText("BTS主控调试工具"); |
| | | btn_fbs9100.setText("BTS主控"); |
| | | setButtonType(btn_fbs9100); |
| | | btn_fbs9100.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | }); |
| | | |
| | | JButton btn_ntm = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/dis_ele.png"))); |
| | | btn_ntm.setText("NTM放电仪调试工具"); |
| | | btn_ntm.setText("NTM放电仪"); |
| | | setButtonType(btn_ntm); |
| | | btn_ntm.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | |
| | | |
| | | JButton btn_lora = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/mcs_lora_on.png"))); |
| | | btn_lora.setText("Lora测试调试工具"); |
| | | btn_lora.setText("Lora测试"); |
| | | setButtonType(btn_lora); |
| | | btn_lora.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | |
| | | |
| | | JButton btn_bybb = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/board_main.png"))); |
| | | btn_bybb.setText("BYBB测试调试工具"); |
| | | btn_bybb.setText("BYBB测试"); |
| | | setButtonType(btn_bybb); |
| | | btn_bybb.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | |
| | | |
| | | JButton btn_fbo4830 = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/dis_instrument.png"))); |
| | | btn_fbo4830.setText("FBO4830调试工具"); |
| | | btn_fbo4830.setText("FBO4830"); |
| | | setButtonType(btn_fbo4830); |
| | | btn_fbo4830.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | }); |
| | | |
| | | JButton btn_bts4810 = new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/dis_instrument1.png"))); |
| | | btn_bts4810.setText("BTS4810调试工具"); |
| | | btn_bts4810.setText("核容主机"); |
| | | setButtonType(btn_bts4810); |
| | | btn_bts4810.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | System.out.println("CommDevType_BTS4810:"+CommDevType_BTS4810+"\tmain_TabbedPane.getTabCount():"+main_TabbedPane.getTabCount()); |
| | | setJTableSelectIndex(CommDevType_BTS4810); |
| | | |
| | | mTitle = "BTS4810调试工具"; |
| | | mTitle = "核容主机调试工具"; |
| | | frmSerialport.setTitle(mTitle+ mVerSioin + " " + Com.get_DTF(new Date(), Com.DTF_YMDhms)); |
| | | |
| | | frmSerialport.getContentPane().revalidate(); // 重新验证布局 |
| | |
| | | |
| | | |
| | | JButton btn_switch= new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/change_instrument.png"))); |
| | | btn_switch.setText("切换装置调试工具"); |
| | | btn_switch.setText("切换装置"); |
| | | setButtonType(btn_switch); |
| | | btn_switch.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | }); |
| | | |
| | | JButton btn_load= new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/dummy_load.png"))); |
| | | btn_load.setText("假负载装置调试工具"); |
| | | btn_load.setText("假负载装置"); |
| | | setButtonType(btn_load); |
| | | btn_load.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | }); |
| | | |
| | | JButton btn_iec61850= new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/61850_logo.png"))); |
| | | btn_iec61850.setText("IEC61850调试工具"); |
| | | btn_iec61850.setText("61850Эת"); |
| | | setButtonType(btn_iec61850); |
| | | btn_iec61850.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | |
| | | setJTableSelectIndex(CommDevType_IEC61850); |
| | | |
| | | mTitle = "IEC61850调试工具"; |
| | | mTitle = "61850协转调试工具"; |
| | | frmSerialport.setTitle(mTitle+ mVerSioin + " " + Com.get_DTF(new Date(), Com.DTF_YMDhms)); |
| | | |
| | | frmSerialport.getContentPane().revalidate(); // 重新验证布局 |
| | |
| | | |
| | | |
| | | JButton btn_ukey= new JButton(new ImageIcon(main_window_computer.class.getResource("/png_32x32/ukey_logo.png"))); |
| | | btn_ukey.setText("UKEY调试工具"); |
| | | btn_ukey.setText("UKEY"); |
| | | setButtonType(btn_ukey); |
| | | btn_ukey.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent arg0) { |
| | |
| | | main_TabbedTopPane13.setLayout(new BoxLayout(main_TabbedTopPane13, BoxLayout.X_AXIS)); |
| | | main_TabbedTopPane14 = new JPanel(); |
| | | main_TabbedTopPane14.setLayout(new BoxLayout(main_TabbedTopPane14, BoxLayout.X_AXIS)); |
| | | main_TabbedTopPane15 = new JPanel(); |
| | | main_TabbedTopPane15.setLayout(new BoxLayout(main_TabbedTopPane15, BoxLayout.X_AXIS)); |
| | | |
| | | |
| | | main_TabbedRightPane0 = new JPanel(); |
| | |
| | | main_TabbedRightPane13.setLayout(new BorderLayout()); |
| | | main_TabbedRightPane14 = new JPanel(); |
| | | main_TabbedRightPane14.setLayout(new BorderLayout()); |
| | | main_TabbedRightPane15 = new JPanel(); |
| | | main_TabbedRightPane15.setLayout(new BorderLayout()); |
| | | |
| | | top_panel1 = new JPanel(); |
| | | top_panel1.setLayout(new BoxLayout(top_panel1, BoxLayout.X_AXIS)); |
| | |
| | | //使用table选中的列表 |
| | | int main_DevType = main_TabbedPane.getSelectedIndex(); |
| | | //int main_DevType = CommDevType; |
| | | boolean comm_open_res = true; |
| | | System.err.println("main_DevType:"+main_DevType); |
| | | if(DebugMode == DebugMode_TYPE_Package) { |
| | | main_DevType = CommDevType; |
| | | } |
| | | |
| | | boolean comm_open_res = true; |
| | | //System.err.println("main_DevType:"+main_DevType); |
| | | int monomer_devType = cb_dev_type.getSelectedIndex(); |
| | | if(main_window_computer.CommDevType_MON == main_DevType) { |
| | | int comm_multy_type = CommSerialPort.mutycomm_Type_Samd09; |
| | |
| | | int tcp_type = cb_tcp_udp.getSelectedIndex(); |
| | | System.out.println("tcp_type:" + tcp_type); |
| | | } |
| | | } |
| | | } else if(main_window_computer.CommDevType_SIMPOWER == main_DevType) { |
| | | if(SPCommMon.COMM_PORT_TYPE_Serial == comm_type) { |
| | | //串口通信 |
| | | int dev_addr = Integer.parseInt(tf_target_addr.getText().trim()); |
| | | comm_open_res = panel_power_page_base.openCommPort(comm_type, spname_or_ipaddr, |
| | | bitrate_or_ipport, dev_addr, m_Log); |
| | | }else if(SPCommMon.COMM_PORT_TYPE_Socket == comm_type){ |
| | | //客户端通信 |
| | | int tcp_type = cb_tcp_udp.getSelectedIndex(); |
| | | System.out.println("tcp_type:" + tcp_type); |
| | | } |
| | | } |
| | | |
| | | if(true == comm_open_res) { |
| | | CommDevType = main_DevType; |
| | |
| | | if(null != panel_dummyload_base) { |
| | | panel_dummyload_base.closeCommPort(); |
| | | } |
| | | if(null != panel_power_page_base) { |
| | | panel_power_page_base.closeCommPort(); |
| | | } |
| | | |
| | | tf_target_addr.setEditable(true); |
| | | btn_renew_commport.setEnabled(true); |
| | |
| | | main_TabbedPane.setFont(new Font("宋体", Font.PLAIN, 20)); |
| | | main_TabbedPane.addChangeListener(new ChangeListener() { |
| | | public void stateChanged(ChangeEvent arg0) { |
| | | System.out.println("监听到软件切换:" + main_TabbedPane.getSelectedIndex() + " CommDevType:" + CommDevType); |
| | | |
| | | |
| | | if(DebugMode_TYPE_Screen == DebugMode) { |
| | | //显示屏模式时会出现头部组件小时问题,提前结束 |
| | | if (DebugMode_TYPE_Screen == DebugMode || DebugMode_TYPE_Package == DebugMode ) { |
| | | //显示屏模式时会出现头部组件消失问题,提前结束 |
| | | return; |
| | | } |
| | | |
| | | int tab_index = main_TabbedPane.getSelectedIndex(); |
| | | System.out.println("tab_index:"+tab_index); |
| | | if(tab_index >=0 && tab_index < tabbedTopPanes.size()) { |
| | | JPanel topPanel = tabbedTopPanes.get(tab_index); |
| | | //System.out.println("topPanel:"+topPanel); |
| | | if(topPanel != null) { |
| | | topPanel.removeAll(); |
| | | topPanel.add(top_panel1); |
| | |
| | | pre_panels.add(new JPanel()); |
| | | } |
| | | |
| | | |
| | | if(APP_SIMPOWER_EN) { |
| | | CommDevType_SIMPOWER = jtable_index++; |
| | | |
| | | String bybb_title = "极简化电源"; |
| | | |
| | | panel_power_page_base = new power_page_base(); |
| | | |
| | | if(DebugMode == DebugMode_TYPE_Screen) { |
| | | main_TabbedPane.add(bybb_title, new JPanel()); |
| | | }else { |
| | | main_TabbedPane.add(bybb_title, main_TabbedRightPane15); |
| | | // main_TabbedPane.add(bybb_title, panel_dummyload_base); |
| | | main_TabbedPane.setIconAt(CommDevType_SIMPOWER, new ImageIcon(main_window_computer.class.getResource("/png_16x16/layer_treansparent.png"))); |
| | | } |
| | | |
| | | main_TabbedRightPane15.add(main_TabbedTopPane15,BorderLayout.NORTH); |
| | | main_TabbedRightPane15.add(panel_power_page_base,BorderLayout.CENTER); |
| | | |
| | | tabbedTopPanes.add(main_TabbedTopPane15); |
| | | tabbedRightPanes.add(main_TabbedRightPane15); |
| | | |
| | | if(CommDevType == CommDevType_SIMPOWER) { |
| | | //当默认是极简化电源时 |
| | | cb_comm_bitrate.setSelectedIndex(2); //默认波特率9600 |
| | | tf_target_addr.setText("1"); //默认设备地址1 |
| | | |
| | | } |
| | | }else { |
| | | pre_panels.add(new JPanel()); |
| | | } |
| | | |
| | | |
| | | if(pre_panels.size() > 0) { |
| | | for (JPanel jPanel : pre_panels) { |
| | | pre_panel.add(jPanel); |
| | |
| | | main_TabbedPane.setEnabled(false); |
| | | } |
| | | /**************************************************************************/ |
| | | System.out.println("$$$$$$$$$$$"+CommDevType); |
| | | //打包模式判断选项--隐藏左侧选卡并设置调试软件名称 |
| | | if(CommDevType >= CommDevType_MON && CommDevType <= CommDevType_MAX) { |
| | | |
| | | //System.out.println("CommDevType$$$$$$$$$$$--"+CommDevType); |
| | | |
| | | //选中默认选项卡 |
| | | main_TabbedPane.setSelectedIndex(CommDevType); |
| | | |
| | | int tab_index = main_TabbedPane.getSelectedIndex(); |
| | | |
| | | //System.out.println("222:"+main_TabbedPane.getSelectedIndex()+"\tCommDevType"+CommDevType); |
| | | if(DebugMode == DebugMode_TYPE_Package) { |
| | | //System.out.println("tab_index$$$$$$$$$$$--"+tab_index); |
| | | |
| | | if(DebugMode == DebugMode_TYPE_Package) { |
| | | //打包模式时 会出现 main_TabbedPane.getSelectedIndex 与 CommDevType 不一致 |
| | | tab_index = CommDevType; |
| | | |
| | | //移除返回按钮 |
| | | top_panel1.remove(panel_10); |
| | | |
| | | main_TabbedPane.setVisible(false); |
| | | JPanel topPanel = tabbedTopPanes.get(tab_index); |
| | | JPanel rightPanel = tabbedRightPanes.get(tab_index); |
| | | |
| | | //System.out.println(main_TabbedTopPane0+"==="+topPanel + "=="+ rightPanel); |
| | | |
| | | //System.err.println(main_TabbedTopPane0+"==="+topPanel + "=="+ rightPanel); |
| | | if(topPanel != null && rightPanel != null) { |
| | | |
| | | frmSerialport.getContentPane().removeAll(); |
| | | |
| | | //System.out.println("333:"+main_TabbedPane.getSelectedIndex()+"\tCommDevType"+CommDevType); |
| | | |
| | | frmSerialport.getContentPane().add(topPanel, BorderLayout.NORTH); |
| | | frmSerialport.getContentPane().add(rightPanel, BorderLayout.CENTER); |
| | | |
| | | frmSerialport.setMinimumSize(new Dimension(1030, 640)); |
| | | |
| | | //System.out.println("222:"+main_TabbedPane.getSelectedIndex()+"\tCommDevType"+CommDevType); |
| | | } |
| | | if(CommDevType_MON == CommDevType){ |
| | | //frmSerialport.getContentPane().add(panel_mon_base, BorderLayout.CENTER); |
| | |
| | | //frmSerialport.getContentPane().add(panel_dummyload_base, BorderLayout.CENTER); |
| | | }else if(CommDevType_UKEY == CommDevType) { |
| | | mTitle = "UKEY调试工具"; |
| | | }else if(CommDevType_SIMPOWER == CommDevType) { |
| | | mTitle = "极简化电源调试工具"; |
| | | |
| | | //System.out.println("头部容器:"+top_panel1.getParent()); |
| | | //极简化电源 |
| | | cb_comm_bitrate.setSelectedIndex(2); |
| | | frmSerialport.getContentPane().add(top_panel1, BorderLayout.NORTH); |
| | | |
| | | }else if(CommDevType_IEC61850 == CommDevType) { |
| | | frmSerialport.getContentPane().remove(topPanel); |
| | | } |
| | | |
| | | } else if(DebugMode == DebugMode_TYPE_Screen){ |
| | | //btn_back = null; |
| | | |
| | | frmSerialport.getContentPane().removeAll(); |
| | | frmSerialport.getContentPane().add(pre_panel); |
| | | } else { |
| | | System.err.println("调试模式中...."); |
| | | top_panel1.remove(panel_10); |
| | | } |
| | | } |
| | | //System.out.println("444:"+main_TabbedPane.getSelectedIndex()+"\tCommDevType"+CommDevType); |
| | | |
| | | |
| | | frmSerialport.setTitle(mTitle+ mVerSioin + " " + Com.get_DTF(new Date(), Com.DTF_YMDhms)); |
| | |
| | | frmSerialport.setTitle(this.mTitle + "_EN" + " " + Com.get_DTF(new Date(), Com.DTF_YMDhms)); |
| | | } |
| | | |
| | | //System.out.println("333:"+main_TabbedPane.getSelectedIndex()); |
| | | /**************************************************************************/ |
| | | mMainFormTimer = new Timer(200, new ActionListener() { |
| | | @Override |
| | |
| | | updateData(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | /**************************************************************************/ |
| | | } |
| | | |
| | |
| | | frmSerialport.setTitle(mTitle+ mVerSioin + " " + Com.get_DTF(new Date(), Com.DTF_YMDhms)); |
| | | |
| | | int main_DevType = main_TabbedPane.getSelectedIndex(); |
| | | if(DebugMode == DebugMode_TYPE_Package) { |
| | | main_DevType = CommDevType; |
| | | } |
| | | |
| | | if(CommDevType_MON == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_mon_base.Comm_Mon.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_mon_base.Comm_Mon.comm_rx_cnt)); |
| | |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_FBS9100_base.Comm_BTS.comm_rx_cnt)); |
| | | |
| | | panel_FBS9100_base.updateData(); |
| | | } if(CommDevType_NTM == main_DevType) { |
| | | } else if(CommDevType_NTM == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_NTM_base.Comm_NTM.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_NTM_base.Comm_NTM.comm_rx_cnt)); |
| | | |
| | | panel_NTM_base.updateData(); |
| | | } if(CommDevType_LoraTest == main_DevType) { |
| | | } else if(CommDevType_LoraTest == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_LoraTest_base.Comm_LoraTester.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_LoraTest_base.Comm_LoraTester.comm_rx_cnt)); |
| | | |
| | | panel_LoraTest_base.updateData(); |
| | | } if(CommDevType_BYBB == main_DevType) { |
| | | } else if(CommDevType_BYBB == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_bybb_base.Comm_BYBB.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_bybb_base.Comm_BYBB.comm_rx_cnt)); |
| | | |
| | | panel_bybb_base.updateData(); |
| | | } if(CommDevType_BTS4810 == main_DevType) { |
| | | } else if(CommDevType_BTS4810 == main_DevType) { |
| | | |
| | | tf_txcnt.setText(String.format("TX:%d", panel_bts4810_base.Comm_BTS4810.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_bts4810_base.Comm_BTS4810.comm_rx_cnt)); |
| | | |
| | | panel_bts4810_base.updateData(); |
| | | } if(CommDevType_SwitchDevice == main_DevType) { |
| | | } else if(CommDevType_SwitchDevice == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_switchdevice_base.Comm_Swit.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_switchdevice_base.Comm_Swit.comm_rx_cnt)); |
| | | |
| | | panel_switchdevice_base.updateData(); |
| | | } if(CommDevType_DummyLoad == main_DevType) { |
| | | } else if(CommDevType_DummyLoad == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_dummyload_base.Comm_Swit.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_dummyload_base.Comm_Swit.comm_rx_cnt)); |
| | | |
| | | panel_dummyload_base.updateData(); |
| | | } if(CommDevType_UKEY == main_DevType) { |
| | | } else if(CommDevType_UKEY == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_ueky_page_base.Comm_ukey.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_ueky_page_base.Comm_ukey.comm_rx_cnt)); |
| | | |
| | | panel_ueky_page_base.updateData(); |
| | | } |
| | | } else if(CommDevType_SIMPOWER == main_DevType) { |
| | | tf_txcnt.setText(String.format("TX:%d", panel_power_page_base.Comm_POWER.comm_tx_cnt)); |
| | | tf_rxcnt.setText(String.format("RX:%d", panel_power_page_base.Comm_POWER.comm_rx_cnt)); |
| | | |
| | | panel_power_page_base.updateData(); |
| | | } |
| | | } catch (Exception e) { |
| | | m_Log.error(e.toString(), e); |
| | | } |
| | |
| | | } |
| | | |
| | | public void setJTableSelectIndex(int jt_index) { |
| | | System.out.println("###########################"); |
| | | if(jt_index < main_TabbedPane.getTabCount() && jt_index >= 0) { |
| | | main_TabbedPane.setSelectedIndex(jt_index); |
| | | } |