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