package Frame; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Dimension; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ImageIcon; import javax.swing.JComboBox; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.ScrollPaneConstants; import ColorAndFont.UIColor; import DataBase.DatabaseManagement; import Judge.JugeNumber; import Method.GetNowTime; import Method.JComboBoxModel; import PbuliClass.JButtonModel; import PbuliClass.JCheckBoxModel; import PbuliClass.JlableModel; import PbuliClass.ShowMessage; import PbuliClass.Systems; import PbuliClass.jinternalFrame; import anchor.Anchor; import anchor.Anchor_Dell; import anchor.Dell_cengao; import fence.Fences; import tbDataModel.Tb_cengzu; import tbDataModel_Dell.Dell_tb_suanfa2; import tbDataModel_Dell.Dell_tbcengzu; import tbDataModel_Dell.JPanelModel1; public class SuanFaManage extends jinternalFrame { /** * */ private static final long serialVersionUID = 1L; JPanel mb1=null; JScrollPane jsp=null;//¹ö¶¯Ìõ JPanelModel1 cenggaomb0=null;//²ã×éÊôÐÔÉèÖà JPanelModel1 cenggaomb2=null;//²ã¸ßÉèÖà JlableModel jl_cezu=new JlableModel("Ñ¡Ôñ²ãºÍ×é:"); JlableModel jl_juli=new JlableModel("±Ø¾­×é¾àÀë(cm):"); JlableModel jl_weidu=new JlableModel("²ã×éά¶ÈÉèÖÃ:"); JlableModel jl_suanfa=new JlableModel("²ã×éËã·¨ÉèÖÃ:"); JlableModel jl_quyue=new JlableModel("²ã×éÓÐÐ§ÇøÓò:"); JlableModel jl_zu_kuang=new JlableModel("×é¿í¶ÈÔ¼Êø(cm):"); JlableModel jl_cenggaoshezhi=new JlableModel("²ã¸ßÉèÖÃÑ¡Ôñ²ã:"); JlableModel jl_buttom=new JlableModel("²ãµ×¸ß¶È/cm:"); JlableModel jl_top=new JlableModel("²ã¶¥¸ß¶È/cm:"); JlableModel jl_width=new JlableModel("²ã×éһά¿í¶È(cm):"); JlableModel jl_zkc=new JlableModel("ÉèÖÃ×é¿ç¶à²ã:"); JlableModel jl_tagh=new JlableModel("±êÇ©¸ß¶È:");//Èýάʱºò×Ô¶¯½ÃÕý±êǩĬÈÏ·ÅÖÃµÄ¸ß¶È JTextField jf_weizhi=null; JTextField jf_buttom=null; JTextField jf_top=null; JTextField jf_anchorgas=null; JTextField jf_width=null; JTextField jf_zkc=null; JTextField jf_kcacg=null;//¿ç²ã¸ß¶È JTextField jf_bjjl=null;//±Ø¾­¾àÀë JTextField jf_bjzjl=null;//±Ø¾­×é¾àÀë JTextField jf_zyk=null;//×éÔ¼Êø¿í¶È JTextField jf_tagh=null;//±êÇ©·ÅµÄ¸ß¶ÈλÖà JTextField jf_closeuwb=null;//¹Ø±ÕUWBµÄÌõ¼þ JCheckBoxModel jc_outzu=null;//ÊÒÍâ×é JCheckBoxModel jc_bjzu=null;//±Ø¾­×é JComboBoxModel jb_suanfa=null; JComboBoxModel jb_anchornum=null; JComboBoxModel jb_ceng=null; JComboBoxModel jb_zu=null; JComboBoxModel jb_jieji=null;//½â¼¯´¦Àí JComboBoxModel jb_youxiaoquyu=null; JCheckBoxModel jb_anchorMustPass=null;//¿ªÆôµ¥¸ö»ùÕ¾ÉèÖñؾ­¾àÀë JComboBox comboBox=null; JComboBoxModel jb_weizhichoose=null; JComboBoxModel jb_ceng2=null; JComboBoxModel jb_kcacg=null; JButtonModel jbut_sure=null; JButtonModel jbut_sure1=null; JButtonModel jbut_reset=null; JButtonModel jbut_alert=null; JButtonModel jbut_anchorgas=null; JButtonModel jbut_kcacg=null; JCheckBoxModel gnss2xy;//GNSSתXY×ø±êĬÈÏ¿ªÆô JCheckBoxModel pingmianbuju;//ÔÊÐíÆ½Ãæ²¼¾Ö JCheckBoxModel dis_juge_indo0r; //ͨ¹ý²â¾à¾àÀëÅжÏÊÒÄÚÍâ JCheckBoxModel gps_xinhao_indoor; //ͨ¹ýÎÀÐÇÐźÅÇ¿¶ÈÅжÏÊÒÄÚÍâ JCheckBoxModel just_buju_qu;//½ö²¼¾ÖÇøÄÚÓÐЧ JCheckBoxModel jnalog; //¿ªÆôJNAlog¿ª¹Ø JCheckBoxModel indoor_juge_in; //ͨ¹ýÊÒÄÚÇøÓòÅжÏÊÒÄÚÍ⹦ÄÜ JTextField jing_zhi_lv_zhi;//¾²Ö¹¹ýÂËÖµ£¬Ä¬ÈÏ0 JComboBoxModel shi_xi_fen_pei; //ʱϸ·Ö·ÖÅä0±íʾMIX£¬1±íʾGAP JComboBoxModel lv_bo_fang_shi;//Â˲¨·½Ê½0»¬¶¯Âʲ¨£¬1µÍͨÂ˲¨ JTextField wei_zhi_guo_lv;//λÖùýÂËÖµ JComboBoxModel shu_ju_zhuan_fa;//Êý¾Ýת·¢ÉèÖÃ0²»×ª·¢×îºóλÖã¬1ÀëÏßת·¢£¬2ÐÝÃßת·¢£¬3ÀëÏßÐÝÃßת·¢ JTextField gps_qiangdu;//ÎÀÐÇÐźÅÇ¿¶È·¶Î§ JCheckBoxModel mo_hu_suanfa;//Ä£ºýλÖüÆËã Tb_cengzu suanfa=Dell_tbcengzu.get_tbcengzu("0","0"); JPanelModel1 mp1=null;//»ùÕ¾ÊôÐÔÉèÖà JPanelModel1 mp3=null;//Ëã·¨ÉèÖà public SuanFaManage() { String title="Ëã·¨ÅäÖÃ"; if(Systems.sys().getLanguage().equals("English")) { title="Algorithm selection"; } this.setTitle(title); Container rq=getContentPane();//»ñÈ¡ÈÝÆ÷ rq.setLayout(new BorderLayout()); this.setBounds(175, 0,910,610); rq.setBackground(Color.white); rq.add(getJsp(),BorderLayout.CENTER); this.setFrameIcon(new ImageIcon("image/icon/systemicon.png"));//ÉèÖô°Ìåͼ±ê } public JPanel getMb1() { if(mb1==null) { mb1=new JPanel(); mb1.setLayout(null); mb1.setBackground(UIColor.getNorth_color()); mb1.setPreferredSize(new Dimension(910,1000)); int x0=5; int y0=30; //²ã×éÊôÐÔÉèÖà mb1.add(getcenggaomb0()); getcenggaomb0().setBounds(x0,y0,870,190); //ÌØÊâËã·¨ÉèÖà int y1=y0+210; mb1.add(getMp3()); getMp3().setBounds(x0,y1,870,270); //²ã¸ßÉèÖà int y2=y1+280; mb1.add(getcenggaomb2()); getcenggaomb2().setBounds(x0,y2,870,100); //»ùÕ¾ÊôÐÔÉèÖà int y3=y2+140; mb1.add(getMp1()); getMp1().setBounds(x0, y3,870,100); } return mb1; } public JPanelModel1 getcenggaomb0() { if(cenggaomb0==null) { cenggaomb0=new JPanelModel1("²ã×éÊôÐÔÉèÖÃ"); cenggaomb0.add(getJc_outzu()); cenggaomb0.add(jl_cezu); cenggaomb0.add(getJf_bjzjl()); cenggaomb0.add(getJb_ceng()); cenggaomb0.add(jl_juli); cenggaomb0.add(getJb_zu()); cenggaomb0.add(getJf_bjzjl()); cenggaomb0.add(getJc_bjzu()); //ά¶ÈÑ¡Ôñ cenggaomb0.add(jl_weidu); cenggaomb0.add(getJb_anchornum()); //Ë㷨ѡÔñ cenggaomb0.add(jl_suanfa); cenggaomb0.add(getJb_suanfa()); //×é¿ç¶à²ã cenggaomb0.add(getJf_zkc()); cenggaomb0.add(jl_zkc); //ÓÐÐ§ÇøÓò cenggaomb0.add(jl_quyue); cenggaomb0.add(getJb_youxiaoquyu()); int y0=30; int x0=20; int h=30; int j=28; //Ñ¡Ôñ²ã×é1 int w1=100; jl_cezu.setBounds(x0, y0,w1, h); getJb_ceng().setBounds(x0+w1, y0,100, h); getJb_zu().setBounds(x0+w1+110, y0,100, h); //±Ø¾­¾àÀë int x1=x0+w1+250; jl_juli.setBounds(x1, y0,120, h); getJf_bjzjl().setBounds(x1+120, y0,100, h); int x2=x1+120+150; getJc_outzu().setBounds(x2, y0,100, h); //ÊÒÍâ×é getJc_bjzu().setBounds(x2+120, y0,100, h);//±Ø¾­×é //ά¶ÈÑ¡Ôñ2 int y1=y0+1*(h+j); jl_weidu.setBounds(x0,y1,100, h); getJb_anchornum().setBounds(x0+100, y1,210, h); //Ë㷨ѡÔñ3 jl_suanfa.setBounds(x1,y1,120, h); getJb_suanfa().setBounds(x1+120, y1,100, h); //¿ç²ã×é jl_zkc.setBounds(x2, y1,100, h); jf_zkc.setBounds(x2+120,y1,100, h); int y2=y0+2*(h+j); //ÓÐÐ§ÇøÓò2 jl_quyue.setBounds(x0, y2,100, h); getJb_youxiaoquyu().setBounds(x0+100,y2,210, h); //×éÔ¼ÊøµÄ¿í¶È cenggaomb0.add(jl_zu_kuang); cenggaomb0.add(getJf_zyk()); jl_zu_kuang.setBounds(x1, y2,120, h); getJf_zyk().setBounds(x1+120,y2,100, h); cenggaomb0.add(getJbut_sure()); getJbut_sure().setBounds(x1+270, y2,150,30); } return cenggaomb0; } public JPanelModel1 getcenggaomb2() { if(cenggaomb2==null) { cenggaomb2=new JPanelModel1("²ãµÄ¸ß¶ÈÉèÖÃ"); int y0=40; int x0=20; int h=30; //²ã¸ßÉèÖà cenggaomb2.add(jl_cenggaoshezhi); cenggaomb2.add(getJb_ceng2()); jl_cenggaoshezhi.setBounds(x0, y0,120, h); getJb_ceng2().setBounds(x0+120,y0,120, h); cenggaomb2.add(jl_buttom); cenggaomb2.add(getJf_buttom()); jl_buttom.setBounds(x0+260,y0,100, h); getJf_buttom().setBounds(x0+360,y0,100, h); cenggaomb2.add(jl_top); cenggaomb2.add(getJf_top()); cenggaomb2.add(getJbut_alert()); jl_top.setBounds(x0+480, y0,100, h); getJf_top().setBounds(x0+580,y0,100, h); getJbut_alert().setBounds(x0+700,y0,80, h); } return cenggaomb2; } public JComboBoxModel getJb_suanfa() { if(jb_suanfa==null) { String[] suanfa1= {"TOF","TDOA"}; jb_suanfa=new JComboBoxModel(suanfa1); String a=suanfa.getSuan_fa(); jb_suanfa.setSelectedItem(a); } return jb_suanfa; } public JComboBoxModel getJb_anchornum() { if(jb_anchornum==null) { String[] anchornum= {"ά¶ÈÑ¡Ôñ","´æÔÚ¼ì²â","һά","¶þά","Èýά"}; jb_anchornum=new JComboBoxModel(anchornum); int a=Integer.parseInt(suanfa.getSuan_fa_wei_du()); String b="ά¶ÈÑ¡Ôñ"; if(a==0) { b="´æÔÚ¼ì²â"; }else if(a==1) { b="һά"; }else if(a==2) { b="¶þά"; }else if(a==3) { b="Èýά"; } jb_anchornum.setSelectedItem(b); } return jb_anchornum; } public JComboBoxModel getJb_ceng() { if(jb_ceng==null) { jb_ceng=new JComboBoxModel(Dell_tbcengzu.getceng()); jb_ceng.setToolTipText("ÏÂÀ­Ñ¡Ôñ²ã"); jb_ceng.setEditable(true);//ÏÂÀ­¿ò¿ÉÒÔÊäÈë jb_ceng.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String ceng1=(String) jb_ceng.getSelectedItem(); String zu1=(String) jb_zu.getSelectedItem(); choose_cengzu(ceng1,zu1); } }); } return jb_ceng; } public JComboBoxModel getJb_zu() { if(jb_zu==null) { jb_zu=new JComboBoxModel(Dell_tbcengzu.getzu()); jb_zu.setToolTipText("ÏÂÀ­Ñ¡Ôñ×é"); jb_zu.setEditable(true);//ÏÂÀ­¿ò¿ÉÒÔÊäÈë jb_zu.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String ceng1=(String) jb_ceng.getSelectedItem(); String zu1=(String) jb_zu.getSelectedItem(); choose_cengzu(ceng1,zu1); } }); } return jb_zu; } /**Ñ¡Ôñ²ã×é·½·¨*/ public void choose_cengzu(String ceng1,String zu1) { suanfa=Dell_tbcengzu.get_tbcengzu(ceng1,zu1 ); if(suanfa==null) { return; } String a1=suanfa.getZu_kuang_du(); if(a1==null) { a1="0"; } jf_zyk.setText(a1); String a2=suanfa.getBi_jing_ju_li(); if(a2==null) { a2="0"; } jf_bjzjl.setText(a2); String a3=suanfa.getSuan_fa(); if(a3==null) { a3="TOF"; } jb_suanfa.setSelectedItem(a3); String sfa="¶þά"; String wd=suanfa.getSuan_fa_wei_du(); if(wd==null) { wd="2"; } if(wd.equals("0")) { sfa="´æÔÚ¼ì²â"; }else if(wd.equals("1")) { sfa="һά"; }else if(wd.equals("2")) { sfa="¶þά"; }else if(wd.equals("3")) { sfa="Èýά"; }else { sfa="ά¶ÈÑ¡Ôñ"; } jb_anchornum.setSelectedItem(sfa); String a=suanfa.getZu_kua_duo_ceng(); if(a==null ) { a="×éÎÞ¿ç²ã"; }else if(a.equals("")) { a="×éÎÞ¿ç²ã"; } jf_zkc.setText(a); String a5=suanfa.getYou_xiao_qu_yu(); if(a5==null) { a5="-1"; } jb_youxiaoquyu.setSelectedItem(a5); //±Ø¾­×é String bjz=suanfa.getIs_bi_jing_zu(); if(bjz==null) { bjz="0"; jc_outzu.setSelected(false); }else if(bjz.equals("1")) { jc_bjzu.setSelected(true); }else { jc_bjzu.setSelected(false); } //ÊÒÍâ×é String shiwzu=suanfa.getIs_shi_wai_zu(); if(shiwzu==null) { shiwzu="0"; jc_outzu.setSelected(false); }else if(shiwzu.equals("1")) { jc_outzu.setSelected(true); }else { jc_outzu.setSelected(false); } } public JComboBoxModel getJb_youxiaoquyu() { if(jb_youxiaoquyu==null) { String[] quyu= Fences.getfencesstr("¶¨Î»ÇøÓò"); jb_youxiaoquyu=new JComboBoxModel(quyu); } return jb_youxiaoquyu; } public JButtonModel getJbut_sure() { if(jbut_sure==null) { jbut_sure=new JButtonModel("±£´æ²ã×éÉèÖÃ"); jbut_sure.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String jiyu=(String) jb_anchornum.getSelectedItem();//ά¶È String suan_fa_wei_du="1"; if(jiyu.equals("¶þά")) { suan_fa_wei_du="2"; }else if(jiyu.equals("´æÔÚ¼ì²â")) { suan_fa_wei_du="0"; }else if(jiyu.equals("Èýά")) { suan_fa_wei_du="3"; } String floor=(String) jb_ceng.getSelectedItem();//²ã String zu=(String) jb_zu.getSelectedItem();//×é String bi_jing_ju_li=jf_bjzjl.getText();;//±Ø¾­¾àÀë String is_shi_wai_zu="0";//ÊÇ·ñÊÇÊÒÍâ×é0²»ÊÇ£¬1ÊÇ if(jc_outzu.isSelected()) { is_shi_wai_zu="1"; } String is_bi_jing_zu="0";//ÊÇ·ñÊDZؾ­×é0²»ÊÇ£¬1ÊÇ if(jc_bjzu.isSelected()) { is_bi_jing_zu="1"; } String suan_fa=(String) jb_suanfa.getSelectedItem();//Ë㷨ѡÔñ String zu_kua_duo_ceng="-1";//×é¿ç¶à²ã String b1=jf_zkc.getText().trim(); if( b1.equals("×éÎÞ¿ç²ã")) { zu_kua_duo_ceng=b1; } String you_xiao_qu_yu=(String) jb_youxiaoquyu.getSelectedItem();//ÓÐ String zu_kuang_du=jf_zyk.getText().trim();//×é¿í¶È Dell_tbcengzu.add_or_alert_cengzu( floor, //²ã zu, //×é bi_jing_ju_li,//±Ø¾­¾àÀë is_shi_wai_zu,//ÊÇ·ñÊÇÊÒÍâ×é0²»ÊÇ£¬1ÊÇ is_bi_jing_zu,//ÊÇ·ñÊDZؾ­×é0²»ÊÇ£¬1ÊÇ suan_fa_wei_du,//Ëã·¨µÄά¶È0,1,2,3 suan_fa,//ĬÈÏTOF zu_kua_duo_ceng,//×é¿ç¶à²ã you_xiao_qu_yu,//ÓÐÐ§ÇøÓò zu_kuang_du//×é¿í¶È ); } }); } return jbut_sure; } public JTextField getJf_buttom() { if(jf_buttom==null) { String ceng=Dell_cengao.get_tbceng(0).getButtom(); if(Dell_cengao.get_tbceng(0)==null) { ceng="δ֪"; ShowMessage.zidingyi_24("0²ã¸ß¶ÈÕÒ²»µ½..."); } jf_buttom=new JTextField(ceng); } return jf_buttom; } public JTextField getJf_top() { if(jf_top==null) { jf_top=new JTextField(Dell_cengao.get_tbceng(0).getTop()); } return jf_top; } public JComboBoxModel getJb_ceng2() { if(jb_ceng2==null) { jb_ceng2=new JComboBoxModel(Dell_tbcengzu.getceng()); jb_ceng2.setSelectedItem(Dell_cengao.get_tbceng(0).getId()); jb_ceng2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(JugeNumber .isDigit((String)jb_ceng2.getSelectedItem())) { int id=Integer.parseInt((String)jb_ceng2.getSelectedItem()); String top="0"; String buttom="300"; if(Dell_cengao.get_tbceng(id) !=null) { top=Dell_cengao.get_tbceng(id).getTop(); buttom=Dell_cengao.get_tbceng(id).getButtom(); } jf_top.setText(top); jf_buttom.setText(buttom); } } }); } return jb_ceng2; } public JButtonModel getJbut_alert() { if(jbut_alert==null) { jbut_alert=new JButtonModel("Ð޸IJã¸ß"); jbut_alert.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String cengstr=(String)jb_ceng2.getSelectedItem(); if(cengstr.equals("Ñ¡Ôñ²ã")) { ShowMessage.zidingyi("ÇëÏÈÑ¡ÔñÐèÒªÐ޸ĵIJ㣡"); return; } int ceng=Integer.parseInt(cengstr); int buttom=Integer.parseInt(jf_buttom.getText().trim()); int top=Integer.parseInt(jf_top.getText().trim()); Dell_cengao.alert_cenggao(ceng, buttom, top); ShowMessage.zidingyi("Ð޸ijɹ¦£¡"); } }); } return jbut_alert; } public JTextField getJf_anchorgas() { if(jf_anchorgas==null) { jf_anchorgas=new JTextField(Systems.sys().getAnchorgas()); } return jf_anchorgas; } public JButtonModel getJbut_anchorgas() { if(jbut_anchorgas==null) { jbut_anchorgas=new JButtonModel("Ð޸IJο¼»ùÕ¾"); jbut_anchorgas.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String anchrgas=jf_anchorgas.getText().trim(); if(Anchor_Dell.get_anchor(anchrgas)==null) { ShowMessage.zidingyi(GetNowTime.now()+"ÄãÊäÈëµÄ»ùÕ¾²»´æÔÚ..."); return; } String[] ziduan2= {"anchorgas","id"}; String[] zhi2= {anchrgas,"1"}; DatabaseManagement.fast_alert_dbase("tb_system", ziduan2, zhi2); Systems.sys().setAnchorgas(anchrgas); ShowMessage.zidingyi(GetNowTime.now()+"Ð޸IJο¼»ùÕ¾³É¹¦..."); } }); } return jbut_anchorgas; } public JTextField getJf_width() { if(jf_width==null) { jf_width=new JTextField(); String a=suanfa.getBaoliu1(); jf_width.setText(a); } return jf_width; } public JTextField getJf_zkc() { if(jf_zkc==null) { String a=suanfa.getBaoliu4(); if(a==null ) { a="×éÎÞ¿ç²ã"; }else if(a.equals("")) { a="×éÎÞ¿ç²ã"; } jf_zkc=new JTextField(a); } return jf_zkc; } /**¿ç²ã¸ß¶È*/ public JTextField getJf_kcacg() { if(jf_kcacg==null) { jf_kcacg=new JTextField(); } return jf_kcacg; } /**±Ø¾­¾àÀë*/ public JTextField getJf_bjjl() { if(jf_bjjl==null) { jf_bjjl=new JTextField(); jf_bjjl.setText("0"); } return jf_bjjl; } /**±Ø¾­×é¾àÀë*/ public JTextField getJf_bjzjl() { if(jf_bjzjl==null) { jf_bjzjl=new JTextField(); jf_bjzjl.setText("0"); } return jf_bjzjl; } /**Ñ¡Ôñ»ùÕ¾*/ public JComboBoxModel getJb_kcacg() { if(jb_kcacg==null) { jb_kcacg=new JComboBoxModel(Anchor_Dell.get_anchorid4()); jb_kcacg.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(jb_kcacg.getSelectedIndex() !=0) { String id=(String) jb_kcacg.getSelectedItem(); Anchor anchor=Anchor_Dell.get_anchor(id); String gao=anchor.getBaoliu2(); String baoliu4=anchor.getBaoliu4(); if(gao !=null) { jf_kcacg.setText(gao); }else { jf_kcacg.setText(""); } if(baoliu4 !=null) { jf_bjjl.setText(baoliu4); }else { jf_bjjl.setText("0"); } }else { jf_kcacg.setText(""); jf_bjjl.setText(""); } } }); } return jb_kcacg; } /**»ùÕ¾ÊôÐÔÉèÖñ£´æ*/ public JButtonModel getJbut_kcacg() { if(jbut_kcacg==null) { jbut_kcacg=new JButtonModel("±£´æÊôÐÔ"); jbut_kcacg.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String anchorid=(String) jb_kcacg.getSelectedItem(); if(anchorid.equals("Ñ¡Ôñ»ùÕ¾")) { String tagh=jf_tagh.getText().trim();//±êÇ©¸ß¶È if(tagh.length()>0) { String[] ziduan= {"baoliu2","id"}; String[] zhi= {tagh,"0"}; DatabaseManagement.fast_alert_dbase("tb_suanfa2", ziduan, zhi); Dell_tb_suanfa2.getSuanfa2().setBaoliu2(tagh); ShowMessage.zidingyi("±£´æ±êÇ©¸ß¶È³É¹¦"); return; }else { ShowMessage.zidingyi("±£´æÊ§°ÜÇëÑ¡Ôñ»ùÕ¾"); return; } } //¿ç²ã¸ß¶È String baoliu2=jf_kcacg.getText().trim(); if(baoliu2.length()<2) { baoliu2="0"; } ////и߶ÈËùÔÚµÄ×é String baoliu3=(String) jb_zu.getSelectedItem(); if(baoliu2.equals("0")) { baoliu3=""; } //±Ø¾­¾àÀë String baoliu4=jf_bjjl.getText().trim(); if(baoliu4.length()<2) { baoliu4=""; baoliu2=""; } String[] ziduan= {"baoliu2","baoliu3","baoliu4","anchorid"}; String[] zhi= {baoliu2,baoliu3,baoliu4,anchorid}; if(DatabaseManagement.fast_alert_dbase("tb_achor", ziduan, zhi)) { Anchor acr=Anchor_Dell.get_anchor(anchorid); if(acr !=null) { acr.setBaoliu2(baoliu2); acr.setBaoliu3(baoliu3); acr.setBaoliu4(baoliu4); } ShowMessage.zidingyi_24("»ùÕ¾"+anchorid+"±£´æ³É¹¦£¬ÖØÆôÈí¼þºóÉúЧ"); } } }); } return jbut_kcacg; } public JCheckBoxModel getJc_outzu() { if(jc_outzu==null) { String a=suanfa.getIs_shi_wai_zu(); if(a==null) { a="0"; } jc_outzu=new JCheckBoxModel("ÊÇ·ñÊÒÍâ×é",a); jc_outzu.setToolTipText("ÊÇ·ñ½«¸Ã×éÉèÖÃΪÊÒÍâµÄ×é"); } return jc_outzu; } public JCheckBoxModel getJc_bjzu() { if(jc_bjzu==null) { String a=suanfa.getIs_bi_jing_zu(); if(a==null) { a="0"; } jc_bjzu=new JCheckBoxModel("ÊÇ·ñ±Ø¾­×é",a); jc_bjzu.setToolTipText("ÊÇ·ñ½«¸Ã×éÉèÖÃΪ±ØÐë¾­¹ýµÄ×é"); } return jc_bjzu; } public JPanelModel1 getMp1() { if(mp1==null) { mp1=new JPanelModel1("»ùÕ¾ÊôÐÔÉèÖÃ"); JlableModel jl_kcgd=new JlableModel("¿ç²ã¸ß¶È:"); JlableModel jl_bjjl=new JlableModel("±Ø¾­¾àÀë:"); int x=10; int y=30; int h=30; mp1.add(getJb_kcacg()); mp1.add(jl_kcgd); mp1.add(jl_bjjl); mp1.add(getJf_kcacg()); mp1.add(getJf_bjjl()); mp1.add(getJbut_kcacg()); mp1.add(jl_tagh); mp1.add(getJf_tagh()); jb_kcacg.setBounds(x, y, 120, h); //¿ç²ã»ùÕ¾¸ß¶È jl_kcgd.setBounds(x+140,y,80, h); jf_kcacg.setBounds(x+220,y,80, h); //±Ø¾­¾àÀë jl_bjjl.setBounds(x+320,y,80, h); jf_bjjl.setBounds(x+400,y,80, h); //±êÇ©½ÃÕýĬÈÏ¸ß¶È jl_tagh.setBounds(x+500,y,80, h); jf_tagh.setBounds(x+580,y,60, h); //±£´æ jbut_kcacg.setBounds(x+660,y,100, h); } return mp1; } public JTextField getJf_zyk() { if(jf_zyk==null) { String a=suanfa.getZu_kuang_du(); jf_zyk=new JTextField(a); } return jf_zyk; } public JTextField getJf_tagh() { if(jf_tagh==null) { String a=suanfa.getBaoliu10(); jf_tagh=new JTextField(a); } return jf_tagh; } /**GNSSתXY×ø±ê*/ public JCheckBoxModel getGnss2xy() { if(gnss2xy==null) { gnss2xy=new JCheckBoxModel("GNSSתXY×ø±ê",Dell_tb_suanfa2.getSuanfa2().getGnss2xy()); gnss2xy.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(gnss2xy.isSelected()) { Dell_tb_suanfa2.setGnss2xyopen(true); Dell_tb_suanfa2.getSuanfa2().setGnss2xy("1"); Dell_tb_suanfa2.alert_database("gnss2xy", "1"); }else { Dell_tb_suanfa2.setGnss2xyopen(false); Dell_tb_suanfa2.getSuanfa2().setGnss2xy("0"); Dell_tb_suanfa2.alert_database("gnss2xy", "0"); } } }); } return gnss2xy; } /**¿ª¹ØÄ£ºý¼ÆËã*/ public JCheckBoxModel get_mo_hu_suanfa() { if(mo_hu_suanfa==null) { mo_hu_suanfa=new JCheckBoxModel("¿ª¹ØÄ£ºýλÖüÆËã",Dell_tb_suanfa2.getSuanfa2().getBaoliu3()); mo_hu_suanfa.setToolTipText("Ä£ºýλÖüÆËãÊÇÖ¸ÔÚËã²»³ö±êǩλÖÃʱºò½«±êÇ©¶¨Î»ÔÚÖ÷»úվλÖÃ"); mo_hu_suanfa.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(mo_hu_suanfa.isSelected()) { Dell_tb_suanfa2.setIs_open_mohujisuan(true); Dell_tb_suanfa2.getSuanfa2().setBaoliu3("1"); Dell_tb_suanfa2.alert_database("baoliu3", "1"); }else { Dell_tb_suanfa2.setIs_open_mohujisuan(false); Dell_tb_suanfa2.getSuanfa2().setBaoliu3("0"); Dell_tb_suanfa2.alert_database("baoliu3", "0"); } } }); } return mo_hu_suanfa; } /**ÔÊÐíÆ½Ãæ²¼¾Ö*/ public JCheckBoxModel getPingmianbuju() { if(pingmianbuju==null) { String a=Dell_tb_suanfa2.getSuanfa2().getPingmianbuju(); pingmianbuju=new JCheckBoxModel("ÔÊÐíÆ½Ãæ²¼¾Ö",a); } return pingmianbuju; } /**ͨ¹ý¾àÀëÅжÏÊÒÄÚÍâ*/ public JCheckBoxModel getDis_juge_indo0r() { if(dis_juge_indo0r==null) { String a=Dell_tb_suanfa2.getSuanfa2().getDis_juge_indo0r(); dis_juge_indo0r=new JCheckBoxModel("ͨ¹ý¾àÀëÅжÏÊÒÄÚÍâ",a); dis_juge_indo0r.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(dis_juge_indo0r.isSelected()) { Dell_tb_suanfa2.setGnss2xyopen(true); Dell_tb_suanfa2.getSuanfa2().setDis_juge_indo0r("1"); Dell_tb_suanfa2.alert_database("dis_juge_indo0r", "1"); }else { Dell_tb_suanfa2.setGnss2xyopen(false); Dell_tb_suanfa2.getSuanfa2().setDis_juge_indo0r("0"); Dell_tb_suanfa2.alert_database("dis_juge_indo0r", "0"); } } }); } return dis_juge_indo0r; } /**ÎÀÐÇÐźÅÇ¿¶ÈÅжÏÊÒÄÚÍâ*/ public JCheckBoxModel getGps_xinhao_indoor() { if(gps_xinhao_indoor==null) { String a=Dell_tb_suanfa2.getSuanfa2().getGps_xinhao_indoor(); gps_xinhao_indoor=new JCheckBoxModel("ÎÀÐÇÐźÅÇ¿¶ÈÅжÏÊÒÄÚÍâ",a); gps_xinhao_indoor.setToolTipText("¿ªÆô¸Ã¹¦ÄÜÐèÒª¹ØÁªÎÀÐÇÐźÅÂËֵʹÓÃ"); gps_xinhao_indoor.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(gps_xinhao_indoor.isSelected()) { Dell_tb_suanfa2.setGnss2xyopen(true); Dell_tb_suanfa2.getSuanfa2().setGps_xinhao_indoor("1"); Dell_tb_suanfa2.alert_database("gps_xinhao_indoor", "1"); }else { Dell_tb_suanfa2.setGnss2xyopen(false); Dell_tb_suanfa2.getSuanfa2().setGps_xinhao_indoor("0"); Dell_tb_suanfa2.alert_database("gps_xinhao_indoor", "0"); } } }); } return gps_xinhao_indoor; } public JCheckBoxModel getJust_buju_qu() { return just_buju_qu; } /**JNAlog¿ª¹Ø*/ public JCheckBoxModel getJnalog() { if(jnalog==null) { String a=Dell_tb_suanfa2.getSuanfa2().getJnalog(); jnalog=new JCheckBoxModel("JNAlog¿ª¹Ø",a); jnalog.setToolTipText("¹´Ñ¡½«»á±£´æËã·¨ÈÕÖ¾¼Ç¼Êý¾Ý"); jnalog.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(jnalog.isSelected()) { Dell_tb_suanfa2.setGnss2xyopen(true); Dell_tb_suanfa2.getSuanfa2().setJnalog("1"); Dell_tb_suanfa2.alert_database("jnalog", "1"); }else { Dell_tb_suanfa2.setGnss2xyopen(false); Dell_tb_suanfa2.getSuanfa2().setJnalog("0"); Dell_tb_suanfa2.alert_database("jnalog", "0"); } } }); } return jnalog; } /**ÊÒÄÚÇøÓòÅжÏÊÒÄÚÍâ*/ public JCheckBoxModel getIndoor_juge_in() { if(indoor_juge_in==null) { String a=Dell_tb_suanfa2.getSuanfa2().getIndoor_juge_in(); indoor_juge_in=new JCheckBoxModel("ÊÒÄÚÇøÓòÅжÏÊÒÄÚÍâ",a); indoor_juge_in.setToolTipText("¿ªÆô¸Ã¹¦ÄÜÐè»æÖÆÊÒÄÚÇøÓòÅäºÏʹÓÃ"); indoor_juge_in.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(indoor_juge_in.isSelected()) { Dell_tb_suanfa2.setInuwbarea(true); Dell_tb_suanfa2.getSuanfa2().setIndoor_juge_in("1"); Dell_tb_suanfa2.alert_database("indoor_juge_in", "1"); }else { Dell_tb_suanfa2.setInuwbarea(false); Dell_tb_suanfa2.getSuanfa2().setIndoor_juge_in("1"); Dell_tb_suanfa2.alert_database("indoor_juge_in", "0"); } } }); } return indoor_juge_in; } /**¾²Ö¹¹ýÂËÖµ*/ public JTextField getJing_zhi_lv_zhi() { if(jing_zhi_lv_zhi==null) { String a=Dell_tb_suanfa2.getSuanfa2().getJing_zhi_lv_zhi(); jing_zhi_lv_zhi=new JTextField(a); jing_zhi_lv_zhi.setToolTipText("±êÇ©¾²Ö¹µÄʱºòÈñêÇ©ÒÆ¶¯µÄ·¶Î§"); } return jing_zhi_lv_zhi; } /**λÖùýÂËÖµ*/ public JTextField getwei_zhi_guo_lv() { if(wei_zhi_guo_lv==null) { String a=Dell_tb_suanfa2.getSuanfa2().getWei_zhi_guo_lv(); wei_zhi_guo_lv=new JTextField(a); wei_zhi_guo_lv.setToolTipText("ÉÏÒ»¸ö×ø±êºÍµ±Ç°×ø±ê¾àÀë´óÓÚ¸ÃÖµ¹ýÂ˵ô"); } return wei_zhi_guo_lv; } /**ʱ¼ä϶·ÖÅä*/ public JComboBoxModel getShi_xi_fen_pei() { if(shi_xi_fen_pei==null) { String[] floor= {"MIX","GAP1"}; shi_xi_fen_pei=new JComboBoxModel(floor);//´´½¨ÏÂÀ­¿ò¶ÔÏótagComboBox shi_xi_fen_pei.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 12));//ÉèÖÃ×ÖÌå String a=Dell_tb_suanfa2.getSuanfa2().getShi_xi_fen_pei(); if(a.equals("1")) { shi_xi_fen_pei.setSelectedItem("MIX"); }else { shi_xi_fen_pei.setSelectedItem("GAP1"); } } return shi_xi_fen_pei; } /**Â˲¨·½Ê½*/ public JComboBoxModel getLv_bo_fang_shi() { if(lv_bo_fang_shi==null) { String[] quyu= {"µÍͨ","»¬¶¯"}; lv_bo_fang_shi=new JComboBoxModel(quyu); String a1=Dell_tb_suanfa2.getSuanfa2().getLv_bo_fang_shi(); if(a1.equals("0")) { lv_bo_fang_shi.setSelectedItem("µÍͨ"); }else { lv_bo_fang_shi.setSelectedItem("»¬¶¯"); } } return lv_bo_fang_shi; } public JTextField getWei_zhi_guo_lv() { return wei_zhi_guo_lv; } /**ת·¢×îºóλÖÃ*/ public JComboBoxModel getShu_ju_zhuan_fa() { if(shu_ju_zhuan_fa==null) { String[] as= {"²»×ª·¢×îºóλÖÃ","ÀëÏßת·¢×îºóλÖÃ","ÐÝÃßת·¢×îºóλÖÃ","ÀëÏßÐÝÃßת·¢×îºóλÖÃ"}; shu_ju_zhuan_fa=new JComboBoxModel(as);//´´½¨ÏÂÀ­¿ò¶ÔÏótagComboBox shu_ju_zhuan_fa.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 14));//ÉèÖÃ×ÖÌå shu_ju_zhuan_fa.setBackground(Color.white); String a=Dell_tb_suanfa2.getSuanfa2().getShu_ju_zhuan_fa(); if(a.equals("1")) { shu_ju_zhuan_fa.setSelectedItem("ÀëÏßת·¢×îºóλÖÃ"); }else if(a.equals("2")){ shu_ju_zhuan_fa.setSelectedItem("ÐÝÃßת·¢×îºóλÖÃ"); }else if(a.equals("3")){ shu_ju_zhuan_fa.setSelectedItem("ÀëÏßÐÝÃßת·¢×îºóλÖÃ"); }else if(a.equals("0")) { shu_ju_zhuan_fa.setSelectedItem("²»×ª·¢×îºóλÖÃ"); } } return shu_ju_zhuan_fa; } /**ÎÀÐÇÐźÅ*/ public JTextField getGps_qiangdu() { if(gps_qiangdu==null) { String a=Dell_tb_suanfa2.getSuanfa2().getGps_qiangdu(); gps_qiangdu=new JTextField(a); } return gps_qiangdu; } public JPanelModel1 getMp3() { if(mp3==null) { mp3=new JPanelModel1("ÌØÊâËã·¨ÉèÖÃ"); //GNSSתXY×ø±ê mp3.add(getGnss2xy()); //ÔÊÐíÆ½Ãæ²¼¾Ö mp3.add(getPingmianbuju()); //ͨ¹ý¾àÀëÅжÏÊÒÄÚÍâ mp3.add(getDis_juge_indo0r()); //ÎÀÐÇÐźÅÇ¿¶ÈÅжÏÊÒÄÚÍâ mp3.add(getGps_xinhao_indoor()); //¿ªÆôGNAlog mp3.add(getJnalog()); //ÊÒÄÚÇøÓòÅжÏÊÒÄÚÍâ mp3.add(getIndoor_juge_in()); //¾²Ö¹¹ýÂËÖµ mp3.add(getJing_zhi_lv_zhi()); //λÖùýÂËÖµ mp3.add(getwei_zhi_guo_lv()); //ʱ¼ä϶·ÖÅä mp3.add(getShi_xi_fen_pei()); //Â˲¨·½Ê½ mp3.add(getLv_bo_fang_shi()); //ת·¢×îºóλÖà mp3.add(getShu_ju_zhuan_fa()); //ÎÀÐÇÐźŠmp3.add(getGps_qiangdu()); //ÊÇ·ñ¿ªÆôÄ£ºý¶¨Î»Ëã·¨ mp3.add(get_mo_hu_suanfa()); int x=10; int y=30; int width=180; int height=30; getGnss2xy().setBounds(x, y, width, height); int x1=x+width+30; getIndoor_juge_in().setBounds(x1, y, width, height);//ÊÒÄÚÇøÓòÅжÏÊÒÄÚÍâ int x2=x1+width+40; getDis_juge_indo0r().setBounds(x2, y, width, height);//ͨ¹ý¾àÀëÅжÏÊÒÄÚÍâ int x3=x2+width+50; getGps_xinhao_indoor().setBounds(x3, y, width+10, height);//ÎÀÐÇÐźÅÇ¿¶ÈÅжÏÊÒÄÚÍâ int y1=y+height+30; getJnalog().setBounds(x, y1, width, height); //¿ªÆôGNAlog get_mo_hu_suanfa().setBounds(x1, y1,200, height);//Ä£ºýλÖüÆËã int x4=x2; JlableModel a2=new JlableModel("ʱ϶·ÖÅ䷽ʽ:"); mp3.add(a2); a2.setBounds(x4, y1,100, height); getShi_xi_fen_pei().setBounds(x4+100, y1,80, height);//ʱ¼ä϶·ÖÅä int x5=x3; JlableModel a3=new JlableModel("Â˲¨Ëã·¨ÉèÖÃ:"); mp3.add(a3); a3.setBounds(x5, y1,100, height); getLv_bo_fang_shi().setBounds(x5+110, y1,80, height);//Â˲¨·½Ê½ int y2=y1+height+30; JlableModel a4=new JlableModel("ÎÀÐÇÐźÅÂËÖµ:"); a4.setToolTipText("ÎÀÐÇÐźŹýÂËÖµ£º×î´óÖµ£»×îСֵ£»¹ýÂË´ÎÊý"); mp3.add(a4); a4.setBounds(x, y2,110, height); getGps_qiangdu().setBounds(x+110, y2,80, height); //ÎÀÐÇÐźŠJlableModel a5=new JlableModel("λÖùýÂËÖµ/cm:"); a5.setToolTipText("ÉÏÒ»¸ö×ø±êºÍµ±Ç°×ø±ê¾àÀë´óÓÚ¸ÃÖµ¹ýÂ˵ô"); mp3.add(a5); a5.setBounds(x1, y2,120, height); getwei_zhi_guo_lv().setBounds(x1+120, y2,50, height); getShu_ju_zhuan_fa().setBounds(x2, y2, 180, height);//ת·¢×îºóλÖà JlableModel a6=new JlableModel("¹Ø±ÕUWBÌõ¼þ:"); a6.setToolTipText("-1²»¹Ø±ÕUWB,1µ¥µã¶¨Î»,2Âë²î·Ö,4¹Ì¶¨½â,5¸¡µã½â¶à¸öÌõ¼þÓÃ;·Ö¸ô"); mp3.add(getJf_closeuwb()); mp3.add(a6); a6.setBounds(x5, y2,100, height); getJf_closeuwb().setBounds(x5+110, y2,80, height);//Â˲¨·½Ê½ int y3=y2+height+30; JlableModel a1=new JlableModel("¾²Ö¹¹ýÂËÖµ/cm:"); a1.setToolTipText("±êÇ©¾²Ö¹µÄʱºòÈñêÇ©ÒÆ¶¯µÄ·¶Î§"); mp3.add(a1); a1.setBounds(x, y3,120, height); getJing_zhi_lv_zhi().setBounds(x+120, y3,70, height);//¾²Ö¹¹ýÂËÖµ mp3.add(getJbut_save_suanfa()); getJbut_save_suanfa().setBounds(x3, y3, 120, height); } return mp3; } public JScrollPane getJsp(){ if (jsp==null){ jsp=new JScrollPane(getMb1(),ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jsp.getVerticalScrollBar().setUnitIncrement(20); } return jsp; } /**±£´æÌØÊâËã·¨ÉèÖÃ*/ public JButtonModel getJbut_save_suanfa() { if(jbut_sure1==null) { jbut_sure1=new JButtonModel("±£´æÌØÊâËã·¨"); jbut_sure1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String gnss2xy="0"; if(getGnss2xy().isSelected()) { gnss2xy="1"; } String dis_juge_indo0r="0"; if(getDis_juge_indo0r().isSelected()) { dis_juge_indo0r="1"; } String gps_xinhao_indoor="0"; if(getGps_xinhao_indoor().isSelected()) { gps_xinhao_indoor="1"; } String jnalog="0"; if(getJnalog().isSelected()) { jnalog="1"; } String indoor_juge_in="0"; if(getIndoor_juge_in().isSelected()) { indoor_juge_in="1"; } String jing_zhi_lv_zhi=getJing_zhi_lv_zhi().getText(); String shi_xi_fen_pei="1"; if(getShi_xi_fen_pei().getSelectedIndex()==1) { shi_xi_fen_pei="0"; } String lv_bo_fang_shi="0"; if(getLv_bo_fang_shi().getSelectedIndex()==1) { lv_bo_fang_shi="1"; } String wei_zhi_guo_lv=getwei_zhi_guo_lv().getText();//λÖùýÂË String shu_ju_zhuan_fa=getShu_ju_zhuan_fa().getSelectedIndex()+""; String gps_qiangdu=getGps_qiangdu().getText(); String UWBclose=getJf_closeuwb().getText().trim();//¹Ø±ÕUWBµÄÌõ¼þbaoliu4 if(UWBclose.length()<1) { UWBclose="-1"; } Dell_tb_suanfa2.save_suanfa2_indatabase( gnss2xy, dis_juge_indo0r, gps_xinhao_indoor, jnalog, indoor_juge_in, jing_zhi_lv_zhi, shi_xi_fen_pei, lv_bo_fang_shi, wei_zhi_guo_lv, shu_ju_zhuan_fa, gps_qiangdu, UWBclose ); } }); } return jbut_sure1; } public JTextField getJf_closeuwb() { if(jf_closeuwb==null) { String a=Dell_tb_suanfa2.getSuanfa2().getBaoliu4(); jf_closeuwb=new JTextField(a); jf_closeuwb.setToolTipText("¹Ø±ÕUWB¹¤×÷µÄÌõ¼þ£¬¶à¸öÓÃ;·Ö¸ô£¬-1±íʾ²»¹Ø±Õ"); } return jf_closeuwb; } public void setJf_closeuwb(JTextField jf_closeuwb) { this.jf_closeuwb = jf_closeuwb; } }