Statistics
| Revision:

svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / layout / fframes / gui / dialogs / FFrameViewDialog.java @ 25350

History | View | Annotate | Download (20.4 KB)

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

    
47
import java.awt.Dimension;
48
import java.awt.geom.Rectangle2D;
49

    
50
import javax.swing.JButton;
51
import javax.swing.JCheckBox;
52
import javax.swing.JList;
53
import javax.swing.JPanel;
54

    
55
import com.iver.andami.PluginServices;
56
import com.iver.andami.ui.mdiManager.WindowInfo;
57
import com.iver.cit.gvsig.fmap.ViewPort;
58
import com.iver.cit.gvsig.project.documents.layout.FLayoutUtilities;
59
import com.iver.cit.gvsig.project.documents.layout.fframes.FFrameGrid;
60
import com.iver.cit.gvsig.project.documents.layout.fframes.FFrameGridFactory;
61
import com.iver.cit.gvsig.project.documents.layout.fframes.FFrameView;
62
import com.iver.cit.gvsig.project.documents.layout.fframes.IFFrame;
63
import com.iver.cit.gvsig.project.documents.layout.fframes.ListViewModel;
64
import com.iver.cit.gvsig.project.documents.layout.fframes.gui.JPRotation;
65
import com.iver.cit.gvsig.project.documents.layout.gui.Layout;
66
import com.iver.cit.gvsig.project.documents.view.ProjectView;
67

    
68

    
69
/**
70
 * Di?logo para a?adir una vista al Layout.
71
 *
72
 * @author Vicente Caballero Navarro
73
 */
74
public class FFrameViewDialog extends JPanel implements IFFrameDialog {
75
        private javax.swing.JPanel jContentPane = null;
76
        private javax.swing.JLabel lVistas = null;
77
        private javax.swing.JScrollPane jScrollPane = null;
78
        private javax.swing.JList liVistas = null; //  @jve:visual-info  decl-index=0 visual-constraint="98,-3"
79
        private javax.swing.JCheckBox chbEnlaceVivo = null;
80
        private javax.swing.JLabel lEscala = null;
81
        private javax.swing.JComboBox cbEscala = null;
82
        private javax.swing.JLabel lEscalaNumerica = null;
83
        private javax.swing.JTextField tEscalaNumerica = null;
84
        private javax.swing.JLabel lExtension = null;
85
        private javax.swing.JComboBox cbExtension = null;
86
        private javax.swing.JLabel lVisualizacion = null;
87
        private javax.swing.JComboBox cbVisualizacion = null;
88
        private javax.swing.JButton bAceptar = null;
89
        private javax.swing.JButton bCancelar = null;
90
        private javax.swing.JLabel lCalidad = null;
91
        private javax.swing.JComboBox cbCalidad = null;
92
        private ProjectView m_projectView = null;
93
        private Rectangle2D rect = new Rectangle2D.Double();
94
        private FFrameView fframeview = null; //new FFrameView();
95
        private Layout m_layout = null;
96
        private boolean isAcepted = false;
97
        private JPRotation rotation = null;
98
        private FFrameView newFFrameView=null;
99
        private javax.swing.JButton bGrid = null;
100
        private IFFrame grid;
101
        private javax.swing.JCheckBox chbShowGrid = null;
102
        /**
103
         * This is the default constructor
104
         *
105
         * @param layout Referencia al Layout.
106
         * @param fframe Referencia al fframe vista.
107
         */
108
        public FFrameViewDialog(Layout layout, FFrameView fframe) {
109
                super();
110
                fframeview = fframe;
111
                m_layout = layout;
112
                initialize();
113
        }
114

    
115
        /**
116
         * This method initializes this
117
         */
118
        private void initialize() {
119
                this.setLayout(null);
120
                this.add(getJContentPane(), null);
121
                this.setSize(478, 269);
122

    
123
                if (fframeview.getTypeScale() == 0 || fframeview.getTypeScale() == 1) {
124
                                getTEscalaNumerica().setEnabled(false);
125
                        }else{
126
                                getTEscalaNumerica().setEnabled(true);
127
                        }
128
                getPRotation().setRotation(fframeview.getRotation());
129
        }
130

    
131
        /**
132
         * Inserta el rect?ngulo que ocupar? el fframe vista.
133
         *
134
         * @param r Rect?ngulo.
135
         */
136
        public void setRectangle(Rectangle2D r) {
137
                rect.setRect(r);
138
        }
139

    
140
        /**
141
         * This method initializes jContentPane
142
         *
143
         * @return javax.swing.JPanel
144
         */
145
        private javax.swing.JPanel getJContentPane() {
146
                if (jContentPane == null) {
147
                        jContentPane = new javax.swing.JPanel();
148
                        jContentPane.setLayout(null);
149
                        jContentPane.add(getLVistas(), null);
150
                        jContentPane.add(getJScrollPane(), null);
151
                        jContentPane.add(getChbEnlaceVivo(), null);
152
                        jContentPane.add(getLEscala(), null);
153
                        jContentPane.add(getCbEscala(), null);
154
                        jContentPane.add(getLEscalaNumerica(), null);
155
                        jContentPane.add(getTEscalaNumerica(), null);
156
                        jContentPane.add(getLExtension(), null);
157
                        jContentPane.add(getCbExtension(), null);
158
                        jContentPane.add(getLVisualizacion(), null);
159
                        jContentPane.add(getCbVisualizacion(), null);
160
                        jContentPane.add(getLCalidad(), null);
161
                        jContentPane.add(getCbCalidad(), null);
162
                        jContentPane.add(getbAceptar(), null);
163
                        jContentPane.add(getBCancelar(), null);
164
                        jContentPane.setSize(475, 264);
165
                        jContentPane.setPreferredSize(new java.awt.Dimension(60, 60));
166
                        jContentPane.setLocation(0, 0);
167
                        jContentPane.add(getPRotation(), null);
168
                        jContentPane.add(getBGrid(), null);
169
                        jContentPane.add(getChbShowGrid(), null);
170
                }
171

    
172
                return jContentPane;
173
        }
174

    
175
        /**
176
         * This method initializes lVistas
177
         *
178
         * @return javax.swing.JLabel
179
         */
180
        private javax.swing.JLabel getLVistas() {
181
                if (lVistas == null) {
182
                        lVistas = new javax.swing.JLabel();
183
                        lVistas.setSize(85, 19);
184
                        lVistas.setText(PluginServices.getText(this, "Vista"));
185
                        lVistas.setLocation(10, 10);
186
                }
187

    
188
                return lVistas;
189
        }
190

    
191
        /**
192
         * This method initializes jScrollPane
193
         *
194
         * @return javax.swing.JScrollPane
195
         */
196
        private javax.swing.JScrollPane getJScrollPane() {
197
                if (jScrollPane == null) {
198
                        jScrollPane = new javax.swing.JScrollPane();
199
                        jScrollPane.setViewportView(getLiVistas());
200
                        jScrollPane.setBounds(99, 8, 224, 64);
201
                        jScrollPane.setPreferredSize(new java.awt.Dimension(250, 60));
202
                }
203

    
204
                return jScrollPane;
205
        }
206

    
207
        /**
208
         * This method initializes liVistas
209
         *
210
         * @return javax.swing.JList
211
         */
212
        private javax.swing.JList getLiVistas() {
213
                if (liVistas == null) {
214
                        ListViewModel listmodel = new ListViewModel();
215
                        listmodel.addViews();
216
                        liVistas = new javax.swing.JList();
217
                        liVistas.setModel(listmodel);
218
                        for (int i = 0; i < liVistas.getModel().getSize(); i++) {
219
                                if (fframeview.getMapContext() != null) {
220

    
221
                                        ProjectView pvaux= (ProjectView) liVistas.getModel()
222
                                                                                                                  .getElementAt(i);
223

    
224
                                        if (pvaux.getMapContext().equals(fframeview.getMapContext())) {
225
                                                liVistas.setSelectedIndex(i);
226
                                                m_projectView= (ProjectView) liVistas.getModel()
227
                                                  .getElementAt(i);
228
                                        }
229
                                }
230
                        }
231

    
232
                        liVistas.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
233
                                        private int selectIndex=-1;
234
                                        private Rectangle2D boundBox;
235
                                        public void valueChanged(
236
                                                javax.swing.event.ListSelectionEvent e) {
237
                                                int selectInt = ((JList)e.getSource()).getSelectedIndex();
238
                                                if (selectInt!=selectIndex){
239
                                                        selectIndex=selectInt;
240
                                                        if (selectIndex==-1)
241
                                                                return;
242
                                                m_projectView = (ProjectView) liVistas.getModel()
243
                                                                                                                          .getElementAt(selectInt);
244

    
245
                                                getCbEscala().setSelectedItem(PluginServices.getText(this, "automatico"));
246
                                                boundBox=FLayoutUtilities.toSheetRect(rect, m_layout.getLayoutControl().getAT());
247
//                                                fframeview.setBoundBox(FLayoutUtilities.toSheetRect(
248
//                                                                rect, m_layout.getAT()));
249

    
250
//                                                fframeview.setView(m_projectView);
251
//
252
//                                                fframeview.setMapUnits(m_projectView.getMapContext()
253
//                                                                                                                        .getViewPort()
254
//                                                                                                                        .getMapUnits());
255
                                                ViewPort vp=m_projectView.getMapContext().getViewPort().cloneViewPort();
256
                                                vp.setImageSize(new Dimension((int)rect.getWidth(),(int)rect.getHeight()));
257
                                                getTEscalaNumerica().setText(String.valueOf(FLayoutUtilities.getScaleView(vp,
258
                                                boundBox.getWidth(), FLayoutUtilities.fromSheetDistance(boundBox.getWidth(),m_layout.getLayoutControl().getAT()))));
259
//                                                getTEscalaNumerica().setText(String.valueOf(
260
//                                                                fframeview.getScale()));
261
                                        }
262
                                        }
263
                                });
264
                }
265

    
266
                return liVistas;
267
        }
268

    
269
        /**
270
         * This method initializes chbEnlaceVivo
271
         *
272
         * @return javax.swing.JCheckBox
273
         */
274
        private javax.swing.JCheckBox getChbEnlaceVivo() {
275
                if (chbEnlaceVivo == null) {
276
                        chbEnlaceVivo = new javax.swing.JCheckBox();
277
                        chbEnlaceVivo.setSize(88, 24);
278
                        chbEnlaceVivo.setText(PluginServices.getText(this, "enlace_vivo"));
279
                        chbEnlaceVivo.setSelected(fframeview.getLinked());
280
                        chbEnlaceVivo.setLocation(10, 75);
281
                        chbEnlaceVivo.setEnabled(true);
282
                        chbEnlaceVivo.addActionListener(new java.awt.event.ActionListener() {
283
                                        public void actionPerformed(java.awt.event.ActionEvent e) {
284
                                                System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
285
                                        }
286
                                });
287
                }
288

    
289
                return chbEnlaceVivo;
290
        }
291

    
292
        /**
293
         * This method initializes lEscala
294
         *
295
         * @return javax.swing.JLabel
296
         */
297
        private javax.swing.JLabel getLEscala() {
298
                if (lEscala == null) {
299
                        lEscala = new javax.swing.JLabel();
300
                        lEscala.setSize(86, 16);
301
                        lEscala.setText(PluginServices.getText(this, "escala"));
302
                        lEscala.setLocation(10, 105);
303
                }
304

    
305
                return lEscala;
306
        }
307

    
308
        /**
309
         * This method initializes cbEscala
310
         *
311
         * @return javax.swing.JComboBox
312
         */
313
        private javax.swing.JComboBox getCbEscala() {
314
                if (cbEscala == null) {
315
                        //String[] s={"Autom?tico","Conservar escala de visualizaci?n","Escala especificada por el usuario"};
316
                        cbEscala = new javax.swing.JComboBox();
317
                        cbEscala.setSize(220, 20);
318
                        cbEscala.addItem(PluginServices.getText(this, "automatico"));
319
                        cbEscala.addItem(PluginServices.getText(this,
320
                                        "conservar_escala_visualizacion"));
321
                        cbEscala.addItem(PluginServices.getText(this, "escala_usuario"));
322
                        cbEscala.setSelectedIndex(fframeview.getTypeScale());
323

    
324
                        if (fframeview.getTypeScale() == 0 || fframeview.getTypeScale() == 1) {
325
                                getTEscalaNumerica().setEnabled(false);
326
                        }else{
327
                                getTEscalaNumerica().setEnabled(true);
328
                        }
329

    
330
                        cbEscala.setPreferredSize(new java.awt.Dimension(200, 20));
331
                        cbEscala.setLocation(100, 105);
332
                        cbEscala.addActionListener(new java.awt.event.ActionListener() {
333
                                        public void actionPerformed(java.awt.event.ActionEvent e) {
334
                                                if (cbEscala.getSelectedIndex() == 2) {
335
                                                        getTEscalaNumerica().setEnabled(true);
336
                                                } else {
337
                                                        getTEscalaNumerica().setEnabled(false);
338
                                                }
339
                                        }
340
                                });
341
                }
342

    
343
                return cbEscala;
344
        }
345

    
346
        /**
347
         * This method initializes lEscalaNumerica
348
         *
349
         * @return javax.swing.JLabel
350
         */
351
        private javax.swing.JLabel getLEscalaNumerica() {
352
                if (lEscalaNumerica == null) {
353
                        lEscalaNumerica = new javax.swing.JLabel();
354
                        lEscalaNumerica.setSize(86, 16);
355
                        lEscalaNumerica.setText("1:");
356
                        lEscalaNumerica.setLocation(10, 130);
357
                }
358

    
359
                return lEscalaNumerica;
360
        }
361

    
362
        /**
363
         * This method initializes tEscalaNumerica
364
         *
365
         * @return javax.swing.JTextField
366
         */
367
        private javax.swing.JTextField getTEscalaNumerica() {
368
                if (tEscalaNumerica == null) {
369
                        tEscalaNumerica = new javax.swing.JTextField();
370
                        tEscalaNumerica.setSize(220, 20);
371
                        tEscalaNumerica.setPreferredSize(new java.awt.Dimension(200, 20));
372

    
373
                        if (m_projectView != null) {
374
                                tEscalaNumerica.setText(String.valueOf(fframeview.getScale()));
375
                        }
376
                        tEscalaNumerica.setLocation(100, 130);
377
                        tEscalaNumerica.setEnabled(false);
378
                }
379

    
380
                return tEscalaNumerica;
381
        }
382

    
383
        /**
384
         * This method initializes lExtension
385
         *
386
         * @return javax.swing.JLabel
387
         */
388
        private javax.swing.JLabel getLExtension() {
389
                if (lExtension == null) {
390
                        lExtension = new javax.swing.JLabel();
391
                        lExtension.setSize(86, 16);
392
                        lExtension.setText(PluginServices.getText(this, "extension"));
393
                        lExtension.setLocation(10, 155);
394
                        lExtension.setVisible(false);
395
                }
396

    
397
                return lExtension;
398
        }
399

    
400
        /**
401
         * This method initializes cbExtension
402
         *
403
         * @return javax.swing.JComboBox
404
         */
405
        private javax.swing.JComboBox getCbExtension() {
406
                if (cbExtension == null) {
407
                        //String[] s={"Rellenar marco de la vista","Recorte a vista"};
408
                        cbExtension = new javax.swing.JComboBox();
409
                        cbExtension.setSize(220, 20);
410
                        cbExtension.addItem(PluginServices.getText(this,
411
                                        "rellenar_marco_vista"));
412
                        cbExtension.addItem(PluginServices.getText(this, "recorte_vista"));
413

    
414
                        cbExtension.setPreferredSize(new java.awt.Dimension(200, 20));
415
                        cbExtension.setLocation(100, 155);
416
                        cbExtension.setEnabled(false);
417
                        cbExtension.setVisible(false);
418
                }
419

    
420
                return cbExtension;
421
        }
422

    
423
        /**
424
         * This method initializes jLabel4
425
         *
426
         * @return javax.swing.JLabel
427
         */
428
        private javax.swing.JLabel getLVisualizacion() {
429
                if (lVisualizacion == null) {
430
                        lVisualizacion = new javax.swing.JLabel();
431
                        lVisualizacion.setSize(86, 16);
432
                        lVisualizacion.setText(PluginServices.getText(this, "visualizacion"));
433
                        lVisualizacion.setLocation(10, 180);
434
                        lVisualizacion.setVisible(false);
435
                }
436

    
437
                return lVisualizacion;
438
        }
439

    
440
        /**
441
         * This method initializes cbVisualizacion
442
         *
443
         * @return javax.swing.JComboBox
444
         */
445
        private javax.swing.JComboBox getCbVisualizacion() {
446
                if (cbVisualizacion == null) {
447
                        //String[] s={"Cuando activo","Siempre"};
448
                        cbVisualizacion = new javax.swing.JComboBox();
449
                        cbVisualizacion.setSize(220, 20);
450
                        cbVisualizacion.addItem(PluginServices.getText(this, "cuando_activo"));
451
                        cbVisualizacion.addItem(PluginServices.getText(this, "siempre"));
452
                        cbVisualizacion.setSelectedIndex(fframeview.getViewing());
453
                        cbVisualizacion.setPreferredSize(new java.awt.Dimension(200, 20));
454
                        cbVisualizacion.setLocation(100, 180);
455
                        cbVisualizacion.setEnabled(false);
456
                        cbVisualizacion.setVisible(false);
457
                }
458

    
459
                return cbVisualizacion;
460
        }
461

    
462
        /**
463
         * This method initializes jButton
464
         *
465
         * @return javax.swing.JButton
466
         */
467
        private javax.swing.JButton getbAceptar() {
468
                if (bAceptar == null) {
469
                        bAceptar = new javax.swing.JButton();
470
                        bAceptar.setSize(85, 26);
471
                        bAceptar.setText(PluginServices.getText(this, "Aceptar"));
472
                        bAceptar.setBounds(new java.awt.Rectangle(109,223,85,26));
473
                        bAceptar.addActionListener(new java.awt.event.ActionListener() {
474
                                        public void actionPerformed(java.awt.event.ActionEvent e) {
475
                                                newFFrameView=(FFrameView)fframeview.cloneFFrame(m_layout);
476
                                                newFFrameView.setBoundBox(FLayoutUtilities.toSheetRect(
477
                                                                rect, m_layout.getLayoutControl().getAT()));
478
                                                newFFrameView.setRotation(getPRotation().getRotation());
479
                                                if (m_projectView != null) {
480
                                                        newFFrameView.setLinked(getChbEnlaceVivo().isSelected());
481
                                                        newFFrameView.setName(m_projectView.getName());
482

    
483
                                                        newFFrameView.setTypeScale(getCbEscala()
484
                                                                                                                .getSelectedIndex());
485
                                                        newFFrameView.setScale(Double.parseDouble(
486
                                                                        getTEscalaNumerica().getText()));
487
                                                        newFFrameView.setView(m_projectView);
488

    
489
                                                        //fframeview.setFMap(m_projectView.getMapContext());
490
                                                        newFFrameView.setExtension(getCbExtension()
491
                                                                                                                .getSelectedIndex());
492
                                                        newFFrameView.setViewing(getCbVisualizacion()
493
                                                                                                          .getSelectedIndex());
494
                                                        newFFrameView.setQuality(getCbCalidad()
495
                                                                                                          .getSelectedIndex());
496
                                                        if (grid!=null){
497
                                                                ((FFrameGrid)grid).setLayout(m_layout);
498
                                                                ((FFrameGrid)grid).setFFrameDependence(newFFrameView);
499
//                                                                ((FFrameGrid)grid).setBoundBox();
500
                                                                newFFrameView.setGrid(grid);
501
                                                        }
502
                                                        newFFrameView.showGrid(getChbShowGrid().isSelected());
503

    
504
                                                        newFFrameView.setBoundBox(FLayoutUtilities.toSheetRect(
505
                                                                        rect, m_layout.getLayoutControl().getAT()));
506

    
507
                                                        /*        for (int i=0;i<m_layout.getFFrames().size();i++){
508
                                                           IFFrame fframe=(IFFrame)m_layout.getFFrames().get(i);
509
                                                           if (fframe instanceof FFrameScaleBar){
510
                                                                   if (((FFrameScaleBar)fframe).getFFrameView()==fframeview){
511
                                                                   if (getJComboBox().getSelectedIndex()!=0){
512
                                                                   ((FFrameScaleBar)fframe).setIsFixed(true);
513
                                                                   ((FFrameScaleBar)fframe).setScaleView(Long.parseLong(getJTextField().getText()));
514
                                                                   }else{
515
                                                                           ((FFrameScaleBar)fframe).setIsFixed(false);
516
                                                                   }
517

518
                                                                   }
519
                                                           }
520

521

522
                                                           }
523
                                                         */
524
                                                }
525

    
526
                                                isAcepted = true;
527

    
528
                                                //}else{
529
                                                //        isAcepted=false;
530
                                                //}
531
                                                PluginServices.getMDIManager().closeWindow(FFrameViewDialog.this);
532
                                        }
533
                                });
534
                }
535

    
536
                return bAceptar;
537
        }
538

    
539
        /**
540
         * This method initializes bCancelar
541
         *
542
         * @return javax.swing.JButton
543
         */
544
        private javax.swing.JButton getBCancelar() {
545
                if (bCancelar == null) {
546
                        bCancelar = new javax.swing.JButton();
547
                        bCancelar.setSize(85, 26);
548
                        bCancelar.setText(PluginServices.getText(this, "Cancelar"));
549
                        bCancelar.setBounds(new java.awt.Rectangle(207,223,85,26));
550
                        bCancelar.addActionListener(new java.awt.event.ActionListener() {
551
                                        public void actionPerformed(java.awt.event.ActionEvent e) {
552
                                                newFFrameView=null;
553
                                                PluginServices.getMDIManager().closeWindow(FFrameViewDialog.this);
554
                                        }
555
                                });
556
                }
557

    
558
                return bCancelar;
559
        }
560

    
561
        /**
562
         * This method initializes lCalidad
563
         *
564
         * @return javax.swing.JLabel
565
         */
566
        private javax.swing.JLabel getLCalidad() {
567
                if (lCalidad == null) {
568
                        lCalidad = new javax.swing.JLabel();
569
                        lCalidad.setSize(86, 16);
570
                        lCalidad.setText(PluginServices.getText(this, "calidad"));
571
                        lCalidad.setLocation(10, 155);
572
                }
573

    
574
                return lCalidad;
575
        }
576

    
577
        /**
578
         * This method initializes cbCalidad
579
         *
580
         * @return javax.swing.JComboBox
581
         */
582
        private javax.swing.JComboBox getCbCalidad() {
583
                if (cbCalidad == null) {
584
                        //String[] s={"Presentaci?n","Borrador"};
585
                        cbCalidad = new javax.swing.JComboBox();
586
                        cbCalidad.setSize(220, 20);
587
                        cbCalidad.addItem(PluginServices.getText(this, "presentacion"));
588
                        cbCalidad.addItem(PluginServices.getText(this, "borrador"));
589
                        cbCalidad.setSelectedIndex(fframeview.getQuality());
590
                        cbCalidad.setPreferredSize(new java.awt.Dimension(200, 20));
591
                        cbCalidad.setLocation(100, 155);
592
                }
593

    
594
                return cbCalidad;
595
        }
596

    
597
        /* (non-Javadoc)
598
         * @see com.iver.mdiApp.ui.MDIManager.View#getViewInfo()
599
         */
600
        public WindowInfo getWindowInfo() {
601
                WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
602

    
603
                //vi.setResizable(false);
604
                m_viewinfo.setTitle(PluginServices.getText(this,
605
                                "propiedades_marco_vista"));
606

    
607
                return m_viewinfo;
608
        }
609

    
610
        /**
611
         * @see com.iver.cit.gvsig.project.documents.layout.fframes.gui.dialogs.IFFrameDialog#getIsAcepted()
612
         */
613
        public boolean getIsAcepted() {
614
                return isAcepted;
615
        }
616

    
617
        /**
618
         * @see com.iver.mdiApp.ui.MDIManager.IWindow#windowActivated()
619
         */
620
        public void viewActivated() {
621
        }
622

    
623
        /**
624
         * This method initializes rotation
625
         *
626
         * @return javax.swing.JPanel
627
         */
628
        private JPRotation getPRotation() {
629
                if (rotation == null) {
630
                        rotation = new JPRotation();
631
                        rotation.setBounds(330, 90, 120, 120);
632
                }
633
                return rotation;
634
        }
635

    
636
        public IFFrame getFFrame() {
637
                return newFFrameView;
638
        }
639
        /**
640
         * This method initializes bGrid
641
         *
642
         * @return javax.swing.JButton
643
         */
644
        private JButton getBGrid() {
645
                if (bGrid == null) {
646
                        bGrid = new JButton();
647
                        bGrid.setBounds(new java.awt.Rectangle(207,186,85,26));
648
                        bGrid.setText(PluginServices.getText(this,"configurar"));
649
                        bGrid.addActionListener(new java.awt.event.ActionListener() {
650

    
651

    
652
                                public void actionPerformed(java.awt.event.ActionEvent e) {
653
                                        FFrameGridFactory gridFactory=new FFrameGridFactory();
654
                                        FFrameGrid fframe =(FFrameGrid)gridFactory.createFrame();
655
                                        fframe.setLayout(m_layout);
656
                                        fframe.setFFrameDependence(fframeview);
657

    
658
                                        FFrameGridDialog fframedialog = new FFrameGridDialog(m_layout, fframe,fframeview);
659
//                                        fframedialog.setFFrameView(fframeview);
660
                                        if (fframedialog != null) {
661
                                            PluginServices.getMDIManager().addWindow(fframedialog);
662
                                        }
663
                                    IFFrame newFrame= fframedialog.getFFrame();
664
                                    if (newFrame!=null) {
665
                                                grid=newFrame;
666
                                        }
667
                                }
668
                        });
669
                }
670
                return bGrid;
671
        }
672

    
673
        /**
674
         * This method initializes chbShowGrid
675
         *
676
         * @return javax.swing.JCheckBox
677
         */
678
        private JCheckBox getChbShowGrid() {
679
                if (chbShowGrid == null) {
680
                        chbShowGrid = new JCheckBox();
681
                        chbShowGrid.setBounds(new java.awt.Rectangle(13,191,181,21));
682
                        chbShowGrid.setSelected(fframeview.isShowGrid());
683
                        chbShowGrid.setText(PluginServices.getText(this,"Show_grid"));
684
                }
685
                return chbShowGrid;
686
        }
687
        public Object getWindowProfile() {
688
                return WindowInfo.DIALOG_PROFILE;
689
        }
690
}  //  @jve:decl-index=0:visual-constraint="10,10"