144 |
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 sept. 2012
|
|
|
16 |
*/
|
|
|
17 |
package org.openconcerto.erp.core.supplychain.order.element;
|
|
|
18 |
|
|
|
19 |
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
|
|
|
20 |
import org.openconcerto.sql.element.SQLComponent;
|
|
|
21 |
import org.openconcerto.sql.element.UISQLComponent;
|
174 |
ilm |
22 |
import org.openconcerto.sql.ui.IColorChooser;
|
144 |
ilm |
23 |
import org.openconcerto.utils.ListMap;
|
|
|
24 |
|
|
|
25 |
import java.util.ArrayList;
|
|
|
26 |
import java.util.List;
|
|
|
27 |
|
|
|
28 |
import javax.swing.JTextField;
|
|
|
29 |
|
|
|
30 |
public class EtatDemandeAchatItemSQLElement extends ComptaSQLConfElement {
|
|
|
31 |
|
|
|
32 |
public static final int EN_ATTENTE = 2;
|
|
|
33 |
public static final int DEMANDE = 3;
|
|
|
34 |
public static final int COMMANDE = 4;
|
|
|
35 |
public static final int RECPETION = 5;
|
|
|
36 |
public static final int RECPETION_PARTIEL = 6;
|
|
|
37 |
public static final int A_RELANCER = 7;
|
|
|
38 |
|
|
|
39 |
public EtatDemandeAchatItemSQLElement() {
|
|
|
40 |
super("ETAT_DEMANDE_ACHAT_ELEMENT", "un état de demande d'achat", "états de demande d'achat");
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
protected List<String> getListFields() {
|
|
|
44 |
final List<String> l = new ArrayList<String>();
|
|
|
45 |
l.add("NOM");
|
|
|
46 |
return l;
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
protected List<String> getComboFields() {
|
|
|
50 |
final List<String> l = new ArrayList<String>();
|
|
|
51 |
l.add("NOM");
|
|
|
52 |
return l;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
@Override
|
|
|
56 |
public ListMap<String, String> getShowAs() {
|
|
|
57 |
final ListMap<String, String> res = new ListMap<String, String>();
|
|
|
58 |
res.add(null, "NOM");
|
|
|
59 |
return res;
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
/*
|
|
|
63 |
* (non-Javadoc)
|
|
|
64 |
*
|
|
|
65 |
* @see org.openconcerto.devis.SQLElement#getComponent()
|
|
|
66 |
*/
|
|
|
67 |
public SQLComponent createComponent() {
|
|
|
68 |
return new UISQLComponent(this) {
|
|
|
69 |
public void addViews() {
|
|
|
70 |
this.addRequiredSQLObject(new JTextField(), "NOM", "left");
|
174 |
ilm |
71 |
this.addRequiredSQLObject(new IColorChooser("Couleur"), "COLOR", "right");
|
144 |
ilm |
72 |
}
|
|
|
73 |
};
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
@Override
|
|
|
77 |
protected String createCode() {
|
156 |
ilm |
78 |
return createCodeOfPackage() + ".achat.state";
|
144 |
ilm |
79 |
}
|
|
|
80 |
|
|
|
81 |
}
|