OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 61 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
61 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
 /*
15
 * Créé le 26 mars 2012
16
 */
17
package org.openconcerto.erp.core.humanresources.employe.element;
18
 
19
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
20
import org.openconcerto.sql.element.BaseSQLComponent;
21
import org.openconcerto.sql.element.SQLComponent;
22
 
23
import java.awt.GridBagConstraints;
24
import java.awt.GridBagLayout;
25
import java.util.ArrayList;
26
import java.util.List;
27
 
28
import javax.swing.JLabel;
29
import javax.swing.JTextField;
30
 
31
public class ObjectifSQLElement extends ComptaSQLConfElement {
32
 
33
    public ObjectifSQLElement() {
34
        super("OBJECTIF_COMMERCIAL", "un objectif commercial", "Objectifs commerciaux");
35
    }
36
 
37
    protected List<String> getListFields() {
38
        final List<String> l = new ArrayList<String>();
39
        l.add("ANNEE");
40
        return l;
41
    }
42
 
43
    protected List<String> getComboFields() {
44
        final List<String> l = new ArrayList<String>();
45
        l.add("ANNEE");
46
        return l;
47
    }
48
 
49
    /*
50
     * (non-Javadoc)
51
     *
52
     * @see org.openconcerto.devis.SQLElement#getComponent()
53
     */
54
    public SQLComponent createComponent() {
55
        return new BaseSQLComponent(this) {
56
            public void addViews() {
57
 
58
                this.setLayout(new GridBagLayout());
59
                GridBagConstraints c = new GridBagConstraints();
60
                c.gridx = GridBagConstraints.RELATIVE;
61
 
62
                JTextField textNom = new JTextField();
63
                JLabel labelNom = new JLabel(getLabelFor("ANNEE"));
64
 
65
                this.add(labelNom, c);
66
                this.add(textNom, c);
67
 
68
                this.addSQLObject(textNom, "ANNEE");
69
            }
70
        };
71
    }
156 ilm 72
 
73
    @Override
74
    protected String createCodeSuffix() {
75
        return ".commercial.goal";
76
    }
77
 
61 ilm 78
}