Revision 37840 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/gui/ProjectWindow.java

View differences:

ProjectWindow.java
22 22
package org.gvsig.app.project.documents.gui;
23 23

  
24 24
import java.awt.Component;
25
import java.awt.Dimension;
25 26
import java.awt.FlowLayout;
26 27
import java.awt.GridBagConstraints;
27 28
import java.awt.GridBagLayout;
......
38 39
import java.util.List;
39 40

  
40 41
import javax.swing.AbstractButton;
42
import javax.swing.BorderFactory;
41 43
import javax.swing.ButtonGroup;
42 44
import javax.swing.JButton;
45
import javax.swing.JComponent;
43 46
import javax.swing.JDialog;
44 47
import javax.swing.JLabel;
45 48
import javax.swing.JList;
......
73 76
 * de documento.
74 77
 * 
75 78
 * @author Vicente Caballero Navarro
79
 * @author gvSIG team
76 80
 */
77 81
public class ProjectWindow extends JPanel implements PropertyChangeListener,
78 82
    IWindow, SingletonWindow, Observer {
......
81 85

  
82 86
    public static final String PERSISTENCE_DEFINITION_NAME = "ProjectWindow";
83 87

  
84
    private JPanel jPanel = null;
88
    private JScrollPane documentTypes = null;
89
    private JPanel documentTypesList = null;
85 90
    private JRadioButton[] btnsDocuments = null;
86 91
    private ButtonGroup grupo = new ButtonGroup();
87
    private JPanel jPanel1 = null;
92
    private JPanel documentsPanel = null;
88 93
    private JList lstDocs = null;
89 94
    private JPanel jPanel2 = null;
90 95
    private JButton btnNuevo = null;
......
92 97
    private JButton btnAbrir = null;
93 98
    private JButton btnBorrar = null;
94 99
    private JButton btnRenombrar = null;
95
    private JPanel jPanel3 = null;
100
    private JPanel propertiesPanel = null;
96 101
    private JLabel jLabel = null;
97 102
    private JLabel lblNombreSesion = null;
98 103
    private JLabel jLabel1 = null;
......
106 111
    private WindowInfo m_viewInfo = null;
107 112

  
108 113
    private Project project;
109
    private UsabilitySwingManager manager =
110
        ToolsSwingLocator.getUsabilitySwingManager();
114
    private UsabilitySwingManager manager = ToolsSwingLocator
115
        .getUsabilitySwingManager();
111 116

  
112
    private JScrollPane jScrollPane = null;
113
    private JPanel jPanel4 = null;
114
    private JScrollPane jScrollPane1 = null;
117
    private JScrollPane documentsScrollPane = null;
118
    private JPanel projectButtonsPanel = null;
115 119

  
116 120
    /**
117 121
     * This is the default constructor
......
178 182
            tituloMarco = getDocumentSelectedName();
179 183

  
180 184
            lstDocs.setModel(model);
181
            ((TitledBorder) getJPanel1().getBorder()).setTitle(tituloMarco);
182
            getJPanel1().repaint(1);
185
            ((TitledBorder) getDocumentsPanel().getBorder())
186
                .setTitle(tituloMarco);
187
            getDocumentsPanel().repaint(1);
183 188
            activarBotones();
184 189
        }
185 190
    }
......
245 250
     * This method initializes this
246 251
     */
247 252
    private void initialize() {
248
        GridBagConstraints gridBagConstraints = new GridBagConstraints();
249
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
250
        gridBagConstraints.weightx = 1.0;
251
        gridBagConstraints.weighty = 1.0;
252
        GridBagLayout layout = new GridBagLayout();
253
        setLayout(layout);
253
        this.setLayout(new GridBagLayout());
254 254
        GridBagConstraints c = new GridBagConstraints();
255
        c.insets = new Insets(2, 5, 2, 5);
256

  
255 257
        c.fill = GridBagConstraints.HORIZONTAL;
256
        c.weightx = 1.0;
257
        c.weighty = 0;
258
        c.weightx = 1.0d;
259
        c.weighty = 0.0d;
258 260
        c.gridy = 0;
259
        c.insets = new Insets(2, 5, 2, 5);
261
        add(getDocumentTypesPanel(), c);
260 262

  
261
        layout.setConstraints(getJPanel(), c);
262
        add(getJPanel(), null);
263

  
264 263
        c.fill = GridBagConstraints.BOTH;
265 264
        c.gridy = 1;
266
        c.weightx = 1.0;
267
        c.weighty = 1.0;
268
        layout.setConstraints(getJPanel1(), c);
269
        add(getJPanel1(), null);
265
        c.weightx = 1.0d;
266
        c.weighty = 1.0d;
267
        add(getDocumentsPanel(), c);
268

  
270 269
        c.fill = GridBagConstraints.HORIZONTAL;
271
        c.weightx = 0;
272
        c.weighty = 0;
270
        c.weightx = 1.0d;
271
        c.weighty = 0.0d;
273 272
        c.gridy = 2;
274
        layout.setConstraints(getJPanel3(), c);
275
        add(getJPanel3(), null);
273
        add(getPropertiesPanel(), c);
276 274

  
277
        this.setSize(430, 544);
278
        this.setPreferredSize(new java.awt.Dimension(430, 554));
279
        this.setMinimumSize(new java.awt.Dimension(430, 554));
280
        this.add(getJScrollPane1(), gridBagConstraints);
275
        this.setMinimumSize(this.getPreferredSize());
281 276
        refreshDocuments();
282 277
    }
283 278

  
......
331 326
        if (doc != null) {
332 327
            IWindow window = doc.getFactory().getMainWindow(doc);
333 328
            if (window == null) {
334
                JOptionPane.showMessageDialog((Component) PluginServices
335
                    .getMainFrame(), PluginServices.getText(this,
336
                    "error_opening_the_document"));
329
                JOptionPane.showMessageDialog(
330
                    (Component) PluginServices.getMainFrame(),
331
                    PluginServices.getText(this, "error_opening_the_document"));
337 332
                return;
338 333
            }
339 334
            PluginServices.getMDIManager().addWindow(window,
......
385 380
            }
386 381
            if (((AbstractDocument) lstDocs.getModel().getElementAt(i))
387 382
                .getName().equals(nuevoNombre)) {
388
                JOptionPane.showMessageDialog((Component) PluginServices
389
                    .getMainFrame(), PluginServices.getText(this,
390
                    "elemento_ya_existe"));
383
                JOptionPane.showMessageDialog(
384
                    (Component) PluginServices.getMainFrame(),
385
                    PluginServices.getText(this, "elemento_ya_existe"));
391 386
                return;
392 387
            }
393 388

  
......
403 398
     */
404 399
    private void borrar() {
405 400
        int res =
406
            JOptionPane.showConfirmDialog((Component) PluginServices
407
                .getMainFrame(), PluginServices.getText(this,
408
                "confirmar_borrar"), PluginServices.getText(this, "borrar"),
401
            JOptionPane.showConfirmDialog(
402
                (Component) PluginServices.getMainFrame(),
403
                PluginServices.getText(this, "confirmar_borrar"),
404
                PluginServices.getText(this, "borrar"),
409 405
                JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE);
410 406

  
411 407
        int lastremoved = 0;
......
451 447
        List<Document> documents = project.getDocuments(doctype);
452 448
        Document doc = documents.get(index);
453 449
        if (doc.isLocked()) {
454
            JOptionPane.showMessageDialog(this, PluginServices.getText(this,
455
                "locked_element"));
450
            JOptionPane.showMessageDialog(this,
451
                PluginServices.getText(this, "locked_element"));
456 452
            return;
457 453
        }
458 454
        dlg = doc.getFactory().getPropertiesWindow(doc);
......
468 464
     * 
469 465
     * @return JPanel
470 466
     */
471
    private JPanel getJPanel() {
472
        if (jPanel == null) {
473
            jPanel = new JPanel();
467
    private JComponent getDocumentTypesPanel() {
468
        if (documentTypes == null) {
474 469

  
475
            java.awt.FlowLayout layFlowLayout1 = new java.awt.FlowLayout();
476
            layFlowLayout1.setHgap(15);
477
            jPanel.setLayout(layFlowLayout1);
470
            documentTypesList =
471
                new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));
472
            documentTypesList.setName("tipoDocPanel");
478 473
            fillDocumentTypeButtons();
479
            jPanel.setName("tipoDocPanel");
480
            // jPanel.setPreferredSize(new java.awt.Dimension(700, 200));
481
            jPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
474

  
475
            documentTypes = new JScrollPane(documentTypesList);
476
            Dimension dim = documentTypesList.getPreferredSize();
477
            documentTypes.setMinimumSize(new Dimension(dim.width,
478
                dim.height + 35));
479
            documentTypes.setBorder(BorderFactory.createTitledBorder(null,
482 480
                PluginServices.getText(this, "tipos_de_documentos"),
483 481
                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
484 482
                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
485 483
        }
486 484

  
487
        return jPanel;
485
        return documentTypes;
488 486
    }
489 487

  
490 488
    /**
491 489
     * Adds a button for each document type
492 490
     */
493 491
    private void fillDocumentTypeButtons() {
494
        JRadioButton[] btns = getBtnDocuments();
492
        JRadioButton[] btns = getBtnDocumentTypes();
495 493
        for (int i = 0; i < btns.length; i++) {
496
            jPanel.add(btns[i], null);
494
            documentTypesList.add(btns[i]);
497 495
        }
498 496
    }
499 497

  
......
502 500
     * 
503 501
     * @return JRadioButton
504 502
     */
505
    private JRadioButton[] getBtnDocuments() {
503
    private JRadioButton[] getBtnDocumentTypes() {
506 504
        if (btnsDocuments == null) {
507 505

  
508 506
            List<JRadioButton> btns = new ArrayList<JRadioButton>();
......
542 540
     * 
543 541
     * @return JPanel
544 542
     */
545
    private JPanel getJPanel1() {
546
        if (jPanel1 == null) {
547
            jPanel1 = new JPanel();
543
    private JPanel getDocumentsPanel() {
544
        if (documentsPanel == null) {
545
            documentsPanel = new JPanel();
548 546

  
549 547
            GridBagLayout layout2 = new GridBagLayout();
550 548
            GridBagConstraints c = new GridBagConstraints();
551 549

  
552
            jPanel1.setLayout(layout2);
550
            documentsPanel.setLayout(layout2);
551

  
553 552
            c.insets = new Insets(2, 5, 2, 5);
554 553
            c.anchor = GridBagConstraints.WEST;
555 554
            c.fill = GridBagConstraints.BOTH;
556 555
            c.weightx = 1.0;
557 556
            c.weighty = 1.0;
558
            layout2.setConstraints(getJScrollPane(), c);
559
            jPanel1.add(getJScrollPane());
557
            documentsPanel.add(getDocumentsScrollPane(), c);
560 558

  
561 559
            c.anchor = GridBagConstraints.EAST;
562

  
563 560
            c.fill = GridBagConstraints.NONE;
564 561
            c.weightx = 0;
565 562
            c.weighty = 0;
566
            layout2.setConstraints(getJPanel2(), c);
567
            jPanel1.add(getJPanel2());
563
            documentsPanel.add(getDocumentButtonsPanel(), c);
568 564

  
569
            // jPanel1.setPreferredSize(new java.awt.Dimension(430,170));
570
            jPanel1.setMinimumSize(new java.awt.Dimension(430, 170));
571
            jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(
572
                null, PluginServices.getText(this, "documentos_existentes"),
573
                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
574
                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
565
            documentsPanel.setBorder(javax.swing.BorderFactory
566
                .createTitledBorder(null,
567
                    PluginServices.getText(this, "documentos_existentes"),
568
                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
569
                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
570
                    null));
575 571
        }
576 572

  
577
        return jPanel1;
573
        return documentsPanel;
578 574
    }
579 575

  
580 576
    /**
......
582 578
     * 
583 579
     * @return JList
584 580
     */
585
    private JList getLstDocs() {
581
    private JList getDocumentsList() {
586 582
        if (lstDocs == null) {
587 583
            lstDocs = new JList();
588 584
            lstDocs.addMouseListener(new java.awt.event.MouseAdapter() {
......
603 599
                    if (lstDocs.getSelectedIndex() < 0) {
604 600
                        return null;
605 601
                    }
606
                    // Component c = lstDocs.getComponentAt(e.getPoint());
607 602

  
608 603
                    return null;
609 604
                }
......
656 651
     * 
657 652
     * @return JPanel
658 653
     */
659
    private JPanel getJPanel2() {
654
    private JPanel getDocumentButtonsPanel() {
660 655
        if (jPanel2 == null) {
661 656
            jPanel2 = new JPanel();
662 657

  
......
670 665
            jPanel2.add(getBtnRenombrar(), null);
671 666
            jPanel2.add(getBtnBorrar(), null);
672 667
            jPanel2.add(getBtnPropiedades(), null);
673
            jPanel2.setPreferredSize(new java.awt.Dimension(100, 150));
674
            jPanel2.setMinimumSize(new java.awt.Dimension(100, 150));
675
            jPanel2.setMaximumSize(new java.awt.Dimension(100, 150));
676 668
        }
677 669

  
678 670
        return jPanel2;
......
804 796
     * 
805 797
     * @return JPanel
806 798
     */
807
    private JPanel getJPanel3() {
808
        if (jPanel3 == null) {
809
            jPanel3 = new JPanel();
810

  
811
            GridBagLayout layout3 = new GridBagLayout();
799
    private JPanel getPropertiesPanel() {
800
        if (propertiesPanel == null) {
801
            propertiesPanel = new JPanel(new GridBagLayout());
812 802
            GridBagConstraints c = new GridBagConstraints();
813
            jPanel3.setLayout(layout3);
803

  
814 804
            c.insets = new Insets(2, 5, 0, 5);
815 805
            c.anchor = GridBagConstraints.WEST;
816 806
            c.gridx = 0;
817 807
            c.gridy = 0;
818
            layout3.setConstraints(getJLabel(), c);
819
            jPanel3.add(getJLabel(), null);
808
            propertiesPanel.add(getJLabel(), c);
809

  
820 810
            c.fill = GridBagConstraints.HORIZONTAL;
821 811
            c.weightx = 1.0;
822 812
            c.gridx = 1;
823
            layout3.setConstraints(getLblNombreSesion(), c);
824
            jPanel3.add(getLblNombreSesion(), null);
813
            propertiesPanel.add(getLblNombreSesion(), c);
825 814

  
826 815
            c.gridx = 0;
827 816
            c.gridy = 1;
828 817
            c.fill = GridBagConstraints.NONE;
829 818
            c.weightx = 0.0;
830
            layout3.setConstraints(getJLabel1(), c);
831
            jPanel3.add(getJLabel1(), null);
819
            propertiesPanel.add(getJLabel1(), c);
820

  
832 821
            c.fill = GridBagConstraints.HORIZONTAL;
833 822
            c.weightx = 1.0;
834 823
            c.gridx = 1;
835
            layout3.setConstraints(getLblGuardado(), c);
836
            jPanel3.add(getLblGuardado(), null);
824
            propertiesPanel.add(getLblGuardado(), c);
837 825

  
838 826
            c.gridx = 0;
839 827
            c.gridy = 2;
840 828
            c.fill = GridBagConstraints.NONE;
841 829
            c.weightx = 0.0;
842
            layout3.setConstraints(getJLabel2(), c);
843
            jPanel3.add(getJLabel2(), null);
830
            propertiesPanel.add(getJLabel2(), c);
844 831

  
845 832
            c.fill = GridBagConstraints.HORIZONTAL;
846 833
            c.weightx = 1.0;
847 834
            c.gridx = 1;
848
            layout3.setConstraints(getLblFecha(), c);
849
            jPanel3.add(getLblFecha(), null);
850
            jPanel3.setPreferredSize(new java.awt.Dimension(430, 125));
851
            jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(
852
                null, PluginServices.getText(this, "propiedades_sesion"),
853
                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
854
                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
855
            c.gridx = 1;
835
            propertiesPanel.add(getLblFecha(), c);
836

  
837
            c.gridx = 0;
838
            c.gridwidth = 2;
856 839
            c.gridy = 4;
840
            c.fill = GridBagConstraints.HORIZONTAL;
857 841
            c.anchor = GridBagConstraints.EAST;
858
            layout3.setConstraints(getJPanel4(), c);
859
            jPanel3.add(getJPanel4(), null);
842
            propertiesPanel.add(getProjectsButtonPanel(), c);
843

  
844
            propertiesPanel.setBorder(javax.swing.BorderFactory
845
                .createTitledBorder(null,
846
                    PluginServices.getText(this, "propiedades_sesion"),
847
                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
848
                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
849
                    null));
860 850
        }
861 851

  
862
        return jPanel3;
852
        return propertiesPanel;
863 853
    }
864 854

  
865 855
    /**
......
871 861
        if (jLabel == null) {
872 862
            jLabel = new JLabel();
873 863
            jLabel.setText(PluginServices.getText(this, "nombre_sesion") + ":");
874
            jLabel.setPreferredSize(new java.awt.Dimension(150, 16));
875 864
        }
876 865

  
877 866
        return jLabel;
......
887 876
            lblNombreSesion = new JLabel();
888 877
            lblNombreSesion.setText("");
889 878
            lblNombreSesion.setName("lblNombreSesion");
890
            lblNombreSesion.setPreferredSize(new java.awt.Dimension(200, 16));
891 879
            lblNombreSesion.setAutoscrolls(true);
892 880
        }
893 881

  
......
903 891
        if (jLabel1 == null) {
904 892
            jLabel1 = new JLabel();
905 893
            jLabel1.setText(PluginServices.getText(this, "guardado") + ":");
906
            jLabel1.setPreferredSize(new java.awt.Dimension(150, 16));
907 894
        }
908 895

  
909 896
        return jLabel1;
......
918 905
        if (lblGuardado == null) {
919 906
            lblGuardado = new JLabel();
920 907
            lblGuardado.setText("");
921
            lblGuardado.setPreferredSize(new java.awt.Dimension(200, 16));
922 908
            lblGuardado.setAutoscrolls(true);
923 909
        }
924 910

  
......
935 921
            jLabel2 = new JLabel();
936 922
            jLabel2
937 923
                .setText(PluginServices.getText(this, "creation_date") + ":");
938
            jLabel2.setPreferredSize(new java.awt.Dimension(150, 16));
939 924
        }
940 925

  
941 926
        return jLabel2;
......
950 935
        if (lblFecha == null) {
951 936
            lblFecha = new JLabel();
952 937
            lblFecha.setText("");
953
            lblFecha.setPreferredSize(new java.awt.Dimension(200, 16));
954 938
            lblFecha.setAutoscrolls(true);
955 939
        }
956 940

  
......
969 953
            btnImportar.setText(PluginServices.getText(this, "importar"));
970 954
            btnImportar.setName("btnImportar");
971 955
            btnImportar.setMargin(new java.awt.Insets(2, 2, 2, 2));
972
            // TODO implement import
973
            btnImportar.setVisible(false);
974 956
        }
975 957

  
976 958
        return btnImportar;
......
988 970
            btnExportar.setText(PluginServices.getText(this, "exportar"));
989 971
            btnExportar.setName("btnExportar");
990 972
            btnExportar.setMargin(new java.awt.Insets(2, 2, 2, 2));
991
            // TODO implement export
992
            btnExportar.setVisible(false);
993 973
        }
994 974

  
995 975
        return btnExportar;
......
1027 1007
     * 
1028 1008
     * @return JScrollPane
1029 1009
     */
1030
    private JScrollPane getJScrollPane() {
1031
        if (jScrollPane == null) {
1032
            jScrollPane = new JScrollPane();
1033
            jScrollPane.setViewportView(getLstDocs());
1034
            jScrollPane.setPreferredSize(new java.awt.Dimension(200, 100));
1035
            jScrollPane
1010
    private JScrollPane getDocumentsScrollPane() {
1011
        if (documentsScrollPane == null) {
1012
            documentsScrollPane = new JScrollPane();
1013
            documentsScrollPane.setViewportView(getDocumentsList());
1014
            documentsScrollPane.setPreferredSize(new java.awt.Dimension(200,
1015
                100));
1016
            documentsScrollPane
1036 1017
                .setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
1037 1018
        }
1038 1019

  
1039
        return jScrollPane;
1020
        return documentsScrollPane;
1040 1021
    }
1041 1022

  
1042 1023
    /**
......
1061 1042
     */
1062 1043
    public WindowInfo getWindowInfo() {
1063 1044
        if (m_viewInfo == null) {
1064
            m_viewInfo = new WindowInfo(WindowInfo.MAXIMIZABLE);
1065
            // m_viewInfo = new
1066
            // ViewInfo(ViewInfo.MAXIMIZABLE+ViewInfo.RESIZABLE);
1045
            m_viewInfo =
1046
                new WindowInfo(WindowInfo.MAXIMIZABLE | WindowInfo.RESIZABLE);
1067 1047
            m_viewInfo.setWidth(this.getWidth());
1068 1048
            m_viewInfo.setHeight(this.getHeight());
1069 1049
            m_viewInfo.setNormalWidth(this.getPreferredSize().width);
1070 1050
            m_viewInfo.setNormalHeight(this.getPreferredSize().height);
1051
            m_viewInfo.setMinimumSize(getPreferredSize());
1071 1052

  
1072 1053
            m_viewInfo.setTitle(PluginServices.getText(this, "titulo"));
1073 1054
        }
......
1083 1064
     * 
1084 1065
     * @return JPanel
1085 1066
     */
1086
    private JPanel getJPanel4() {
1087
        if (jPanel4 == null) {
1088
            jPanel4 = new JPanel();
1067
    private JPanel getProjectsButtonPanel() {
1068
        if (projectButtonsPanel == null) {
1069
            projectButtonsPanel = new JPanel();
1089 1070

  
1090
            jPanel4.setLayout(new FlowLayout(FlowLayout.RIGHT));
1091
            jPanel4.setPreferredSize(new java.awt.Dimension(414, 30));
1092
            jPanel4
1071
            projectButtonsPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
1072
            projectButtonsPanel
1093 1073
                .setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);
1094
            jPanel4.add(getBtnImportar(), null);
1095
            jPanel4.add(getBtnExportar(), null);
1096
            jPanel4.add(getBtnEditar(), null);
1074
            // TODO: implement export and import functions
1075
            // projectButtonsPanel.add(getBtnImportar(), null);
1076
            // projectButtonsPanel.add(getBtnExportar(), null);
1077
            projectButtonsPanel.add(getBtnEditar(), null);
1097 1078
        }
1098 1079

  
1099
        return jPanel4;
1080
        return projectButtonsPanel;
1100 1081
    }
1101 1082

  
1102
    /**
1103
     * This method initializes jScrollPane1
1104
     * 
1105
     * @return javax.swing.JScrollPane
1106
     */
1107
    private JScrollPane getJScrollPane1() {
1108
        if (jScrollPane1 == null) {
1109
            jScrollPane1 = new JScrollPane();
1110
            jScrollPane1
1111
                .setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
1112
            jScrollPane1.setPreferredSize(new java.awt.Dimension(433, 200));
1113
            jScrollPane1.setViewportView(getJPanel());
1114
        }
1115
        return jScrollPane1;
1116
    }
1117

  
1118 1083
    public Object getWindowProfile() {
1119 1084
        return WindowInfo.PROJECT_PROFILE;
1120 1085
    }
......
1131 1096
        this.btnsDocuments = null;
1132 1097

  
1133 1098
        // Clear previous document type buttons
1134
        jPanel.removeAll();
1099
        documentTypesList.removeAll();
1135 1100
        for (Enumeration<AbstractButton> buttons = grupo.getElements(); buttons
1136 1101
            .hasMoreElements();) {
1137 1102
            grupo.remove(buttons.nextElement());
1138 1103
        }
1139 1104

  
1140
        JRadioButton[] btnDocuments = getBtnDocuments();
1105
        JRadioButton[] btnDocuments = getBtnDocumentTypes();
1141 1106
        for (int i = 0; i < btnDocuments.length; i++) {
1142 1107
            grupo.add(btnDocuments[i]);
1143 1108
        }

Also available in: Unified diff