OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 156
Line 15... Line 15...
15
 
15
 
16
import net.minidev.json.JSONObject;
16
import net.minidev.json.JSONObject;
17
 
17
 
18
public class LightUICheckBox extends LightUserControl {
18
public class LightUICheckBox extends LightUserControl {
19
 
19
 
-
 
20
    public LightUICheckBox() {
-
 
21
        // for serialization
-
 
22
    }
-
 
23
 
20
    public LightUICheckBox(final JSONObject json) {
24
    public LightUICheckBox(final JSONObject json) {
21
        super(json);
25
        super(json);
22
    }
26
    }
23
 
27
 
24
    public LightUICheckBox(final String id, final String label) {
28
    public LightUICheckBox(final String id, final String label) {
Line 47... Line 51...
47
        }
51
        }
48
        return this.getValue().equals("true");
52
        return this.getValue().equals("true");
49
    }
53
    }
50
 
54
 
51
    @Override
55
    @Override
52
    public JSONToLightUIConvertor getConvertor() {
-
 
53
        return new JSONToLightUIConvertor() {
-
 
54
            @Override
-
 
55
            public LightUIElement convert(final JSONObject json) {
-
 
56
                return new LightUICheckBox(json);
-
 
57
            }
-
 
58
        };
-
 
59
    }
-
 
60
 
-
 
61
    @Override
-
 
62
    public Object getValueForContext() {
56
    public Object getValueForContext() {
63
        return this.isChecked();
57
        return this.isChecked();
64
    }
58
    }
65
 
59
 
66
    @Override
60
    @Override