OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Compare Revisions

Ignore whitespace Rev 146 → Rev 147

/trunk/Modules/Module Batch Processing/src/org/openconcerto/modules/common/batchprocessing/BatchEditorPanel.java
22,6 → 22,7
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
 
import org.openconcerto.sql.Configuration;
import org.openconcerto.sql.PropsConfiguration;
32,7 → 33,6
import org.openconcerto.ui.JLabelBold;
import org.openconcerto.ui.ReloadPanel;
import org.openconcerto.utils.ExceptionHandler;
import org.openconcerto.utils.SwingWorker2;
 
public class BatchEditorPanel extends JPanel {
 
43,7 → 43,7
List<SQLField> f = new ArrayList<SQLField>();
for (SQLField sqlField : fields) {
if (ForbiddenFieldName.isAllowed(sqlField.getName()) && translator.getLabelFor(sqlField) != null) {
if (filter == null || (filter != null && !filter.isFiltered(sqlField))) {
if (filter == null || !filter.isFiltered(sqlField)) {
f.add(sqlField);
}
}
60,12 → 60,12
GridBagConstraints c = new DefaultGridBagConstraints();
this.add(new JLabel("Champ"), c);
 
final JComboBox combo = new JComboBox(f.toArray());
final JComboBox<SQLField> combo = new JComboBox<SQLField>(f.toArray(new SQLField[1]));
combo.setRenderer(new DefaultListCellRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
value = translator.getLabelFor(((SQLField) value));
return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
String label = translator.getLabelFor(((SQLField) value));
return super.getListCellRendererComponent(list, label, index, isSelected, cellHasFocus);
}
});
 
127,7 → 127,7
 
combo.setEnabled(false);
reload.setMode(ReloadPanel.MODE_ROTATE);
SwingWorker2<Object, Object> w = new SwingWorker2<Object, Object>() {
SwingWorker<Object, Object> w = new SwingWorker<Object, Object>() {
 
@Override
protected Object doInBackground() throws Exception {