zsh_root
2024-01-02 7b595546af704983dbafcd0d385c8768ddacefc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
package Frame;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.Iterator;
import java.util.Vector;
import javax.swing.Box;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import BaoWen.Dell_55AA07;
import ColorAndFont.NothJPanel;
import ColorAndFont.UIColor;
import ColorAndFont.buttonTitle;
import DataBase.DatabaseManagement;
import Method.GetNowTime;
import PbuliClass.JButtonModel;
import PbuliClass.JlableModel;
import PbuliClass.ShowMessage;
import PbuliClass.Systems;
import PbuliClass.WarningMessage;
import PbuliClass.greateTables;
import PbuliClass.jinternalFrame;
import fence.Fences;
import shiping.Dell_shiping;
import shiping.tb_shipin;
 
@SuppressWarnings("serial")
public class ShipingManage extends jinternalFrame{
 
    JTextField JF_serch=null;//ËÑË÷Îı¾¿ò
    JButtonModel Jbt_search=null;//ËÑË÷°´Å¥
    JButtonModel Jbt_shuaxin=null;//ˢа´Å¥
    JButtonModel Jbt_add=null;//ÐÂÔö°´Å¥
    JButtonModel Jbt_alter=null;//Ð޸İ´Å¥
    JButtonModel Jbt_delete=null;//ɾ³ý°´Å¥
    JButtonModel Jbt_deleteAll=null;//È«²¿É¾³ý°´Å¥
 
    NothJPanel northPanel=null;//±±²¿Ãæ°å
    JPanel centerPanel=null;//Öв¿Ãæ°å
    JScrollPane gd=null;//¹ö¶¯Ãæ°å
 
    JTable table=null;//ÉêÃ÷±í¸ñ
    DefaultTableModel tableModel=null;//ÉùÃ÷±í¸ñÄ£ÐÍ
 
    AddAchorDialog AddAchorDialog1=null;
 
    public ShipingManage() {//¹¹Ôì·½·¨
        this.setTitle("ÊÓÆµ¹ÜÀí");
        this.setFrameIcon(new ImageIcon("image/icon/vediao.png"));//ÉèÖô°Ìåͼ±ê
        Container rq=getContentPane();//»ñÈ¡ÈÝÆ÷
        rq.setLayout(new BorderLayout());
        rq.setBackground(UIColor.getNorth_color());
        rq.add(getNorthPanel(),BorderLayout.NORTH);
        rq.add(getGd(),BorderLayout.CENTER);
 
    }
 
 
    /**»ñÈ¡±±²¿Ãæ°åµÄ·½·¨*/    
    public NothJPanel getNorthPanel() {
        if(northPanel==null) {
            northPanel=new NothJPanel();
            Box topicBox = Box.createHorizontalBox();// ´´½¨Ò»¸öˮƽÏäÈÝÆ÷
            topicBox.add(getJF_serch());//Ìí¼ÓËÑË÷Îı¾¿ò
            topicBox.add(Box.createHorizontalStrut(3));// Ìí¼ÓÒ»¸ö3ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getJbt_search());//Ìí¼ÓËÑË÷°´Å¥
            topicBox.add(Box.createHorizontalStrut(5));// Ìí¼ÓÒ»¸ö5ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getJbt_shuaxin());//Ìí¼Óˢа´Å¥
            topicBox.add(Box.createHorizontalStrut(5));// Ìí¼ÓÒ»¸ö5ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getJbt_add());//Ìí¼ÓÐÂÔö°´Å¥
            topicBox.add(Box.createHorizontalStrut(5));// Ìí¼ÓÒ»¸ö5ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getJbt_alter());//Ìí¼ÓÐ޸İ´Å¥
            topicBox.add(Box.createHorizontalStrut(5));// Ìí¼ÓÒ»¸ö5ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getJbt_delete());//Ìí¼Óɾ³ý°´Å¥
            topicBox.add(Box.createHorizontalStrut(5));// Ìí¼ÓÒ»¸ö5ÏñËØ¿íµÄˮƽ֧Öù
            topicBox.add(getJbt_deleteAll());//Ìí¼Óɾ³ýÈ«²¿°´Å¥
            northPanel.add(topicBox );
        }
        return northPanel;
    }
 
 
    /**»ñÈ¡Öв¿Ãæ°åµÄ·½·¨*/    
    public JPanel getCenterPanel() {
        if(centerPanel==null) {
            centerPanel=new JPanel();
            centerPanel.add(getGd());//Ìí¼Ó¹ö¶¯Ãæ°å
            centerPanel.setBackground(UIColor.getNorth_color());
 
        }
        return centerPanel;
    }
 
    /**»ñÈ¡¹ö¶¯Ãæ°åµÄ·½·¨*/    
    public JScrollPane getGd() {
        if(gd==null){
            gd=new JScrollPane();
            gd.getViewport().setBackground(UIColor.getNorth_color());
            gd.setViewportView(getTable());
 
        }
        return gd;
    }
 
    /**»ñÈ¡»ùÕ¾±í¸ñµÄ·½·¨*/    
    @SuppressWarnings("rawtypes")
    public JTable getTable() {
        if(table==null) {    
 
            String name1="ÐòºÅ";
            String name2="ÇøÓò";
            String name3="±àºÅ";
            String name4="ͨµÀ";
            String name5="x×ø±ê";
            String name6="y×ø±ê";
            String name7="z×ø±ê";
            String name8="ËùÔÚ²ã";
            String name9="Ãû³Æ";
            String name10="Ìí¼Óʱ¼ä";
            if(Systems.sys().getLanguage().equals("English")) {
                name1="xuhao";
                name2="quyu";
                name3="bianhao)";
                name4="tongdao";
                name5="x";
                name6="y";
                name7="z";
                name8="floor";
                name9="name";
                name10="addtime";
            }
            //Ìí¼Ó±í¸ñÁÐÏòÁ¿
            String[] columnNames= {name1,name2,name3,name4,name5,name6,name7,
                    name8,name9,name10};//±í¸ñÁÐÃû
            Vector<String> columnName=new Vector<>();
            for(int i=0;i<columnNames.length;i++){
                columnName.add(columnNames[i]);            
            }            
            greateTables tables=new greateTables();
            Vector rowData=new Vector();
            tableModel=new DefaultTableModel(rowData, columnName){  
                //  ÊµÏÖÈÃÕû¸ö±í¸ñ²»²»ÔÊÐí±»±à¼­
                public boolean isCellEditable(int row,int column){  
                    return false;  
                }  
            };
 
            table=tables.getTable(tableModel);    
            getRowData(Dell_shiping.getShiping_vector());
        }
 
        return table;
 
    }
 
    /**Ìí¼Ó±í¸ñÐÐÏòÁ¿Êý¾Ý·½·¨*/
    public void getRowData( Vector<tb_shipin> shiping_vector ) {
        Iterator<tb_shipin> iterator = shiping_vector.iterator();//´´½¨µü´úÆ÷        
        while (iterator.hasNext()) {//µü´úÆ÷´æÔÚÔªËØ            
            tb_shipin sp=  iterator.next();//½«µü´úÆ÷ÀïÃæµÄÔªËØ¸øµ½list¼¯ºÏ
            Vector<String> row = new Vector<String>();
            row.add(sp.getId());
            row.add(sp.getFencename());
            row.add(sp.getShebeiid());
            row.add(sp.getTongdaoid());
            row.add(sp.getPosx());
            row.add(sp.getPosy());
            row.add(sp.getPosz());
            row.add(sp.getFloor());
            row.add(sp.getName());
            row.add(sp.getAddtime());
            tableModel.addRow(row);
        }
    }
 
    public JTextField getJF_serch() {
        if( JF_serch==null) {
            JF_serch=new JTextField(5);
        }
        return JF_serch;
    }
 
    public JButtonModel getJbt_search() {
        if( Jbt_search==null) {
            Jbt_search=new JButtonModel("ËÑË÷");
            Jbt_search.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
 
                }
            });
        }
        return Jbt_search;
    }
    public JButtonModel getJbt_shuaxin() {
        if( Jbt_shuaxin==null) {
            Jbt_shuaxin=new JButtonModel("Ë¢ÐÂ");
            Jbt_shuaxin.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    updateTable();
                }
            });
        }
        return Jbt_shuaxin;
    }
    public JButtonModel getJbt_add() {
        if( Jbt_add==null) {
            Jbt_add=new JButtonModel("ÐÂÔö");
            Jbt_add.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(AddAchorDialog1==null) {
                        AddAchorDialog1=new AddAchorDialog("ÐÂÔöÊÓÆµ");
                    }
                }
            });
        }
        return Jbt_add;
    }
    public JButtonModel getJbt_alter() {
        if( Jbt_alter==null) {
            Jbt_alter=new JButtonModel("ÐÞ¸Ä");
            Jbt_alter.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    int row=table.getSelectedRow();
                    if(row!=-1) {//Èç¹ûÑ¡ÖеÄÐв»Îª¿Õ
                        new alertDiolog("ÐÞ¸ÄÊÓÆµ¶Ô»°¿ò");
                    }
                    else {
                        ShowMessage.zidingyi("ÇëÏÈÑ¡ÖÐÐèÒªÐ޸ĵÄÐÐ!");
                        return;
                    }
 
                }
            });
        }
        return Jbt_alter;
    }
    public JButtonModel getJbt_delete() {
        if( Jbt_delete==null) {
            Jbt_delete=new JButtonModel("ɾ³ý");
            Jbt_delete.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    //±»Ñ¡ÖÐÐеÄË÷Òý¼¯ºÏ
                    int[] selectedRows=table.getSelectedRows();
                    if(selectedRows.length !=0) {
                        for(int i=0;i<selectedRows.length;i++){                                
                            String shebeiid=(String) table.getValueAt(selectedRows[i], 2);                            
                            //½«±êÇ©Êý¾Ý±íÖеÄ״̬ÐÞ¸ÄΪ·ñ
                            String deleteSql="DELETE FROM tb_shipin WHERE shebeiid='"+shebeiid+"'";                            
                            if (DatabaseManagement.update(deleteSql)!=0) {
                                Dell_shiping.delete(shebeiid);                                
                            }
                        }
 
                        for(int j=selectedRows.length-1;j>=0;j--){//ÕâÊǹؼü´úÂë
                            tableModel.removeRow(selectedRows[j]);//ɾ³ýÈÎÒⱻѡÖÐÐÐ
                        }
                        table.setModel(tableModel);//¸üбí¸ñÄ£ÐÍ
                        //ɾ³ý³É¹¦ÌáʾÐÅÏ¢
                        ShowMessage.delteSuccess(selectedRows.length);
 
                    }
                    else {
                        ShowMessage.chooseRow(buttonTitle.getDelete());                
                    }
 
                }
            });
        }
        return Jbt_delete;
    }
    public JButtonModel getJbt_deleteAll() {
        if( Jbt_deleteAll==null) {
            Jbt_deleteAll=new JButtonModel("È«²¿É¾³ý");
            Jbt_deleteAll.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    //Ñ¡Ôñ¶Ô»°¿òÈçyes·µ»Ø0£¬NO·µ»Ø1£¬È¡Ïû·µ»Ø2
                    WarningMessage warning=new WarningMessage();
                    warning.setMessage("Ñ¡Ôñɾ³ýÈ«²¿½«É¾³ýËùÓеıêÇ©¼Ç¼£¡");
                    int warn=warning.getwarMss(getCenterPanel());
                    int tagnum=table.getRowCount();//±í¸ñ×ÜÐÐÊý
                    if(tagnum!=0 && warn==0) {
                        Dell_shiping.deleteall();
                        ShowMessage.zidingyi("ɾ³ýËùÓÐÊÓÆµÊý¾ÝÍê³É...");    
                        updateTable() ;
                    }
                }
            });
        }
        return Jbt_deleteAll;
    }
 
    /**ÐÂÔöÊÓÆµ¶Ô»°¿ò*/
    class AddAchorDialog extends JDialog implements WindowListener{
 
 
        JlableModel Jl_name=new JlableModel("ÊÓÆµÃû³Æ:");
        JlableModel Jl_quyue=new JlableModel("ÊÓÆµÇøÓò:");
        JlableModel Jl_bianhao=new JlableModel("ÊÓÆµ±àºÅ:");
        JlableModel Jl_tongdao=new JlableModel("ÊÓÆµÍ¨µÀ:");
        JlableModel Jl_posx=new JlableModel("λÖÃX/cm:");
        JlableModel Jl_posy=new JlableModel("λÖÃY/cm:");
        JlableModel Jl_posz=new JlableModel("λÖÃZ/cm:");
        JlableModel Jl_floor=new JlableModel("ËùÔÚ²ã:");
 
        JButtonModel sure=null;//È·¶¨°´Å¥
        JButtonModel quxiao=null;//È¡Ïû°´Å¥
 
        JTextField Jt_name=null;
        JTextField Jt_bianhao=null;
        JTextField Jt_tongdao=null;
        JTextField Jt_posx=null;
        JTextField Jt_posy=null;
        JTextField Jt_posz=null;
        JTextField Jt_floor=null;
 
        JComboBox<String> Jc_quyu=null;//ËùÓÐÊÓÆµÇøÓò¼¯ºÏ
 
 
 
        JPanel mb=null;//ÉêÃ÷Ò»¸öÃæ°å
 
        /**»ñÈ¡¶Ô»°¿ò·½·¨*/
        public AddAchorDialog(String title) {
            super();    
            //this.setModal(true);//´°Ìå×èÈû
            this.setAlwaysOnTop(true);//×ÜÊÇÖö¥
            this.setTitle(title);
            Toolkit toolkit = getToolkit();// »ñµÃ´°Ì幤¾ß°ü
            Dimension screenSize = toolkit.getScreenSize();// »ñÈ¡ÆÁÄ»´óС
            int width = (int) (screenSize.width);// ¼ÆËã´°Ìåпí¶È
            int height = (int) (screenSize.height);// ¼ÆËã´°Ìåпí¶È
            int w=370;
            int h=460;
            int x0=(width-w)/2;//´°Ìåx0×ø±ê
            int y0=(height-h)/2;//´°Ìåy0×ø±ê
            Container rq=getContentPane();        
            rq.add(getMb());
            this.setBounds(x0, y0,w ,h);
            this.setVisible(true);
            this.addWindowListener((WindowListener) this);
            this.setIconImage(new ImageIcon("image/icon/vediao.png").getImage());
            Dell_55AA07.setTanchu(true);
 
        }
 
        /**»ñÈ¡Ãæ°å*/
        public JPanel getMb() {
 
            if(mb==null){
                mb=new JPanel();
                mb.setLayout(null);
                mb.add(Jl_name);
                mb.add(Jl_quyue);
                mb.add(Jl_bianhao);
                mb.add(Jl_tongdao);
                mb.add(Jl_posx);
                mb.add(Jl_posy);
                mb.add(Jl_posz);
                mb.add(Jl_floor);
 
 
                mb.add(getJt_name());
                mb.add(getJc_quyu());
                mb.add(getJt_bianhao());
                mb.add(getJt_tongdao());
                mb.add(getJt_posx());
                mb.add(getJt_posy());
                mb.add(getJt_posz());
                mb.add(getJt_floor());
                mb.add(getSure());
                mb.add(getQuxiao());
 
                int x=40;
                int y=10;
                int width=80;
                int h=25;
                int j=20;
 
 
                Jl_name.setBounds(x, y, width, h);
                Jt_name.setBounds(x+width, y, 2*width, h);
 
                Jl_quyue.setBounds(x, y+1*(j+h), width, h);
                Jc_quyu.setBounds(x+width, y+1*(j+h), 2*width, h);
 
                Jl_bianhao.setBounds(x, y+2*(j+h), width, h);
                Jt_bianhao.setBounds(x+width, y+2*(j+h), 2*width, h);
 
                Jl_tongdao.setBounds(x, y+3*(j+h), width, h);
                Jt_tongdao.setBounds(x+width, y+3*(j+h), 2*width, h);
 
 
                Jl_posx.setBounds(x, y+4*(j+h), width, h);
                Jt_posx.setBounds(x+width, y+4*(j+h), 2*width, h);
 
 
                Jl_posy.setBounds(x, y+5*(j+h), width, h);
                Jt_posy.setBounds(x+width, y+5*(j+h), 2*width, h);
 
 
                Jl_posz.setBounds(x, y+6*(j+h), width, h);
                Jt_posz.setBounds(x+width, y+6*(j+h), 2*width, h);
 
 
                Jl_floor.setBounds(x, y+7*(j+h), width, h);
                Jt_floor.setBounds(x+width, y+7*(j+h), 2*width, h);
 
 
                sure.setBounds(x+20, y+8*(j+h), width, h);                
                quxiao.setBounds(x+width+50, y+8*(j+h), width, h);
 
 
 
            }
            return mb;
        }
 
        /**¹Ø±Õ¶Ô»°¿ò·½·¨*/
        public void closeDialog() {
            this.dispose();
            AddAchorDialog1=null;
 
        }
 
        public JButtonModel getSure() {
            if(sure==null) {
                sure=new JButtonModel("È·¶¨");
                sure.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String name=Jt_name.getText().trim();
                        String shebeiid=Jt_bianhao.getText().trim();
                        String tongdaoid=Jt_tongdao.getText().trim();
                        String posx=Jt_posx.getText().trim();
                        String posy=Jt_posy.getText().trim();
                        String posz=Jt_posz.getText().trim();
                        String floor=Jt_floor.getText().trim();
                        String fencename=(String) Jc_quyu.getSelectedItem();
                        String addtime=GetNowTime.now();
 
                        if(shebeiid.length()<1) {
                            ShowMessage.zidingyi("ÊÓÆµidÓдíÎó£¬Çë¼ì²é£¡");
                            return;
                        }
 
                        if(posx.length()<1) {
                            posx="0";
                        }
 
                        if(posy.length()<1) {
                            posy="0";
                        }
 
                        if(posz.length()<1) {
                            posz="0";
                        }
 
                        if(floor.length()<1) {
                            floor="0";
                        }
 
                        Dell_shiping.add(fencename, shebeiid, tongdaoid, posx, posy, posz, floor,name);
                        //Ïò±í¸ñĩβÌí¼ÓÒ»ÐÐÊý¾Ý 
                        Vector<String> addrowData=new Vector<String>();
                        String num=String.valueOf(table.getRowCount()+1);
                        addrowData.add(num);
                        addrowData.add(fencename);
                        addrowData.add(shebeiid);
                        addrowData.add(tongdaoid);                            
                        addrowData.add(posx);
                        addrowData.add(posy);    
                        addrowData.add(posz);
                        addrowData.add(floor);
                        addrowData.add(name);
                        addrowData.add(addtime);
                        tableModel.addRow(addrowData);                        
 
                        ShowMessage.zidingyi("ÊÓÆµÐ´ÈëÊý¾Ý¿â³É¹¦£¡");
                    }
                });
            }
            return sure;
        }
 
        public JButtonModel getQuxiao() {
            if(quxiao==null) {
                quxiao=new JButtonModel("È¡Ïû");
                quxiao.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        closeDialog();
                    }
                });
            }
 
            return quxiao;
        }
 
        public JTextField getJt_name() {
            if(Jt_name==null) {
                Jt_name=new JTextField();
            }
            return Jt_name;
        }
 
        public JTextField getJt_bianhao() {
            if(Jt_bianhao==null) {
                Jt_bianhao=new JTextField();
            }
 
            return Jt_bianhao;
        }
 
        public JTextField getJt_tongdao() {
            if(Jt_tongdao==null) {
                Jt_tongdao=new JTextField();
            }
            return Jt_tongdao;
        }
 
        public JTextField getJt_posx() {
            if(Jt_posx==null) {
                Jt_posx=new JTextField();
            }
            return Jt_posx;
        }
 
        public JTextField getJt_posy() {
            if(Jt_posy==null) {
                Jt_posy=new JTextField();
            }
            return Jt_posy;
        }
 
        public JTextField getJt_posz() {
            if(Jt_posz==null) {
                Jt_posz=new JTextField();
            }
            return Jt_posz;
        }
 
        public JTextField getJt_floor() {
            if(Jt_floor==null) {
                Jt_floor=new JTextField();
            }
            return Jt_floor;
        }
 
        public JComboBox<String> getJc_quyu() {
            if(Jc_quyu==null) {
                Jc_quyu=new JComboBox<String>();
                String[] a=Fences.getfencesstr("ÊÓÆµÇøÓò");
                ComboBoxModel <String> coModel=new DefaultComboBoxModel<>(a);//ÏÂÀ­ÁбíÄ£ÐÍ            
                Jc_quyu.setModel(coModel);
            }
            return Jc_quyu;
        }
 
        @Override
        public void windowOpened(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowClosing(WindowEvent e) {
            AddAchorDialog1=null;
 
        }
 
        @Override
        public void windowClosed(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowIconified(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowDeiconified(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowActivated(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }
 
        @Override
        public void windowDeactivated(WindowEvent e) {
            // TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
 
        }    
    }
 
    /**Ð޸ĻùÕ¾¶Ô»°¿ò*/
    class  alertDiolog extends AddAchorDialog{
 
        /**
         * 
         */
        private static final long serialVersionUID = 1L;
 
 
        public alertDiolog(String title) {
            super(title);
            int row=table.getSelectedRow();
            getJt_name().setText((String)table.getValueAt(row,8));
            getJt_bianhao().setEnabled(false);
            getJt_bianhao().setText((String)table.getValueAt(row,2));
            getJt_tongdao().setText((String)table.getValueAt(row,3));
            getJt_posx().setText((String)table.getValueAt(row,4));
            getJt_posy().setText((String)table.getValueAt(row,5));
            getJt_posz().setText((String)table.getValueAt(row,6));
            getJt_floor().setText((String)table.getValueAt(row,7));
            getJc_quyu().setSelectedItem((String)table.getValueAt(row,1));
        }
 
        public JButtonModel getSure() {
            if(sure==null) {
                sure=new JButtonModel("È·¶¨");
                sure.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        String name=getJt_name().getText().trim();
                        String shebeiid=getJt_bianhao().getText().trim();
                        String tongdaoid=getJt_tongdao().getText().trim();
                        String posx=getJt_posx().getText().trim();
                        String posy=getJt_posy().getText().trim();
                        String posz=getJt_posz().getText().trim();
                        String floor=getJt_floor().getText().trim();
                        String fencename=(String) getJc_quyu().getSelectedItem();
                        if(shebeiid.length()<1) {
                            ShowMessage.zidingyi("ÊÓÆµidÓдíÎó£¬Çë¼ì²é£¡");
                            return;
                        }
 
                        if(posx.length()<1) {
                            posx="0";
                        }
 
                        if(posy.length()<1) {
                            posy="0";
                        }
 
                        if(posz.length()<1) {
                            posz="0";
                        }
 
                        if(floor.length()<1) {
                            floor="0";
                        }
 
                        Dell_shiping.alert(fencename, shebeiid, tongdaoid, posx, posy, posz, floor,name);
                        updateTable() ;
                        ShowMessage.zidingyi("ÐÞ¸ÄÊý¾Ý¿â³É¹¦£¡");
 
                    }
                });
            }
            return sure;
        }
 
    }
 
    /**ˢбí¸ñ·½·¨*/
    public void updateTable() {    
        if(tableModel !=null) {
            tableModel.getDataVector().clear();
            getRowData( Dell_shiping.getShiping_vector());
            gd.validate();
        }
    }
 
 
}