Statistics
| Revision:

svn-document-layout / branches / usability_v2 / org.gvsig.app.document.layout.app / org.gvsig.app.document.layout.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / fframes / gui / dialogs / FFrameViewDialog.java @ 145

History | View | Annotate | Download (24.2 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.app.project.documents.layout.fframes.gui.dialogs;
23

    
24
import java.awt.Dimension;
25
import java.awt.geom.Rectangle2D;
26

    
27
import javax.swing.JButton;
28
import javax.swing.JCheckBox;
29
import javax.swing.JList;
30
import javax.swing.JOptionPane;
31

    
32
import org.gvsig.andami.PluginServices;
33
import org.gvsig.andami.messages.NotificationManager;
34
import org.gvsig.andami.ui.mdiManager.WindowInfo;
35
import org.gvsig.app.ApplicationLocator;
36
import org.gvsig.app.project.ProjectManager;
37
import org.gvsig.app.project.documents.layout.FLayoutUtilities;
38
import org.gvsig.app.project.documents.layout.LayoutManager;
39
import org.gvsig.app.project.documents.layout.LayoutNotification;
40
import org.gvsig.app.project.documents.layout.fframes.FFrameGrid;
41
import org.gvsig.app.project.documents.layout.fframes.FFrameView;
42
import org.gvsig.app.project.documents.layout.fframes.IFFrame;
43
import org.gvsig.app.project.documents.layout.fframes.IFFrameUseFMap;
44
import org.gvsig.app.project.documents.layout.fframes.ListViewModel;
45
import org.gvsig.app.project.documents.layout.fframes.gui.JPRotation;
46
import org.gvsig.app.project.documents.layout.gui.LayoutPanel;
47
import org.gvsig.app.project.documents.view.DefaultViewDocument;
48
import org.gvsig.app.project.documents.view.toc.gui.TOC;
49
import org.gvsig.fmap.mapcontext.ViewPort;
50
import org.gvsig.i18n.Messages;
51
import org.gvsig.tools.observer.Observable;
52
import org.gvsig.tools.observer.Observer;
53

    
54
/**
55
 * Di?logo para a?adir una vista al Layout.
56
 * 
57
 * @author Vicente Caballero Navarro
58
 */
59
public class FFrameViewDialog extends AbstractFFrameDialog implements
60
    IFFrameDialog {
61

    
62
    private static final long serialVersionUID = -7223804566537544559L;
63
    
64
    private final LayoutManager layoutManager;
65
    
66
    private javax.swing.JPanel jContentPane = null;
67
    private javax.swing.JLabel lVistas = null;
68
    private javax.swing.JScrollPane jScrollPane = null;
69
    private javax.swing.JList liVistas = null; // @jve:visual-info decl-index=0
70
                                               // visual-constraint="98,-3"
71
    private javax.swing.JCheckBox chbEnlaceVivo = null;
72
    private javax.swing.JLabel lEscala = null;
73
    private javax.swing.JComboBox cbEscala = null;
74
    private javax.swing.JLabel lEscalaNumerica = null;
75
    private javax.swing.JTextField tEscalaNumerica = null;
76
    private javax.swing.JLabel lExtension = null;
77
    private javax.swing.JComboBox cbExtension = null;
78
    private javax.swing.JLabel lVisualizacion = null;
79
    private javax.swing.JComboBox cbVisualizacion = null;
80
    private javax.swing.JButton bAceptar = null;
81
    private javax.swing.JButton bCancelar = null;
82
    private javax.swing.JLabel lCalidad = null;
83
    private javax.swing.JComboBox cbCalidad = null;
84
    private DefaultViewDocument m_projectView = null;
85
    private Rectangle2D rect = new Rectangle2D.Double();
86
    private FFrameView fframeview = null; // new FFrameView();
87
    private boolean isAcepted = false;
88
    private JPRotation rotation = null;
89
    private FFrameView newFFrameView = null;
90
    private javax.swing.JButton bGrid = null;
91
    private javax.swing.JCheckBox chbShowGrid = null;
92

    
93
    /**
94
     * This is the default constructor
95
     * 
96
     * @param layoutPanel
97
     *            Referencia al Layout.
98
     * @param fframe
99
     *            Referencia al fframe vista.
100
     */
101
    public FFrameViewDialog(LayoutPanel layoutPanel, IFFrame frame) {
102
        super(layoutPanel, frame);
103
        fframeview = (FFrameView) frame;
104
        initialize();
105
        layoutManager = (LayoutManager) ProjectManager.getInstance()
106
            .getDocumentManager("project.document.layout");
107
    }
108

    
109
    /**
110
     * This method initializes this
111
     */
112
    private void initialize() {
113
        this.setLayout(null);
114
        this.add(getJContentPane(), null);
115
        this.setSize(478, 269);
116

    
117
        if (fframeview.getTypeScale() == 0 || fframeview.getTypeScale() == 1) {
118
            getTEscalaNumerica().setEnabled(false);
119
        } else {
120
            getTEscalaNumerica().setEnabled(true);
121
        }
122
        getPRotation().setRotation(fframeview.getRotation());
123
    }
124

    
125
    /**
126
     * Inserta el rect?ngulo que ocupar? el fframe vista.
127
     * 
128
     * @param r
129
     *            Rect?ngulo.
130
     */
131
    public void setRectangle(Rectangle2D r) {
132
        rect.setRect(r);
133
    }
134

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

    
165
        return jContentPane;
166
    }
167

    
168
    /**
169
     * This method initializes lVistas
170
     * 
171
     * @return javax.swing.JLabel
172
     */
173
    private javax.swing.JLabel getLVistas() {
174
        if (lVistas == null) {
175
            lVistas = new javax.swing.JLabel();
176
            lVistas.setSize(85, 19);
177
            lVistas.setText(PluginServices.getText(this, "Vista"));
178
            lVistas.setLocation(10, 10);
179
        }
180

    
181
        return lVistas;
182
    }
183

    
184
    /**
185
     * This method initializes jScrollPane
186
     * 
187
     * @return javax.swing.JScrollPane
188
     */
189
    private javax.swing.JScrollPane getJScrollPane() {
190
        if (jScrollPane == null) {
191
            jScrollPane = new javax.swing.JScrollPane();
192
            jScrollPane.setViewportView(getLiVistas());
193
            jScrollPane.setBounds(99, 8, 224, 64);
194
            jScrollPane.setPreferredSize(new java.awt.Dimension(250, 60));
195
        }
196

    
197
        return jScrollPane;
198
    }
199

    
200
    /**
201
     * This method initializes liVistas
202
     * 
203
     * @return javax.swing.JList
204
     */
205
    private javax.swing.JList getLiVistas() {
206
        if (liVistas == null) {
207
            ListViewModel listmodel = new ListViewModel();
208
            
209
            if (listmodel.addViews()) {
210
               JOptionPane.showMessageDialog(
211
                   ApplicationLocator.getManager().getRootComponent(),
212
                   Messages.getText("_Some_views_excluded_from_list_because_have_editing_layers"),
213
                   Messages.getText("propiedades_marco_vista"),
214
                   JOptionPane.WARNING_MESSAGE); 
215
            }
216
            
217
            liVistas = new javax.swing.JList();
218
            liVistas.setModel(listmodel);
219
            for (int i = 0; i < liVistas.getModel().getSize(); i++) {
220
                if (fframeview.getMapContext() != null) {
221

    
222
                    DefaultViewDocument pvaux =
223
                        (DefaultViewDocument) liVistas.getModel().getElementAt(
224
                            i);
225

    
226
                    if (pvaux.getMapContext()
227
                        .equals(fframeview.getMapContext())) {
228
                        liVistas.setSelectedIndex(i);
229
                        m_projectView =
230
                            (DefaultViewDocument) liVistas.getModel()
231
                                .getElementAt(i);
232
                    }
233
                }
234
            }
235

    
236
            liVistas
237
                .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
238

    
239
                    private int selectIndex = -1;
240
                    private Rectangle2D boundBox;
241

    
242
                    public void valueChanged(
243
                        javax.swing.event.ListSelectionEvent e) {
244
                        int selectInt =
245
                            ((JList) e.getSource()).getSelectedIndex();
246
                        if (selectInt != selectIndex) {
247
                            selectIndex = selectInt;
248
                            if (selectIndex == -1) {
249
                                return;
250
                            }
251
                            m_projectView =
252
                                (DefaultViewDocument) liVistas.getModel()
253
                                    .getElementAt(selectInt);
254

    
255
                            getCbEscala().setSelectedItem(
256
                                PluginServices.getText(this, "automatico"));
257
                            boundBox =
258
                                FLayoutUtilities.toSheetRect(rect, layoutPanel
259
                                    .getLayoutControl().getAT());
260
                            ViewPort vp;
261
                            try {
262
                                vp =
263
                                    (ViewPort) m_projectView.getMapContext()
264
                                        .getViewPort().clone();
265
                                vp.setImageSize(new Dimension((int) rect
266
                                    .getWidth(), (int) rect.getHeight()));
267
                                getTEscalaNumerica().setText(
268
                                    String.valueOf(FLayoutUtilities
269
                                        .getScaleView(vp, boundBox.getWidth(),
270
                                            FLayoutUtilities.fromSheetDistance(
271
                                                boundBox.getWidth(),
272
                                                layoutPanel.getLayoutControl()
273
                                                    .getAT()))));
274
                            } catch (CloneNotSupportedException e1) {
275
                                NotificationManager.addError("Excepci?n :", e1);
276
                            }
277
                        }
278
                    }
279
                });
280
        }
281

    
282
        return liVistas;
283
    }
284

    
285
    /**
286
     * This method initializes chbEnlaceVivo
287
     * 
288
     * @return javax.swing.JCheckBox
289
     */
290
    private javax.swing.JCheckBox getChbEnlaceVivo() {
291
        if (chbEnlaceVivo == null) {
292
            chbEnlaceVivo = new javax.swing.JCheckBox();
293
            chbEnlaceVivo.setSize(88, 24);
294
            chbEnlaceVivo.setText(PluginServices.getText(this, "enlace_vivo"));
295
            chbEnlaceVivo.setSelected(fframeview.getLinked());
296
            chbEnlaceVivo.setLocation(10, 75);
297
            chbEnlaceVivo.setEnabled(true);
298
            chbEnlaceVivo
299
                .addActionListener(new java.awt.event.ActionListener() {
300

    
301
                    public void actionPerformed(java.awt.event.ActionEvent e) {
302
                        System.out.println("actionPerformed()"); // TODO
303
                                                                 // Auto-generated
304
                                                                 // Event stub
305
                                                                 // actionPerformed()
306
                    }
307
                });
308
        }
309

    
310
        return chbEnlaceVivo;
311
    }
312

    
313
    /**
314
     * This method initializes lEscala
315
     * 
316
     * @return javax.swing.JLabel
317
     */
318
    private javax.swing.JLabel getLEscala() {
319
        if (lEscala == null) {
320
            lEscala = new javax.swing.JLabel();
321
            lEscala.setSize(86, 16);
322
            lEscala.setText(PluginServices.getText(this, "escala"));
323
            lEscala.setLocation(10, 105);
324
        }
325

    
326
        return lEscala;
327
    }
328

    
329
    /**
330
     * This method initializes cbEscala
331
     * 
332
     * @return javax.swing.JComboBox
333
     */
334
    private javax.swing.JComboBox getCbEscala() {
335
        if (cbEscala == null) {
336
            // String[]
337
            // s={"Autom?tico","Conservar escala de visualizaci?n","Escala especificada por el usuario"};
338
            cbEscala = new javax.swing.JComboBox();
339
            cbEscala.setSize(220, 20);
340
            cbEscala.addItem(PluginServices.getText(this, "automatico"));
341
            cbEscala.addItem(PluginServices.getText(this,
342
                "conservar_escala_visualizacion"));
343
            cbEscala.addItem(PluginServices.getText(this, "escala_usuario"));
344
            cbEscala.setSelectedIndex(fframeview.getTypeScale());
345

    
346
            if (fframeview.getTypeScale() == 0
347
                || fframeview.getTypeScale() == 1) {
348
                getTEscalaNumerica().setEnabled(false);
349
            } else {
350
                getTEscalaNumerica().setEnabled(true);
351
            }
352

    
353
            cbEscala.setPreferredSize(new java.awt.Dimension(200, 20));
354
            cbEscala.setLocation(100, 105);
355
            cbEscala.addActionListener(new java.awt.event.ActionListener() {
356

    
357
                public void actionPerformed(java.awt.event.ActionEvent e) {
358
                    if (cbEscala.getSelectedIndex() == 2) {
359
                        getTEscalaNumerica().setEnabled(true);
360
                    } else {
361
                        getTEscalaNumerica().setEnabled(false);
362
                    }
363
                }
364
            });
365
        }
366

    
367
        return cbEscala;
368
    }
369

    
370
    /**
371
     * This method initializes lEscalaNumerica
372
     * 
373
     * @return javax.swing.JLabel
374
     */
375
    private javax.swing.JLabel getLEscalaNumerica() {
376
        if (lEscalaNumerica == null) {
377
            lEscalaNumerica = new javax.swing.JLabel();
378
            lEscalaNumerica.setSize(86, 16);
379
            lEscalaNumerica.setText("1:");
380
            lEscalaNumerica.setLocation(10, 130);
381
        }
382

    
383
        return lEscalaNumerica;
384
    }
385

    
386
    /**
387
     * This method initializes tEscalaNumerica
388
     * 
389
     * @return javax.swing.JTextField
390
     */
391
    private javax.swing.JTextField getTEscalaNumerica() {
392
        if (tEscalaNumerica == null) {
393
            tEscalaNumerica = new javax.swing.JTextField();
394
            tEscalaNumerica.setSize(220, 20);
395
            tEscalaNumerica.setPreferredSize(new java.awt.Dimension(200, 20));
396

    
397
            if (m_projectView != null) {
398
                tEscalaNumerica.setText(String.valueOf(fframeview.getScale()));
399
            }
400
            tEscalaNumerica.setLocation(100, 130);
401
            tEscalaNumerica.setEnabled(false);
402
        }
403

    
404
        return tEscalaNumerica;
405
    }
406

    
407
    /**
408
     * This method initializes lExtension
409
     * 
410
     * @return javax.swing.JLabel
411
     */
412
    private javax.swing.JLabel getLExtension() {
413
        if (lExtension == null) {
414
            lExtension = new javax.swing.JLabel();
415
            lExtension.setSize(86, 16);
416
            lExtension.setText(PluginServices.getText(this, "extension"));
417
            lExtension.setLocation(10, 155);
418
            lExtension.setVisible(false);
419
        }
420

    
421
        return lExtension;
422
    }
423

    
424
    /**
425
     * This method initializes cbExtension
426
     * 
427
     * @return javax.swing.JComboBox
428
     */
429
    private javax.swing.JComboBox getCbExtension() {
430
        if (cbExtension == null) {
431
            // String[] s={"Rellenar marco de la vista","Recorte a vista"};
432
            cbExtension = new javax.swing.JComboBox();
433
            cbExtension.setSize(220, 20);
434
            cbExtension.addItem(PluginServices.getText(this,
435
                "rellenar_marco_vista"));
436
            cbExtension.addItem(PluginServices.getText(this, "recorte_vista"));
437

    
438
            cbExtension.setPreferredSize(new java.awt.Dimension(200, 20));
439
            cbExtension.setLocation(100, 155);
440
            cbExtension.setEnabled(false);
441
            cbExtension.setVisible(false);
442
        }
443

    
444
        return cbExtension;
445
    }
446

    
447
    /**
448
     * This method initializes jButton
449
     * 
450
     * @return javax.swing.JButton
451
     */
452
    private javax.swing.JButton getbAceptar() {
453
        if (bAceptar == null) {
454
            bAceptar = new javax.swing.JButton();
455
            bAceptar.setSize(85, 26);
456
            bAceptar.setText(PluginServices.getText(this, "Aceptar"));
457
            bAceptar.setBounds(new java.awt.Rectangle(109, 223, 85, 26));
458
            bAceptar.addActionListener(new java.awt.event.ActionListener() {
459

    
460
                public void actionPerformed(java.awt.event.ActionEvent e) {
461
                    try {
462
                        newFFrameView = (FFrameView) fframeview.clone();
463
                        newFFrameView.setBoundBox(FLayoutUtilities.toSheetRect(
464
                            rect, layoutPanel.getLayoutControl().getAT()));
465
                        newFFrameView.setRotation(getPRotation().getRotation());
466
                        if (m_projectView != null) {
467
                            newFFrameView.setLinked(getChbEnlaceVivo()
468
                                .isSelected());
469
                            // newFFrameView.setName(m_projectView.getName());
470

    
471
                            newFFrameView.setTypeScale(getCbEscala()
472
                                .getSelectedIndex());
473
                            if (newFFrameView.getTypeScale()!=IFFrameUseFMap.AUTOMATICO){
474
                                    newFFrameView.setScale(Double
475
                                                    .parseDouble(getTEscalaNumerica().getText()));
476
                            }
477
                            newFFrameView.setView(m_projectView);
478
                            newFFrameView.setQuality(getCbCalidad()
479
                                .getSelectedIndex());
480
                            if (fframeview.getGrid() != null) {                             
481
                                ((FFrameGrid) fframeview.getGrid())
482
                                    .setFFrameDependence(newFFrameView);
483
                                newFFrameView.setGrid(fframeview.getGrid());
484
                            }
485
                            newFFrameView.showGrid(getChbShowGrid()
486
                                .isSelected());
487
                            newFFrameView.setBoundBox(FLayoutUtilities
488
                                .toSheetRect(rect, layoutPanel
489
                                    .getLayoutControl().getAT()));
490
                            newFFrameView.setToc(true);
491

    
492
                        }
493
                    } catch (CloneNotSupportedException e1) {
494
                        LOG.error("It is not possible clonate the object", e);
495
                    }
496
                    isAcepted = true;
497
                    PluginServices.getMDIManager().closeWindow(
498
                        FFrameViewDialog.this);
499
                }
500
            });
501
        }
502

    
503
        return bAceptar;
504
    }
505

    
506
    /**
507
     * This method initializes bCancelar
508
     * 
509
     * @return javax.swing.JButton
510
     */
511
    private javax.swing.JButton getBCancelar() {
512
        if (bCancelar == null) {
513
            bCancelar = new javax.swing.JButton();
514
            bCancelar.setSize(85, 26);
515
            bCancelar.setText(PluginServices.getText(this, "Cancelar"));
516
            bCancelar.setBounds(new java.awt.Rectangle(207, 223, 85, 26));
517
            bCancelar.addActionListener(new java.awt.event.ActionListener() {
518

    
519
                public void actionPerformed(java.awt.event.ActionEvent e) {
520
                    newFFrameView = null;
521
                    PluginServices.getMDIManager().closeWindow(
522
                        FFrameViewDialog.this);
523
                }
524
            });
525
        }
526

    
527
        return bCancelar;
528
    }
529

    
530
    /**
531
     * This method initializes lCalidad
532
     * 
533
     * @return javax.swing.JLabel
534
     */
535
    private javax.swing.JLabel getLCalidad() {
536
        if (lCalidad == null) {
537
            lCalidad = new javax.swing.JLabel();
538
            lCalidad.setSize(86, 16);
539
            lCalidad.setText(PluginServices.getText(this, "calidad"));
540
            lCalidad.setLocation(10, 155);
541
        }
542

    
543
        return lCalidad;
544
    }
545

    
546
    /**
547
     * This method initializes cbCalidad
548
     * 
549
     * @return javax.swing.JComboBox
550
     */
551
    private javax.swing.JComboBox getCbCalidad() {
552
        if (cbCalidad == null) {
553
            // String[] s={"Presentaci?n","Borrador"};
554
            cbCalidad = new javax.swing.JComboBox();
555
            cbCalidad.setSize(220, 20);
556
            cbCalidad.addItem(PluginServices.getText(this, "presentacion"));
557
            cbCalidad.addItem(PluginServices.getText(this, "borrador"));
558
            cbCalidad.setSelectedIndex(fframeview.getQuality());
559
            cbCalidad.setPreferredSize(new java.awt.Dimension(200, 20));
560
            cbCalidad.setLocation(100, 155);
561
        }
562

    
563
        return cbCalidad;
564
    }
565

    
566
    /*
567
     * (non-Javadoc)
568
     * 
569
     * @see com.iver.mdiApp.ui.MDIManager.View#getViewInfo()
570
     */
571
    public WindowInfo getWindowInfo() {
572
        WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
573

    
574
        // vi.setResizable(false);
575
        m_viewinfo.setTitle(PluginServices.getText(this,
576
            "propiedades_marco_vista"));
577

    
578
        return m_viewinfo;
579
    }
580

    
581
    /**
582
     * @see org.gvsig.app.project.documents.layout.fframes.gui.dialogs.IFFrameDialog#getIsAcepted()
583
     */
584
    public boolean getIsAcepted() {
585
        return isAcepted;
586
    }
587

    
588
    /**
589
     * @see com.iver.mdiApp.ui.MDIManager.IWindow#windowActivated()
590
     */
591
    public void viewActivated() {
592
    }
593

    
594
    /**
595
     * This method initializes rotation
596
     * 
597
     * @return javax.swing.JPanel
598
     */
599
    private JPRotation getPRotation() {
600
        if (rotation == null) {
601
            rotation = new JPRotation();
602
            rotation.setBounds(330, 90, 120, 120);
603
        }
604
        return rotation;
605
    }
606

    
607
    public IFFrame getFFrame() {
608
        return newFFrameView;
609
    }
610

    
611
    /**
612
     * This method initializes bGrid
613
     * 
614
     * @return javax.swing.JButton
615
     */
616
    private JButton getBGrid() {
617
        if (bGrid == null) {
618
            bGrid = new JButton();
619
            bGrid.setBounds(new java.awt.Rectangle(207, 186, 85, 26));
620
            bGrid.setText(PluginServices.getText(this, "configurar"));
621
            bGrid.addActionListener(new java.awt.event.ActionListener() {
622

    
623
                public void actionPerformed(java.awt.event.ActionEvent e) {                
624
                    FFrameGrid fframeGrid = null;
625

    
626
                    if (fframeview.getGrid() != null) {
627
                        fframeGrid = (FFrameGrid) fframeview.getGrid();
628
                    } else {                       
629
                        fframeGrid = (FFrameGrid) layoutManager.createFrame(FFrameGrid.PERSISTENCE_DEFINITION_NAME);                
630
                        fframeGrid.setFFrameDependence(fframeview);             
631
                    }
632

    
633
                    FFrameGridDialog fframeGridDialog = 
634
                        (FFrameGridDialog)layoutManager.createFFrameDialog(fframeGrid, layoutPanel);
635
                    fframeGridDialog.setFFrameView(fframeview);
636
                        
637
   
638
                    if (fframeGridDialog != null) {
639
                        PluginServices.getMDIManager().addWindow(fframeGridDialog);
640
                    }
641
                    IFFrame newFrame = fframeGridDialog.getFFrame();
642
                    if (newFrame != null) {
643
                        fframeview.setGrid(newFrame);
644
                    }
645
                }
646
            });
647
        }
648
        return bGrid;
649
    }
650

    
651
    /**
652
     * This method initializes chbShowGrid
653
     * 
654
     * @return javax.swing.JCheckBox
655
     */
656
    private JCheckBox getChbShowGrid() {
657
        if (chbShowGrid == null) {
658
            chbShowGrid = new JCheckBox();
659
            chbShowGrid.setBounds(new java.awt.Rectangle(13, 191, 181, 21));
660
            chbShowGrid.setSelected(fframeview.isShowGrid());
661
            chbShowGrid.setText(PluginServices.getText(this, "Show_grid"));
662
        }
663
        return chbShowGrid;
664
    }
665

    
666
    public Object getWindowProfile() {
667
        return WindowInfo.DIALOG_PROFILE;
668
    }
669

    
670
} // @jve:decl-index=0:visual-constraint="10,10"