OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 149 | Rev 177 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 149 Rev 156
Line 97... Line 97...
97
        this.add(this.buttonAjouter, c);
97
        this.add(this.buttonAjouter, c);
98
 
98
 
99
        this.buttonInserer = new JButton(TM.tr("insertNewLine"));
99
        this.buttonInserer = new JButton(TM.tr("insertNewLine"));
100
        this.buttonInserer.addActionListener(new ActionListener() {
100
        this.buttonInserer.addActionListener(new ActionListener() {
101
            public void actionPerformed(ActionEvent event) {
101
            public void actionPerformed(ActionEvent event) {
-
 
102
                int index = table.getSelectedRow();
-
 
103
                if (index < 0 || index > table.getRowCount()) {
-
 
104
                    index = table.getRowCount();
-
 
105
                }
102
                RowValuesTableControlPanel.this.model.addNewRowAt(table.getSelectedRow());
106
                RowValuesTableControlPanel.this.model.addNewRowAt(index);
103
            }
107
            }
104
        });
108
        });
105
        this.buttonInserer.setEnabled(false);
109
        this.buttonInserer.setEnabled(false);
106
        c.gridx++;
110
        c.gridx++;
107
        JComponentUtils.setMinimumWidth(this.buttonInserer, 85);
111
        JComponentUtils.setMinimumWidth(this.buttonInserer, 85);