OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Go to most recent revision | Details | 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.humanresources.timesheet.element;
15
 
16
import org.openconcerto.sql.element.ConfSQLElement;
17
import org.openconcerto.sql.element.SQLComponent;
18
import org.openconcerto.sql.element.UISQLComponent;
19
import org.openconcerto.sql.sqlobject.ElementComboBox;
20
import org.openconcerto.ui.JDate;
21
 
22
import java.util.ArrayList;
23
import java.util.List;
24
 
25
import javax.swing.JTextField;
26
 
27
public class PointageSQLElement extends ConfSQLElement {
28
 
29
    public PointageSQLElement() {
30
        super("POINTAGE", "un pointage", "pointages");
31
    }
32
 
33
    @Override
34
    protected List<String> getListFields() {
35
        final List<String> l = new ArrayList<String>();
36
        l.add("ACTION");
37
        l.add("CARTE");
38
        l.add("ID_USER_COMMON");
39
        l.add("DATE");
40
        return l;
41
    }
42
 
43
    @Override
44
    protected List<String> getComboFields() {
45
        final List<String> l = new ArrayList<String>();
46
        l.add("ID_USER_COMMON");
47
        return l;
48
    }
49
 
50
    /*
51
     * (non-Javadoc)
52
     *
53
     * @see org.openconcerto.devis.SQLElement#getComponent()
54
     */
55
    @Override
56
    public SQLComponent createComponent() {
57
        return new UISQLComponent(this) {
58
            public void addViews() {
59
                this.addSQLObject(new JTextField(), "ACTION", "right");
60
                this.addSQLObject(new JTextField(), "CARTE", "left");
61
                this.addSQLObject(new JDate(), "DATE", "right");
62
                this.addSQLObject(new ElementComboBox(), "ID_USER_COMMON", "left");
63
            }
64
        };
65
    }
66
}