OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 86 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 86 Rev 181
Line 36... Line 36...
36
        c.gridy++;
36
        c.gridy++;
37
        c.weightx = 1;
37
        c.weightx = 1;
38
        c.weighty = 1;
38
        c.weighty = 1;
39
        c.gridwidth = 2;
39
        c.gridwidth = 2;
40
        c.fill = GridBagConstraints.BOTH;
40
        c.fill = GridBagConstraints.BOTH;
41
        panel = new FieldDescSelector(n, extension);
41
        this.panel = new FieldDescSelector(n, extension);
42
        final String mainTable = n.getMainTable();
42
        final String mainTable = n.getMainTable();
43
        if (mainTable == null && comboTable.getModel().getSize() > 0) {
43
        if (mainTable == null && comboTable.getModel().getSize() > 0) {
44
            comboTable.setSelectedIndex(0);
44
            comboTable.setSelectedIndex(0);
45
            panel.setMainTable((String) comboTable.getModel().getElementAt(0));
45
            this.panel.setMainTable((String) comboTable.getModel().getElementAt(0));
46
        } else {
46
        } else {
47
            comboTable.setSelectedItem(mainTable);
47
            comboTable.setSelectedItem(mainTable);
48
            panel.setMainTable(mainTable);
48
            this.panel.setMainTable(mainTable);
49
        }
49
        }
50
        this.add(panel, c);
50
        this.add(this.panel, c);
51
 
51
 
52
        comboTable.addActionListener(new ActionListener() {
52
        comboTable.addActionListener(new ActionListener() {
53
 
53
 
54
            @Override
54
            @Override
55
            public void actionPerformed(ActionEvent e) {
55
            public void actionPerformed(ActionEvent e) {
56
                n.removeAllColumns();
56
                n.removeAllColumns();
57
                panel.setMainTable((String) comboTable.getSelectedItem());
57
                ListCreatePanel.this.panel.setMainTable((String) comboTable.getSelectedItem());
58
                extension.setChanged();
58
                extension.setChanged();
59
            }
59
            }
60
        });
60
        });
61
 
61
 
62
    }
62
    }