OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 18 | Rev 57 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18 ilm 1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
5
 *
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
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.
10
 *
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
13
 
14
 package org.openconcerto.erp.core.sales.order.element;
15
 
16
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
17
import org.openconcerto.erp.core.common.ui.DeviseField;
18
import org.openconcerto.sql.element.SQLComponent;
19
import org.openconcerto.sql.element.UISQLComponent;
20
import org.openconcerto.sql.sqlobject.ElementComboBox;
21
 
22
import java.util.ArrayList;
23
import java.util.List;
24
 
19 ilm 25
import javax.swing.JTextField;
18 ilm 26
 
19 ilm 27
 
18 ilm 28
public class CommandeClientElementSQLElement extends ComptaSQLConfElement {
29
 
30
    public CommandeClientElementSQLElement() {
31
        super("COMMANDE_CLIENT_ELEMENT", "un element de commande", "éléments de commande");
32
    }
33
 
34
    protected List<String> getListFields() {
35
        final List<String> l = new ArrayList<String>();
36
        l.add("ID_STYLE");
37
        l.add("CODE");
38
        l.add("NOM");
39
        l.add("PA_HT");
40
        l.add("PV_HT");
41
        l.add("ID_TAXE");
42
        l.add("POIDS");
43
        return l;
44
    }
45
 
46
    protected List<String> getComboFields() {
47
        final List<String> l = new ArrayList<String>();
48
        l.add("CODE");
49
        l.add("NOM");
50
        l.add("PA_HT");
51
        l.add("PV_HT");
52
        return l;
53
    }
54
 
55
    /*
56
     * (non-Javadoc)
57
     *
58
     * @see org.openconcerto.devis.SQLElement#getComponent()
59
     */
60
    public SQLComponent createComponent() {
61
        return new UISQLComponent(this) {
62
            public void addViews() {
63
                this.addRequiredSQLObject(new JTextField(), "NOM", "left");
64
                this.addRequiredSQLObject(new JTextField(), "CODE", "right");
65
 
66
                this.addSQLObject(new ElementComboBox(), "ID_STYLE", "left");
67
 
68
                this.addRequiredSQLObject(new DeviseField(), "PA_HT", "left");
69
                this.addSQLObject(new DeviseField(), "PV_HT", "right");
70
 
71
                this.addSQLObject(new JTextField(), "POIDS", "left");
72
                this.addSQLObject(new ElementComboBox(), "ID_TAXE", "right");
73
            }
74
        };
75
    }
76
}