OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 166 Rev 181
Line 1... Line 1...
1
package org.openconcerto.modules.common.batchprocessing;
1
package org.openconcerto.modules.common.batchprocessing;
2
 
2
 
3
import java.awt.Dimension;
3
import java.awt.Dimension;
4
import java.awt.event.ActionEvent;
4
import java.awt.event.ActionEvent;
5
import java.io.File;
-
 
6
import java.io.IOException;
5
import java.io.IOException;
7
import java.util.List;
6
import java.util.List;
8
 
7
 
9
import javax.swing.AbstractAction;
8
import javax.swing.AbstractAction;
10
import javax.swing.JFrame;
9
import javax.swing.JFrame;
11
 
10
 
12
import org.openconcerto.erp.config.Gestion;
-
 
13
import org.openconcerto.erp.modules.AbstractModule;
11
import org.openconcerto.erp.modules.AbstractModule;
14
import org.openconcerto.erp.modules.ComponentsContext;
12
import org.openconcerto.erp.modules.ComponentsContext;
15
import org.openconcerto.erp.modules.ModuleFactory;
13
import org.openconcerto.erp.modules.ModuleFactory;
16
import org.openconcerto.erp.modules.ModuleManager;
-
 
17
import org.openconcerto.erp.modules.ModulePackager;
-
 
18
import org.openconcerto.erp.modules.RuntimeModuleFactory;
-
 
19
import org.openconcerto.sql.element.SQLElement;
14
import org.openconcerto.sql.element.SQLElement;
20
import org.openconcerto.sql.model.SQLField;
15
import org.openconcerto.sql.model.SQLField;
21
import org.openconcerto.sql.model.SQLRequestLog;
-
 
22
import org.openconcerto.sql.model.SQLRowValues;
16
import org.openconcerto.sql.model.SQLRowValues;
23
import org.openconcerto.sql.ui.ConnexionPanel;
-
 
24
import org.openconcerto.sql.view.list.IListe;
17
import org.openconcerto.sql.view.list.IListe;
25
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
18
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
26
import org.openconcerto.sql.view.list.RowAction;
19
import org.openconcerto.sql.view.list.RowAction;
27
import org.openconcerto.ui.FrameUtil;
20
import org.openconcerto.ui.FrameUtil;
28
 
21
 
Line 31... Line 24...
31
    public Module(ModuleFactory f) throws IOException {
24
    public Module(ModuleFactory f) throws IOException {
32
        super(f);
25
        super(f);
33
    }
26
    }
34
 
27
 
35
    @Override
28
    @Override
36
    protected void setupComponents(ComponentsContext ctxt) {
29
    protected void setupComponents(final ComponentsContext ctxt) {
37
 
30
 
38
        super.setupComponents(ctxt);
31
        super.setupComponents(ctxt);
39
        final SQLElement element = ctxt.getElement("ARTICLE");
32
        final SQLElement element = ctxt.getElement("ARTICLE");
40
        final RowAction.PredicateRowAction editAction = new RowAction.PredicateRowAction(new AbstractAction("Traitement par lot...") {
33
        final RowAction.PredicateRowAction editAction = new RowAction.PredicateRowAction(new AbstractAction("Traitement par lot...") {
41
 
34
 
Line 58... Line 51...
58
                            return fieldName.contains("METRIQUE") || fieldName.equals("ID_STOCK");
51
                            return fieldName.contains("METRIQUE") || fieldName.equals("ID_STOCK");
59
                        }
52
                        }
60
 
53
 
61
                    };
54
                    };
62
 
55
 
63
                    f.setContentPane(new BatchEditorPanel(rows, filter));
56
                    f.setContentPane(new BatchEditorPanel(ctxt.getElement("ARTICLE").getDirectory(), rows, filter));
64
                    f.pack();
57
                    f.pack();
65
                    f.setMinimumSize(new Dimension(400, 300));
58
                    f.setMinimumSize(new Dimension(400, 300));
66
                    f.setLocationRelativeTo(IListe.get(e));
59
                    f.setLocationRelativeTo(IListe.get(e));
67
                    FrameUtil.show(f);
60
                    FrameUtil.show(f);
68
                }
61
                }