Statistics
| Revision:

root / branches / v10 / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / view / gui / ViewProperties.java @ 10379

History | View | Annotate | Download (17.6 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
package com.iver.cit.gvsig.project.documents.view.gui;
42

    
43

    
44
import java.awt.Color;
45
import java.awt.Dimension;
46
import java.awt.GridLayout;
47
import java.awt.event.ActionListener;
48

    
49
import javax.swing.JColorChooser;
50
import javax.swing.JPanel;
51

    
52
import org.gvsig.gui.beans.AcceptCancelPanel;
53
import org.gvsig.gui.beans.swing.JButton;
54

    
55
import com.iver.andami.PluginServices;
56
import com.iver.andami.ui.mdiManager.SingletonWindow;
57
import com.iver.andami.ui.mdiManager.WindowInfo;
58
import com.iver.cit.gvsig.gui.layout.Attributes;
59
import com.iver.cit.gvsig.gui.panels.CRSSelectPanel;
60
import com.iver.cit.gvsig.project.documents.view.ProjectView;
61
/**
62
 * Dialogo donde se muestran las propiedades de una vista
63
 *
64
 * @author Fernando Gonz?lez Cort?s
65
 */
66
public class ViewProperties extends JPanel implements SingletonWindow{
67
        /*private String[] units = new String[] {
68
         PluginServices.getText(this, "metros"),
69
         PluginServices.getText(this, "kilometros"),
70
         };
71
         */
72
        private static String[] unitsNames = null;
73
        private javax.swing.JLabel jLabel = null;
74
        private javax.swing.JTextField txtName = null;
75
        private javax.swing.JLabel jLabel1 = null;
76
        private javax.swing.JTextField txtDate = null;
77
        private javax.swing.JLabel jLabel2 = null;
78
        private javax.swing.JTextField txtOwner = null;
79
        private javax.swing.JLabel jLabel4 = null;
80
        private javax.swing.JComboBox cmbMapUnits = null;
81
        private javax.swing.JLabel jLabel5 = null;
82
        private javax.swing.JComboBox cmbDistanceUnits = null;
83
        private javax.swing.JLabel jLabel6 = null;
84
        private javax.swing.JTextArea txtComments = null;
85
        private javax.swing.JLabel jLabel7 = null;
86
        private javax.swing.JLabel lblColor = null;
87

    
88
        private Color backColor = null;
89

    
90
        private JButton btnColor = null;
91
        private ProjectView view=null;
92
        private javax.swing.JScrollPane jScrollPane = null;
93
        private javax.swing.JPanel jPanel = null;
94
        private javax.swing.JPanel jPanel1 = null;
95
        private javax.swing.JPanel jPanel2 = null;
96
        private javax.swing.JPanel jPanel3 = null;
97

    
98
        private javax.swing.JLabel jLabel3 = null;
99
        private javax.swing.JLabel jLabelSep1 = null;
100
        private WindowInfo m_viewinfo = null;
101
        //private JLabel jLblProj = null;
102
        //private JLabel jLblProjName = null;
103
        //private JButton jBtnChangeProj = null;
104
        protected CRSSelectPanel jPanelProj = null;
105
        private AcceptCancelPanel okCancelPanel = null;
106
        private boolean isAcceppted=false;
107

    
108
        /**
109
         * This is the default constructor
110
         *
111
         * @param f Frame padre del dialogo
112
         * @param v Vista que se representa
113
         */
114
        public ViewProperties(ProjectView v) {
115
                view = v;
116
                initialize();
117
        }
118

    
119
        /**
120
         * This method initializes this
121
         */
122
        private void initialize() {
123
                this.setSize(378, 358);
124
                java.awt.FlowLayout layFlowLayout3 = new java.awt.FlowLayout();
125
                layFlowLayout3.setHgap(0);
126
                setLayout(layFlowLayout3);
127
                /*      jLblProjName = new JLabel();
128
                 jLblProj = new JLabel();
129
                 jLblProj.setText(view.getProjection().getAbrev());
130
                 jLblProj.setPreferredSize(new java.awt.Dimension(180,20));
131
                 jLblProjName.setText("Proyecci?n actual:");
132
                 jLblProjName.setPreferredSize(new java.awt.Dimension(95,15));*/
133
                this.setPreferredSize(new java.awt.Dimension(365,463));
134
                add(getJPanel(), null);
135
                add(getJPanel1(), null);
136
                add(getJPanel2(), null);
137
                add(getJPanel3(), null);
138
                add(getJLabelSep1(), null);
139
                this.add(getJPanelProj(), null);
140
                this.add(getJLabel6(), null);
141
                add(getJScrollPane(), null);
142

    
143

    
144
                this.add(getJLabel7(), null);
145
                this.add(getLblColor(), null);
146
                this.add(getBtnColor(), null);
147

    
148

    
149
                add(getJLabel3(), null);
150
                this.add(getOkCancelPanel(), null);
151
                txtName.setText(view.getName());
152
                txtDate.setText(view.getCreationDate());
153
                txtOwner.setText(view.getOwner());
154

    
155
                cmbMapUnits.setSelectedIndex(view.getMapContext().getViewPort().getMapUnits());
156
                cmbDistanceUnits.setSelectedIndex(view.getMapContext().getViewPort().getDistanceUnits());
157

    
158
                txtComments.setText(view.getComment());
159

    
160
                lblColor.setBackground(view.getMapContext().getViewPort().getBackColor());
161
        }
162

    
163
        /**
164
         * This method initializes jLabel
165
         *
166
         * @return javax.swing.JLabel
167
         */
168
        private javax.swing.JLabel getJLabel() {
169
                if (jLabel == null) {
170
                        jLabel = new javax.swing.JLabel();
171
                        jLabel.setText(PluginServices.getText(this, "nombre") + ":");
172
                }
173

    
174
                return jLabel;
175
        }
176

    
177
        private javax.swing.JLabel getJLabelSep1() {
178
                if (jLabelSep1 == null) {
179
                        jLabelSep1 = new javax.swing.JLabel();
180
                        jLabelSep1.setPreferredSize(new java.awt.Dimension(200, 10));
181
                }
182
                return jLabelSep1;
183
        }
184

    
185
        /**
186
         * This method initializes txtName
187
         *
188
         * @return javax.swing.JTextField
189
         */
190
        private javax.swing.JTextField getTxtName() {
191
                if (txtName == null) {
192
                        txtName = new javax.swing.JTextField();
193
                        txtName.setPreferredSize(new java.awt.Dimension(200, 20));
194
                }
195

    
196
                return txtName;
197
        }
198

    
199
        /**
200
         * This method initializes jLabel1
201
         *
202
         * @return javax.swing.JLabel
203
         */
204
        private javax.swing.JLabel getJLabel1() {
205
                if (jLabel1 == null) {
206
                        jLabel1 = new javax.swing.JLabel();
207
                        jLabel1.setText(PluginServices.getText(this, "creation_date") + ":");
208
                }
209

    
210
                return jLabel1;
211
        }
212

    
213
        /**
214
         * This method initializes txtDate
215
         *
216
         * @return javax.swing.JTextField
217
         */
218
        private javax.swing.JTextField getTxtDate() {
219
                if (txtDate == null) {
220
                        txtDate = new javax.swing.JTextField();
221
                        txtDate.setPreferredSize(new java.awt.Dimension(200, 20));
222
                        txtDate.setEditable(false);
223
                        txtDate.setBackground(java.awt.Color.white);
224
                }
225

    
226
                return txtDate;
227
        }
228

    
229
        /**
230
         * This method initializes jLabel2
231
         *
232
         * @return javax.swing.JLabel
233
         */
234
        private javax.swing.JLabel getJLabel2() {
235
                if (jLabel2 == null) {
236
                        jLabel2 = new javax.swing.JLabel();
237
                        jLabel2.setText(PluginServices.getText(this, "owner") + ":");
238
                }
239

    
240
                return jLabel2;
241
        }
242

    
243
        /**
244
         * This method initializes txtOwner
245
         *
246
         * @return javax.swing.JTextField
247
         */
248
        private javax.swing.JTextField getTxtOwner() {
249
                if (txtOwner == null) {
250
                        txtOwner = new javax.swing.JTextField();
251
                        txtOwner.setPreferredSize(new java.awt.Dimension(200, 20));
252
                }
253

    
254
                return txtOwner;
255
        }
256

    
257
        /**
258
         * This method initializes jLabel4
259
         *
260
         * @return javax.swing.JLabel
261
         */
262
        private javax.swing.JLabel getJLabel4() {
263
                if (jLabel4 == null) {
264
                        jLabel4 = new javax.swing.JLabel();
265
                        jLabel4.setText(PluginServices.getText(this, "map_units") + ":");
266
                        jLabel4.setName("jLabel4");
267
                }
268

    
269
                return jLabel4;
270
        }
271

    
272
        /**
273
         * This method initializes cmbMapUnits
274
         *
275
         * @return javax.swing.JComboBox
276
         */
277
        private javax.swing.JComboBox getCmbMapUnits() {
278
                if (cmbMapUnits == null) {
279
                        cmbMapUnits = new javax.swing.JComboBox(getUnitsNames());
280
                        cmbMapUnits.setPreferredSize(new java.awt.Dimension(200, 20));
281
                        cmbMapUnits.setSelectedIndex(view.getMapContext().getViewPort().getMapUnits());
282

    
283
                        cmbMapUnits.addActionListener(new java.awt.event.ActionListener() {
284
                                public void actionPerformed(java.awt.event.ActionEvent e) {
285
                                        //view.getMapContext().getViewPort().setMapUnits(cmbMapUnits.getSelectedIndex());
286
                                }
287
                        });
288
                }
289

    
290
                return cmbMapUnits;
291
        }
292

    
293
        /**
294
         * This method initializes jLabel5
295
         *
296
         * @return javax.swing.JLabel
297
         */
298
        private javax.swing.JLabel getJLabel5() {
299
                if (jLabel5 == null) {
300
                        jLabel5 = new javax.swing.JLabel();
301
                        jLabel5.setText(PluginServices.getText(this, "distance_units") + ":");
302
                        jLabel5.setName("jLabel5");
303
                }
304

    
305
                return jLabel5;
306
        }
307

    
308
        /**
309
         * This method initializes cmbDistanceUnits
310
         *
311
         * @return javax.swing.JComboBox
312
         */
313
        private javax.swing.JComboBox getCmbDistanceUnits() {
314
                if (cmbDistanceUnits == null) {
315
                        cmbDistanceUnits = new javax.swing.JComboBox(getUnitsNames());
316
                        cmbDistanceUnits.setPreferredSize(new java.awt.Dimension(200, 20));
317
                        cmbDistanceUnits.setEditable(false);
318
                        cmbDistanceUnits.setSelectedIndex(view.getMapContext().getViewPort().getDistanceUnits());
319
                        cmbDistanceUnits.addActionListener(new java.awt.event.ActionListener() {
320
                                public void actionPerformed(java.awt.event.ActionEvent e) {
321
                                        //view.getMapContext().getViewPort().setDistanceUnits(cmbDistanceUnits.getSelectedIndex());
322
                                }
323
                        });
324
                }
325

    
326
                return cmbDistanceUnits;
327
        }
328

    
329
        /**
330
         * This method initializes jLabel6
331
         *
332
         * @return javax.swing.JLabel
333
         */
334
        private javax.swing.JLabel getJLabel6() {
335
                if (jLabel6 == null) {
336
                        jLabel6 = new javax.swing.JLabel();
337
                        jLabel6.setText(PluginServices.getText(this, "comentarios") + ":");
338
                        jLabel6.setPreferredSize(new java.awt.Dimension(340,35));
339
                        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
340
                        jLabel6.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
341
                }
342

    
343
                return jLabel6;
344
        }
345

    
346
        /**
347
         * This method initializes txtComments
348
         *
349
         * @return javax.swing.JTextArea
350
         */
351
        private javax.swing.JTextArea getTxtComments() {
352
                if (txtComments == null) {
353
                        txtComments = new javax.swing.JTextArea();
354
                        txtComments.setRows(1);
355
                        txtComments.setColumns(28);
356
                }
357

    
358
                return txtComments;
359
        }
360

    
361
        /**
362
         * This method initializes jLabel7
363
         *
364
         * @return javax.swing.JLabel
365
         */
366
        private javax.swing.JLabel getJLabel7() {
367
                if (jLabel7 == null) {
368
                        jLabel7 = new javax.swing.JLabel();
369
                        jLabel7.setText(PluginServices.getText(this, "background_color") +
370
                        ":");
371
                        jLabel7.setPreferredSize(new java.awt.Dimension(190,16));
372
                }
373

    
374
                return jLabel7;
375
        }
376

    
377
        /**
378
         * This method initializes lblColor
379
         *
380
         * @return javax.swing.JLabel
381
         */
382
        private javax.swing.JLabel getLblColor() {
383
                if (lblColor == null) {
384
                        lblColor = new javax.swing.JLabel();
385
                        lblColor.setText("");
386
                        lblColor.setPreferredSize(new java.awt.Dimension(30, 16));
387
                        Color theColor = view.getMapContext().getViewPort().getBackColor();
388
                        backColor=theColor;
389
                        if (theColor == null) theColor = Color.WHITE;
390
                        lblColor.setBackground(theColor);
391
                        lblColor.setOpaque(true);
392
                }
393

    
394
                return lblColor;
395
        }
396

    
397
        /**
398
         * This method initializes btnColor
399
         *
400
         * @return javax.swing.JButton
401
         */
402
        private JButton getBtnColor() {
403
                if (btnColor == null) {
404
                        btnColor = new JButton();
405

    
406
                        btnColor.setText("...");
407

    
408
                        btnColor.addActionListener(new java.awt.event.ActionListener() {
409
                                public void actionPerformed(java.awt.event.ActionEvent e) {
410
                                        Color ret = JColorChooser.showDialog(ViewProperties.this,
411
                                                        PluginServices.getText(this, "background_color"),
412
                                                        lblColor.getBackground());
413

    
414
                                        if (ret != null) {
415
                                                lblColor.setBackground(ret);
416
                                                backColor = ret;
417
                                        }
418
                                        else
419
                                                lblColor.setBackground(Color.WHITE);
420
                                }
421
                        });
422
                }
423

    
424
                return btnColor;
425
        }
426

    
427
        /**
428
         * This method initializes jScrollPane
429
         *
430
         * @return javax.swing.JScrollPane
431
         */
432
        private javax.swing.JScrollPane getJScrollPane() {
433
                if (jScrollPane == null) {
434
                        jScrollPane = new javax.swing.JScrollPane();
435
                        jScrollPane.setViewportView(getTxtComments());
436
                        jScrollPane.setPreferredSize(new java.awt.Dimension(340, 70));
437
                }
438

    
439
                return jScrollPane;
440
        }
441

    
442
        /**
443
         * This method initializes jPanel
444
         *
445
         * @return javax.swing.JPanel
446
         */
447
        private javax.swing.JPanel getJPanel() {
448
                if (jPanel == null) {
449
                        jPanel = new javax.swing.JPanel();
450

    
451
                        /*
452
                        java.awt.FlowLayout layFlowLayout4 = new java.awt.FlowLayout();
453
                        layFlowLayout4.setAlignment(java.awt.FlowLayout.LEFT);
454
                        layFlowLayout4.setVgap(9);
455
                        jPanel.setLayout(layFlowLayout4);
456
                        */
457

    
458
            GridLayout layout = new GridLayout(3,1);
459
            layout.setVgap(5);
460
            jPanel.setLayout(layout);
461

    
462

    
463
                        jPanel.add(getJLabel(), null);
464
                        jPanel.add(getJLabel1(), null);
465
                        jPanel.add(getJLabel2(), null);
466
                        jPanel.setPreferredSize(new java.awt.Dimension(140, 80));
467
                }
468

    
469
                return jPanel;
470
        }
471

    
472
        /**
473
         * This method initializes jPanel1
474
         *
475
         * @return javax.swing.JPanel
476
         */
477
        private javax.swing.JPanel getJPanel1() {
478
                if (jPanel1 == null) {
479
                        jPanel1 = new javax.swing.JPanel();
480

    
481
                        java.awt.FlowLayout layFlowLayout2 = new java.awt.FlowLayout();
482
                        layFlowLayout2.setHgap(5);
483
                        layFlowLayout2.setAlignment(java.awt.FlowLayout.LEFT);
484
                        jPanel1.setLayout(layFlowLayout2);
485
                        jPanel1.add(getTxtName(), null);
486
                        jPanel1.add(getTxtDate(), null);
487
                        jPanel1.add(getTxtOwner(), null);
488
                        jPanel1.setPreferredSize(new java.awt.Dimension(210, 80));
489
                }
490

    
491
                return jPanel1;
492
        }
493

    
494
        /**
495
         * This method initializes jPanel2
496
         *
497
         * @return javax.swing.JPanel
498
         */
499
        private javax.swing.JPanel getJPanel2() {
500
                if (jPanel2 == null) {
501
                        GridLayout gridLayout = new GridLayout();
502
                        gridLayout.setRows(2);
503
                        jPanel2 = new javax.swing.JPanel();
504

    
505
                        jPanel2.setLayout(gridLayout);
506
                        jPanel2.setPreferredSize(new java.awt.Dimension(140, 50));
507
                        jPanel2.add(getJLabel4(), null);
508
                        jPanel2.add(getJLabel5(), null);
509
                }
510

    
511
                return jPanel2;
512
        }
513

    
514
        /**
515
         * This method initializes jPanel3
516
         *
517
         * @return javax.swing.JPanel
518
         */
519
        private javax.swing.JPanel getJPanel3() {
520
                if (jPanel3 == null) {
521
                        jPanel3 = new javax.swing.JPanel();
522

    
523
                        java.awt.FlowLayout layFlowLayout6 = new java.awt.FlowLayout();
524
                        layFlowLayout6.setAlignment(java.awt.FlowLayout.LEFT);
525
                        jPanel3.setLayout(layFlowLayout6);
526
                        jPanel3.add(getCmbMapUnits(), null);
527
                        jPanel3.add(getCmbDistanceUnits(), null);
528
                        jPanel3.setPreferredSize(new java.awt.Dimension(210, 50));
529
                }
530

    
531
                return jPanel3;
532
        }
533

    
534

    
535
        /**
536
         * This method initializes jLabel3
537
         *
538
         * @return javax.swing.JLabel
539
         */
540
        private javax.swing.JLabel getJLabel3() {
541
                if (jLabel3 == null) {
542
                        jLabel3 = new javax.swing.JLabel();
543
                        jLabel3.setText("");
544
                        jLabel3.setPreferredSize(new java.awt.Dimension(30, 0));
545
                }
546

    
547
                return jLabel3;
548
        }
549

    
550
        /**
551
         * @see com.iver.mdiApp.ui.MDIManager.IWindow#getWindowInfo()
552
         */
553
        public WindowInfo getWindowInfo() {
554
                WindowInfo m_viewinfo=new WindowInfo();
555
                m_viewinfo.setTitle(PluginServices.getText(this, "propiedades_vista"));
556
                m_viewinfo.setHeight(370);
557
                return m_viewinfo;
558
        }
559

    
560
        /**
561
         * @see com.iver.mdiApp.ui.MDIManager.IWindow#windowActivated()
562
         */
563
        public void viewActivated() {
564
        }
565
        /**
566
         * This method initializes jButton
567
         *
568
         * @return javax.swing.JButton
569
         * /
570
         private JButton getJBtnChangeProj() {
571
         if (jBtnChangeProj == null) {
572
         jBtnChangeProj = new JButton();
573
         jBtnChangeProj.setText("...");
574
         jBtnChangeProj.setPreferredSize(new java.awt.Dimension(34,16));
575
         jBtnChangeProj.addActionListener(new java.awt.event.ActionListener() {
576
         public void actionPerformed(java.awt.event.ActionEvent e) {
577
         CSSelectionDialog csSelect = new CSSelectionDialog();
578
         csSelect.setProjection(view.getProjection());
579

580
         PluginServices.getMDIManager().addView(csSelect);
581

582
         if (csSelect.isOkPressed()) {
583
         view.getMapContext().setProjection(csSelect.getProjection());
584
         jLblProj.setText(view.getProjection().getAbrev());
585
         }
586
         }
587
         });
588
         }
589
         return jBtnChangeProj;
590
         } */
591
        /**
592
         * This method initializes jPanel4
593
         *
594
         * @return javax.swing.JPanel
595
         */
596
        private CRSSelectPanel getJPanelProj() {
597
                if (jPanelProj == null) {
598
                        jPanelProj = CRSSelectPanel.getPanel(view.getProjection());
599
                        jPanelProj.setPreferredSize(new java.awt.Dimension(330,35));
600
                        jPanelProj.addActionListener(new java.awt.event.ActionListener() {
601
                                public void actionPerformed(java.awt.event.ActionEvent e) {
602
                                        if (jPanelProj.isOkPressed()) {
603
                                                view.setProjection(jPanelProj.getCurProj());
604
                                        }
605
                                }
606
                        });
607

    
608
//                        jPanelProj.add(jLblProjName, null);
609
//                        jPanelProj.add(jLblProj, null);
610
//                        jPanelProj.add(getJBtnChangeProj(), null);
611
                }
612
                return jPanelProj;
613
        }
614

    
615
        /**
616
         * @see com.iver.andami.ui.mdiManager.SingletonWindow#getWindowModel()
617
         */
618
        public Object getWindowModel() {
619
                return view;
620
        }
621

    
622
        /**
623
         * This method initializes okCancelPanel
624
         *
625
         * @return javax.swing.JPanel
626
         */
627
        private AcceptCancelPanel getOkCancelPanel() {
628
                if (okCancelPanel == null) {
629
                        ActionListener okAction, cancelAction;
630
                        okAction = new java.awt.event.ActionListener() {
631
                                public void actionPerformed(java.awt.event.ActionEvent e) {
632
                                        view.setName(txtName.getText());
633
                                        view.setCreationDate(txtDate.getText());
634
                                        view.setOwner(txtOwner.getText());
635
                                        view.setComment(txtComments.getText());
636
                                        view.getMapContext().getViewPort().setMapUnits(cmbMapUnits.getSelectedIndex());
637
                                        view.getMapContext().getViewPort().setDistanceUnits(cmbDistanceUnits.getSelectedIndex());
638
                                        view.setBackColor(backColor);
639
                                        isAcceppted=true;
640
                                        PluginServices.getMDIManager().closeWindow(ViewProperties.this);
641
                                }
642
                        };
643
                        cancelAction = new java.awt.event.ActionListener() {
644

    
645
                                public void actionPerformed(java.awt.event.ActionEvent e) {
646
                                        isAcceppted=false;
647
                                        PluginServices.getMDIManager().closeWindow(ViewProperties.this);
648
                                }
649
                        };
650
                        okCancelPanel = new AcceptCancelPanel(okAction, cancelAction);
651
                        Dimension sz = this.getSize();
652
                        sz.setSize((int)sz.getWidth()-20, (int) sz.getHeight());
653
                        okCancelPanel.setPreferredSize(sz);
654
                }
655
                return okCancelPanel;
656
        }
657

    
658
        private String[] getUnitsNames() {
659
                if (unitsNames == null) {
660
                        unitsNames = new String[Attributes.NAMES.length];
661
                        for (int i=0;i<Attributes.NAMES.length;i++) {
662
                                unitsNames[i]=PluginServices.getText(this, Attributes.NAMES[i]);
663
                        }
664
                }
665
                return unitsNames;
666
        }
667

    
668
        public boolean isAcceppted() {
669
                return isAcceppted;
670
        }
671
}