Statistics
| Revision:

root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / view / gui / ViewProperties.java @ 9392

History | View | Annotate | Download (17.5 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.panels.CRSSelectPanel;
59
import com.iver.cit.gvsig.project.documents.layout.Attributes;
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
        /**
107
         * This is the default constructor
108
         *
109
         * @param f Frame padre del dialogo
110
         * @param v Vista que se representa
111
         */
112
        public ViewProperties(ProjectView v) {
113
                view = v;
114
                initialize();
115
        }
116

    
117
        /**
118
         * This method initializes this
119
         */
120
        private void initialize() {
121
                this.setSize(378, 358);
122
                java.awt.FlowLayout layFlowLayout3 = new java.awt.FlowLayout();
123
                layFlowLayout3.setHgap(0);
124
                setLayout(layFlowLayout3);
125
                /*      jLblProjName = new JLabel();
126
                 jLblProj = new JLabel();
127
                 jLblProj.setText(view.getProjection().getAbrev());
128
                 jLblProj.setPreferredSize(new java.awt.Dimension(180,20));
129
                 jLblProjName.setText("Proyecci?n actual:");
130
                 jLblProjName.setPreferredSize(new java.awt.Dimension(95,15));*/
131
                this.setPreferredSize(new java.awt.Dimension(365,463));
132
                add(getJPanel(), null);
133
                add(getJPanel1(), null);
134
                add(getJPanel2(), null);
135
                add(getJPanel3(), null);
136
                add(getJLabelSep1(), null);
137
                this.add(getJPanelProj(), null);
138
                this.add(getJLabel6(), null);
139
                add(getJScrollPane(), null);
140
                
141
                
142
                this.add(getJLabel7(), null);
143
                this.add(getLblColor(), null);
144
                this.add(getBtnColor(), null);
145
                
146
                
147
                add(getJLabel3(), null);
148
                this.add(getOkCancelPanel(), null);
149
                txtName.setText(view.getName());
150
                txtDate.setText(view.getCreationDate());
151
                txtOwner.setText(view.getOwner());
152

    
153
                cmbMapUnits.setSelectedIndex(view.getMapContext().getViewPort().getMapUnits());
154
                cmbDistanceUnits.setSelectedIndex(view.getMapContext().getViewPort().getDistanceUnits());
155

    
156
                txtComments.setText(view.getComment());
157

    
158
                lblColor.setBackground(view.getMapContext().getViewPort().getBackColor());
159
        }
160

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

    
172
                return jLabel;
173
        }
174

    
175
        private javax.swing.JLabel getJLabelSep1() {
176
                if (jLabelSep1 == null) {
177
                        jLabelSep1 = new javax.swing.JLabel();
178
                        jLabelSep1.setPreferredSize(new java.awt.Dimension(200, 10));
179
                }
180
                return jLabelSep1;
181
        }
182
        
183
        /**
184
         * This method initializes txtName
185
         *
186
         * @return javax.swing.JTextField
187
         */
188
        private javax.swing.JTextField getTxtName() {
189
                if (txtName == null) {
190
                        txtName = new javax.swing.JTextField();
191
                        txtName.setPreferredSize(new java.awt.Dimension(200, 20));
192
                }
193

    
194
                return txtName;
195
        }
196

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

    
208
                return jLabel1;
209
        }
210

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

    
224
                return txtDate;
225
        }
226

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

    
238
                return jLabel2;
239
        }
240

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

    
252
                return txtOwner;
253
        }
254

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

    
266
                return jLabel4;
267
        }
268

    
269
        /**
270
         * This method initializes cmbMapUnits
271
         *
272
         * @return javax.swing.JComboBox
273
         */
274
        private javax.swing.JComboBox getCmbMapUnits() {
275
                if (cmbMapUnits == null) {
276
                        cmbMapUnits = new javax.swing.JComboBox(getUnitsNames());
277
                        cmbMapUnits.setPreferredSize(new java.awt.Dimension(200, 20));
278
                        cmbMapUnits.setSelectedIndex(view.getMapContext().getViewPort().getMapUnits());
279
                        cmbMapUnits.addActionListener(new java.awt.event.ActionListener() {
280
                                public void actionPerformed(java.awt.event.ActionEvent e) {
281
                                        view.getMapContext().getViewPort().setMapUnits(cmbMapUnits.getSelectedIndex());
282
                                }
283
                        });
284
                }
285

    
286
                return cmbMapUnits;
287
        }
288

    
289
        /**
290
         * This method initializes jLabel5
291
         *
292
         * @return javax.swing.JLabel
293
         */
294
        private javax.swing.JLabel getJLabel5() {
295
                if (jLabel5 == null) {
296
                        jLabel5 = new javax.swing.JLabel();
297
                        jLabel5.setText(PluginServices.getText(this, "distance_units") + ":");
298
                }
299

    
300
                return jLabel5;
301
        }
302

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

    
321
                return cmbDistanceUnits;
322
        }
323

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

    
338
                return jLabel6;
339
        }
340

    
341
        /**
342
         * This method initializes txtComments
343
         *
344
         * @return javax.swing.JTextArea
345
         */
346
        private javax.swing.JTextArea getTxtComments() {
347
                if (txtComments == null) {
348
                        txtComments = new javax.swing.JTextArea();
349
                        txtComments.setRows(1);
350
                        txtComments.setColumns(28);
351
                }
352

    
353
                return txtComments;
354
        }
355

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

    
369
                return jLabel7;
370
        }
371

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

    
388
                return lblColor;
389
        }
390

    
391
        /**
392
         * This method initializes btnColor
393
         *
394
         * @return javax.swing.JButton
395
         */
396
        private JButton getBtnColor() {
397
                if (btnColor == null) {
398
                        btnColor = new JButton();
399
                        
400
                        btnColor.setText("...");
401

    
402
                        btnColor.addActionListener(new java.awt.event.ActionListener() {
403
                                public void actionPerformed(java.awt.event.ActionEvent e) {
404
                                        Color ret = JColorChooser.showDialog(ViewProperties.this,
405
                                                        PluginServices.getText(this, "background_color"),
406
                                                        lblColor.getBackground());
407

    
408
                                        if (ret != null) {
409
                                                lblColor.setBackground(ret);
410
                                                backColor = ret;
411
                                        }
412
                                        else
413
                                                lblColor.setBackground(Color.WHITE);
414
                                }
415
                        });
416
                }
417

    
418
                return btnColor;
419
        }
420

    
421
        /**
422
         * This method initializes jScrollPane
423
         *
424
         * @return javax.swing.JScrollPane
425
         */
426
        private javax.swing.JScrollPane getJScrollPane() {
427
                if (jScrollPane == null) {
428
                        jScrollPane = new javax.swing.JScrollPane();
429
                        jScrollPane.setViewportView(getTxtComments());
430
                        jScrollPane.setPreferredSize(new java.awt.Dimension(340, 70));
431
                }
432

    
433
                return jScrollPane;
434
        }
435

    
436
        /**
437
         * This method initializes jPanel
438
         *
439
         * @return javax.swing.JPanel
440
         */
441
        private javax.swing.JPanel getJPanel() {
442
                if (jPanel == null) {
443
                        jPanel = new javax.swing.JPanel();
444

    
445
                        /*
446
                        java.awt.FlowLayout layFlowLayout4 = new java.awt.FlowLayout();
447
                        layFlowLayout4.setAlignment(java.awt.FlowLayout.LEFT);
448
                        layFlowLayout4.setVgap(9);
449
                        jPanel.setLayout(layFlowLayout4);
450
                        */
451
                        
452
            GridLayout layout = new GridLayout(3,1);
453
            layout.setVgap(5);            
454
            jPanel.setLayout(layout);
455
            
456
                        
457
                        jPanel.add(getJLabel(), null);
458
                        jPanel.add(getJLabel1(), null);
459
                        jPanel.add(getJLabel2(), null);
460
                        jPanel.setPreferredSize(new java.awt.Dimension(140, 80));
461
                }
462

    
463
                return jPanel;
464
        }
465

    
466
        /**
467
         * This method initializes jPanel1
468
         *
469
         * @return javax.swing.JPanel
470
         */
471
        private javax.swing.JPanel getJPanel1() {
472
                if (jPanel1 == null) {
473
                        jPanel1 = new javax.swing.JPanel();
474

    
475
                        java.awt.FlowLayout layFlowLayout2 = new java.awt.FlowLayout();
476
                        layFlowLayout2.setHgap(5);
477
                        layFlowLayout2.setAlignment(java.awt.FlowLayout.LEFT);
478
                        jPanel1.setLayout(layFlowLayout2);
479
                        jPanel1.add(getTxtName(), null);
480
                        jPanel1.add(getTxtDate(), null);
481
                        jPanel1.add(getTxtOwner(), null);
482
                        jPanel1.setPreferredSize(new java.awt.Dimension(210, 80));
483
                }
484

    
485
                return jPanel1;
486
        }
487

    
488
        /**
489
         * This method initializes jPanel2
490
         *
491
         * @return javax.swing.JPanel
492
         */
493
        private javax.swing.JPanel getJPanel2() {
494
                if (jPanel2 == null) {
495
                        jPanel2 = new javax.swing.JPanel();
496

    
497
                        java.awt.FlowLayout layFlowLayout5 = new java.awt.FlowLayout();
498
                        layFlowLayout5.setAlignment(java.awt.FlowLayout.LEFT);
499
                        layFlowLayout5.setVgap(9);
500
                        jPanel2.setLayout(layFlowLayout5);
501
                        jPanel2.add(getJLabel4(), null);
502
                        jPanel2.add(getJLabel5(), null);
503
                        jPanel2.setPreferredSize(new java.awt.Dimension(140, 50));
504
                }
505

    
506
                return jPanel2;
507
        }
508

    
509
        /**
510
         * This method initializes jPanel3
511
         *
512
         * @return javax.swing.JPanel
513
         */
514
        private javax.swing.JPanel getJPanel3() {
515
                if (jPanel3 == null) {
516
                        jPanel3 = new javax.swing.JPanel();
517

    
518
                        java.awt.FlowLayout layFlowLayout6 = new java.awt.FlowLayout();
519
                        layFlowLayout6.setAlignment(java.awt.FlowLayout.LEFT);
520
                        jPanel3.setLayout(layFlowLayout6);
521
                        jPanel3.add(getCmbMapUnits(), null);
522
                        jPanel3.add(getCmbDistanceUnits(), null);
523
                        jPanel3.setPreferredSize(new java.awt.Dimension(210, 50));
524
                }
525

    
526
                return jPanel3;
527
        }
528
        
529

    
530
        /**
531
         * This method initializes jLabel3
532
         *
533
         * @return javax.swing.JLabel
534
         */
535
        private javax.swing.JLabel getJLabel3() {
536
                if (jLabel3 == null) {
537
                        jLabel3 = new javax.swing.JLabel();
538
                        jLabel3.setText("");
539
                        jLabel3.setPreferredSize(new java.awt.Dimension(30, 0));
540
                }
541

    
542
                return jLabel3;
543
        }
544

    
545
        /**
546
         * @see com.iver.mdiApp.ui.MDIManager.IWindow#getWindowInfo()
547
         */
548
        public WindowInfo getWindowInfo() {
549
                WindowInfo m_viewinfo=new WindowInfo();
550
                m_viewinfo.setTitle(PluginServices.getText(this, "propiedades_vista"));
551
                m_viewinfo.setHeight(370);
552
                return m_viewinfo;
553
        }
554

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

575
         PluginServices.getMDIManager().addView(csSelect);
576

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

    
603
//                        jPanelProj.add(jLblProjName, null);
604
//                        jPanelProj.add(jLblProj, null);
605
//                        jPanelProj.add(getJBtnChangeProj(), null);
606
                }
607
                return jPanelProj;
608
        }
609

    
610
        /**
611
         * @see com.iver.andami.ui.mdiManager.SingletonWindow#getWindowModel()
612
         */
613
        public Object getWindowModel() {
614
                return view;
615
        }
616

    
617
        /**
618
         * This method initializes okCancelPanel
619
         *
620
         * @return javax.swing.JPanel
621
         */
622
        private AcceptCancelPanel getOkCancelPanel() {
623
                if (okCancelPanel == null) {
624
                        ActionListener okAction, cancelAction;
625
                        okAction = new java.awt.event.ActionListener() {
626
                                public void actionPerformed(java.awt.event.ActionEvent e) {
627
                                        view.setName(txtName.getText());
628
                                        view.setCreationDate(txtDate.getText());
629
                                        view.setOwner(txtOwner.getText());
630
                                        view.setComment(txtComments.getText());
631
                                        view.getMapContext().getViewPort().setMapUnits(cmbMapUnits.getSelectedIndex());
632
                                        view.getMapContext().getViewPort().setDistanceUnits(cmbDistanceUnits.getSelectedIndex());
633
                                        view.setBackColor(backColor);
634

    
635
                                        PluginServices.getMDIManager().closeWindow(ViewProperties.this);
636
                                }
637
                        };
638
                        cancelAction = new java.awt.event.ActionListener() {
639
                                public void actionPerformed(java.awt.event.ActionEvent e) {
640
                                        PluginServices.getMDIManager().closeWindow(ViewProperties.this);
641
                                }
642
                        };
643
                        okCancelPanel = new AcceptCancelPanel(okAction, cancelAction);
644
                        Dimension sz = this.getSize();
645
                        sz.setSize((int)sz.getWidth()-20, (int) sz.getHeight());
646
                        okCancelPanel.setPreferredSize(sz);
647
                }
648
                return okCancelPanel;
649
        }
650
        
651
        private String[] getUnitsNames() {
652
                if (unitsNames == null) {
653
                        unitsNames = new String[Attributes.NAMES.length];
654
                        for (int i=0;i<Attributes.NAMES.length;i++) {
655
                                unitsNames[i]=PluginServices.getText(this, Attributes.NAMES[i]);
656
                        }
657
                }
658
                return unitsNames;
659
        }
660
}