OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 118 Rev 153
Line 14... Line 14...
14
import javax.swing.JTextField;
14
import javax.swing.JTextField;
15
import javax.swing.SwingConstants;
15
import javax.swing.SwingConstants;
16
 
16
 
17
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
17
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
18
import org.openconcerto.sql.element.BaseSQLComponent;
18
import org.openconcerto.sql.element.BaseSQLComponent;
19
import org.openconcerto.sql.element.ElementSQLObject;
-
 
20
import org.openconcerto.sql.element.SQLComponent;
19
import org.openconcerto.sql.element.SQLComponent;
21
import org.openconcerto.sql.model.SQLRowValues;
20
import org.openconcerto.sql.model.SQLRowValues;
22
import org.openconcerto.sql.sqlobject.ElementComboBox;
21
import org.openconcerto.sql.sqlobject.ElementComboBox;
23
import org.openconcerto.ui.DefaultGridBagConstraints;
22
import org.openconcerto.ui.DefaultGridBagConstraints;
24
import org.openconcerto.ui.JDate;
23
import org.openconcerto.ui.JDate;
Line 30... Line 29...
30
    public AdherentSQLElement() {
29
    public AdherentSQLElement() {
31
        super("ADHERENT", "un adhérent", "adhérents");
30
        super("ADHERENT", "un adhérent", "adhérents");
32
    }
31
    }
33
 
32
 
34
    @Override
33
    @Override
-
 
34
    public boolean isPrivate() {
-
 
35
        return true;
-
 
36
    }
-
 
37
 
-
 
38
    @Override
35
    protected List<String> getListFields() {
39
    protected List<String> getListFields() {
36
        final List<String> l = new ArrayList<String>();
40
        final List<String> l = new ArrayList<String>();
37
        l.add("NOM");
-
 
38
        l.add("PRENOM");
-
 
39
        l.add("TEL");
-
 
40
        l.add("MAIL");
-
 
41
        l.add("ID_PLAGE_HORAIRE");
41
        l.add("ID_PLAGE_HORAIRE");
42
        l.add("DATE_VALIDITE_INSCRIPTION");
42
        l.add("DATE_VALIDITE_INSCRIPTION");
43
        l.add("NUMERO_CARTE");
43
        l.add("NUMERO_CARTE");
44
        l.add("ACTIF");
44
        l.add("ACTIF");
45
        return l;
45
        return l;
46
    }
46
    }
47
 
47
 
48
    @Override
48
    @Override
49
    protected List<String> getComboFields() {
49
    protected List<String> getComboFields() {
50
        final List<String> l = new ArrayList<String>();
50
        final List<String> l = new ArrayList<String>();
51
        l.add("NOM");
-
 
52
        l.add("PRENOM");
51
        l.add("NUMERO_CARTE");
53
        return l;
-
 
54
    }
-
 
55
 
-
 
56
    @Override
-
 
57
    protected List<String> getPrivateFields() {
-
 
58
        final List<String> l = new ArrayList<String>();
-
 
59
        l.add("ID_ADRESSE");
-
 
60
        return l;
52
        return l;
61
    }
53
    }
62
 
54
 
63
    @Override
55
    @Override
64
    public ListMap<String, String> getShowAs() {
56
    public ListMap<String, String> getShowAs() {
Line 87... Line 79...
87
                GridBagConstraints c = new DefaultGridBagConstraints();
79
                GridBagConstraints c = new DefaultGridBagConstraints();
88
                this.setLayout(new GridBagLayout());
80
                this.setLayout(new GridBagLayout());
89
 
81
 
90
                c.weightx = 1;
82
                c.weightx = 1;
91
                c.gridwidth = GridBagConstraints.REMAINDER;
83
                c.gridwidth = GridBagConstraints.REMAINDER;
92
                this.add(new TitledSeparator("Informations personnelles", true), c);
-
 
93
 
-
 
94
                c.gridy++;
-
 
95
                c.weightx = 0;
-
 
96
                c.gridwidth = 1;
-
 
97
                JTextField nom = new JTextField();
-
 
98
                this.add(getJLabelFor("NOM"), c);
-
 
99
                c.gridx++;
-
 
100
                c.weightx = 1;
-
 
101
                this.add(nom, c);
-
 
102
                this.addView(nom, "NOM", REQ);
-
 
103
 
-
 
104
                c.gridx++;
-
 
105
                c.weightx = 0;
-
 
106
                JTextField prenom = new JTextField();
-
 
107
                this.add(getJLabelFor("PRENOM"), c);
-
 
108
                c.gridx++;
-
 
109
                c.weightx = 1;
-
 
110
                this.add(prenom, c);
-
 
111
                this.addView(prenom, "PRENOM", REQ);
-
 
112
 
-
 
113
                c.gridy++;
-
 
114
                c.gridx = 0;
-
 
115
                c.weightx = 0;
-
 
116
                JDate dateNaissance = new JDate();
-
 
117
                this.add(getJLabelFor("DATE_NAISSANCE"), c);
-
 
118
                c.gridx++;
-
 
119
                this.add(dateNaissance, c);
-
 
120
                this.addView(dateNaissance, "DATE_NAISSANCE");
-
 
121
 
-
 
122
                c.gridy++;
-
 
123
                c.gridx = 0;
-
 
124
                JTextField tel = new JTextField();
-
 
125
                c.weightx = 0;
-
 
126
                this.add(getJLabelFor("TEL"), c);
-
 
127
                c.gridx++;
-
 
128
                c.weightx = 1;
-
 
129
                this.add(tel, c);
-
 
130
                this.addView(tel, "TEL");
-
 
131
 
-
 
132
                c.gridx++;
-
 
133
                c.weightx = 0;
-
 
134
                JTextField mail = new JTextField();
-
 
135
                this.add(getJLabelFor("MAIL"), c);
-
 
136
                c.gridx++;
-
 
137
                c.weightx = 1;
-
 
138
                this.add(mail, c);
-
 
139
                this.addView(mail, "MAIL");
-
 
140
 
-
 
141
                c.gridy++;
-
 
142
                c.gridx = 0;
-
 
143
                c.gridwidth = GridBagConstraints.REMAINDER;
-
 
144
                c.weightx = 1;
-
 
145
                this.addView("ID_ADRESSE", REQ + ";" + DEC + ";" + SEP);
-
 
146
                final ElementSQLObject view = (ElementSQLObject) this.getView("ID_ADRESSE");
-
 
147
 
-
 
148
                this.add(view, c);
-
 
149
 
-
 
150
                c.gridy++;
-
 
151
                c.gridx = 0;
-
 
152
                c.weightx = 1;
-
 
153
                c.insets = new Insets(15, 3, 2, 2);
84
                c.insets = new Insets(15, 3, 2, 2);
154
                this.add(new TitledSeparator("Gestion des entrées", true), c);
85
                this.add(new TitledSeparator("Gestion des entrées", true), c);
155
 
86
 
156
                JDate dateInscr = new JDate();
87
                JDate dateInscr = new JDate();
157
                c.gridwidth = 1;
88
                c.gridwidth = 1;