OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 18 Rev 25
Line 20... Line 20...
20
import org.openconcerto.erp.model.MouseSheetXmlListeListener;
20
import org.openconcerto.erp.model.MouseSheetXmlListeListener;
21
import org.openconcerto.sql.Configuration;
21
import org.openconcerto.sql.Configuration;
22
import org.openconcerto.sql.model.SQLRow;
22
import org.openconcerto.sql.model.SQLRow;
23
import org.openconcerto.sql.view.IListFrame;
23
import org.openconcerto.sql.view.IListFrame;
24
import org.openconcerto.sql.view.ListeAddPanel;
24
import org.openconcerto.sql.view.ListeAddPanel;
-
 
25
import org.openconcerto.sql.view.list.IListe;
-
 
26
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
-
 
27
import org.openconcerto.sql.view.list.RowAction;
-
 
28
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
25
import org.openconcerto.ui.DefaultGridBagConstraints;
29
import org.openconcerto.ui.DefaultGridBagConstraints;
26
 
30
 
27
import java.awt.GridBagConstraints;
31
import java.awt.GridBagConstraints;
28
import java.awt.event.ActionEvent;
32
import java.awt.event.ActionEvent;
29
import java.util.ArrayList;
33
import java.util.ArrayList;
Line 66... Line 70...
66
 
70
 
67
        for (int i = 0; i < table.getColumnCount(); i++) {
71
        for (int i = 0; i < table.getColumnCount(); i++) {
68
            table.getColumnModel().getColumn(i).setCellRenderer(rend);
72
            table.getColumnModel().getColumn(i).setCellRenderer(rend);
69
        }
73
        }
70
 
74
 
71
        table.addMouseListener(new MouseSheetXmlListeListener(edit1.getPanel().getListe(), BonLivraisonXmlSheet.class) {
75
        edit1.getPanel().getListe().addIListeActions(new MouseSheetXmlListeListener(BonLivraisonXmlSheet.class) {
72
            @Override
76
            @Override
73
            public List<AbstractAction> addToMenu() {
77
            public List<RowAction> addToMenu() {
74
                AbstractAction actionTransfertFacture = new AbstractAction("Transfert en facture") {
78
                PredicateRowAction actionTransfertFacture = new PredicateRowAction(new AbstractAction("Transfert en facture") {
75
                    public void actionPerformed(ActionEvent ev) {
79
                    public void actionPerformed(ActionEvent ev) {
76
                        transfertFactureClient(edit1.getPanel().getListe().getSelectedRow());
80
                        transfertFactureClient(IListe.get(ev).getSelectedRow());
77
                    }
81
                    }
78
                };
82
                }, false);
-
 
83
                actionTransfertFacture.setPredicate(IListeEvent.getSingleSelectionPredicate());
79
                List<AbstractAction> l = new ArrayList<AbstractAction>();
84
                List<RowAction> l = new ArrayList<RowAction>();
80
                l.add(actionTransfertFacture);
85
                l.add(actionTransfertFacture);
81
 
86
 
82
                return l;
87
                return l;
83
            }
88
            }
84
        });
89
        }.getRowActions());
85
 
90
 
86
        return edit1;
91
        return edit1;
87
    }
92
    }
88
 
93
 
89
    /**
94
    /**