OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 140 Rev 181
Line 13... Line 13...
13
import org.openconcerto.erp.modules.ModuleElement;
13
import org.openconcerto.erp.modules.ModuleElement;
14
import org.openconcerto.modules.customerrelationship.lead.GroupSQLComponentWithService;
14
import org.openconcerto.modules.customerrelationship.lead.GroupSQLComponentWithService;
15
import org.openconcerto.sql.element.SQLComponent;
15
import org.openconcerto.sql.element.SQLComponent;
16
import org.openconcerto.ui.JDate;
16
import org.openconcerto.ui.JDate;
17
import org.openconcerto.ui.JLabelBold;
17
import org.openconcerto.ui.JLabelBold;
-
 
18
import org.openconcerto.ui.component.ITextArea;
18
 
19
 
19
public class CustomerCallSQLElement extends ModuleElement {
20
public class CustomerCallSQLElement extends ModuleElement {
20
 
21
 
21
    public CustomerCallSQLElement(AbstractModule module) {
22
    public CustomerCallSQLElement(AbstractModule module) {
22
        super(module, "CUSTOMER_CALL");
23
        super(module, "CUSTOMER_CALL");
Line 25... Line 26...
25
    @Override
26
    @Override
26
    protected List<String> getListFields() {
27
    protected List<String> getListFields() {
27
        final List<String> l = new ArrayList<String>();
28
        final List<String> l = new ArrayList<String>();
28
        l.add("DATE");
29
        l.add("DATE");
29
        l.add("ID_CLIENT");
30
        l.add("ID_CLIENT");
-
 
31
        l.add("INFORMATION");
-
 
32
        if (getTable().contains("ID_COMMERCIAL")) {
-
 
33
            l.add("ID_COMMERCIAL");
-
 
34
        }
-
 
35
        
30
        return l;
36
        return l;
31
    }
37
    }
32
 
38
 
33
    @Override
39
    @Override
34
    protected List<String> getComboFields() {
40
    protected List<String> getComboFields() {
Line 52... Line 58...
52
            }
58
            }
53
 
59
 
54
            @Override
60
            @Override
55
            public JComponent createEditor(String id) {
61
            public JComponent createEditor(String id) {
56
                if (id.equals("INFORMATION")) {
62
                if (id.equals("INFORMATION")) {
57
                    final JTextArea jTextArea = new JTextArea();
63
                    final ITextArea jTextArea = new ITextArea();
58
                    jTextArea.setFont(new JLabel().getFont());
64
                    jTextArea.setRows(20);                    
59
                    jTextArea.setMinimumSize(new Dimension(200, 150));
-
 
60
                    jTextArea.setPreferredSize(new Dimension(200, 150));
-
 
61
                    return new JScrollPane(jTextArea);
65
                    return new JScrollPane(jTextArea);
62
                } else if (id.equals("DATE")) {
66
                } else if (id.equals("DATE")) {
63
                    return new JDate(true);
67
                    return new JDate(true);
64
                }
68
                }
65
                return super.createEditor(id);
69
                return super.createEditor(id);