OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 151 Rev 182
Line 1... Line 1...
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
9
 * language governing permissions and limitations under the License.
9
 * language governing permissions and limitations under the License.
Line 33... Line 33...
33
import javax.swing.Action;
33
import javax.swing.Action;
34
import javax.swing.JFrame;
34
import javax.swing.JFrame;
35
 
35
 
36
public class ListeDesElementsDevisAction extends CreateFrameAbstractAction {
36
public class ListeDesElementsDevisAction extends CreateFrameAbstractAction {
37
 
37
 
-
 
38
    private final String title;
-
 
39
 
38
    public ListeDesElementsDevisAction() {
40
    public ListeDesElementsDevisAction(ComptaPropsConfiguration conf) {
39
        super();
41
        super();
-
 
42
            this.title = "Liste des articles proposés";
40
        this.putValue(Action.NAME, "Liste des missions proposées");
43
        this.putValue(Action.NAME, this.title);
41
    }
44
    }
42
 
45
 
43
    public JFrame createFrame() {
46
    public JFrame createFrame() {
44
        final SQLElement element = Configuration.getInstance().getDirectory().getElement("DEVIS_ELEMENT");
47
        final SQLElement element = Configuration.getInstance().getDirectory().getElement("DEVIS_ELEMENT");
45
 
48
 
Line 51... Line 54...
51
        c.weightx = 0;
54
        c.weightx = 0;
52
        c.weighty = 0;
55
        c.weighty = 0;
53
        c.anchor = GridBagConstraints.EAST;
56
        c.anchor = GridBagConstraints.EAST;
54
        c.fill = GridBagConstraints.NONE;
57
        c.fill = GridBagConstraints.NONE;
55
 
58
 
-
 
59
        listeAddPanel.getListe().getRequest().setWhere(new Where(element.getTable().getField("ID_DEVIS"), ">", 1));
-
 
60
        List<SQLField> l = new ArrayList<SQLField>();
-
 
61
        l.add(element.getTable().getField("T_PV_HT"));
-
 
62
        l.add(element.getTable().getField("T_PV_TTC"));
-
 
63
        IListTotalPanel total = new IListTotalPanel(listeAddPanel.getListe(), l);
-
 
64
        listeAddPanel.add(total, c);
-
 
65
 
56
        IListFrame frame = new IListFrame(listeAddPanel);
66
        IListFrame frame = new IListFrame(listeAddPanel);
57
        frame.setTextTitle("Liste des missions proposées");
67
        frame.setTextTitle(this.title);
58
        frame.getPanel().getListe().setModificationAllowed(false);
68
        frame.getPanel().getListe().setModificationAllowed(false);
59
        frame.getPanel().setAddVisible(false);
69
        frame.getPanel().setAddVisible(false);
60
        frame.getPanel().setShowReadOnlyFrameOnDoubleClick(false);
70
        frame.getPanel().setShowReadOnlyFrameOnDoubleClick(false);
61
        frame.getPanel().setModifyVisible(false);
71
        frame.getPanel().setModifyVisible(false);
62
        frame.getPanel().setSearchFullMode(true);
72
        frame.getPanel().setSearchFullMode(true);