OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 153 Rev 171
Line 18... Line 18...
18
import org.openconcerto.erp.modules.ModulePreferencePanelDesc;
18
import org.openconcerto.erp.modules.ModulePreferencePanelDesc;
19
import org.openconcerto.sql.element.SQLComponent;
19
import org.openconcerto.sql.element.SQLComponent;
20
import org.openconcerto.sql.element.SQLElement.ReferenceAction;
20
import org.openconcerto.sql.element.SQLElement.ReferenceAction;
21
import org.openconcerto.sql.element.SQLElementDirectory;
21
import org.openconcerto.sql.element.SQLElementDirectory;
22
import org.openconcerto.sql.element.UISQLComponent;
22
import org.openconcerto.sql.element.UISQLComponent;
-
 
23
import org.openconcerto.sql.model.DBRoot;
23
import org.openconcerto.sql.model.SQLTable;
24
import org.openconcerto.sql.model.SQLTable;
24
import org.openconcerto.sql.utils.SQLCreateTable;
25
import org.openconcerto.sql.utils.SQLCreateTable;
25
import org.openconcerto.utils.ListMap;
26
import org.openconcerto.utils.ListMap;
26
import org.openconcerto.utils.PrefType;
27
import org.openconcerto.utils.PrefType;
27
 
28
 
Line 108... Line 109...
108
    @Override
109
    @Override
109
    protected void start() {
110
    protected void start() {
110
    }
111
    }
111
 
112
 
112
    @Override
113
    @Override
113
    public List<ModulePreferencePanelDesc> getPrefDescriptors() {
114
    public List<ModulePreferencePanelDesc> getPrefDescriptors(final DBRoot root) {
114
        return Arrays.<ModulePreferencePanelDesc> asList(new ModulePreferencePanelDesc("Préf") {
115
        return Arrays.<ModulePreferencePanelDesc> asList(new ModulePreferencePanelDesc("Préf") {
115
            @Override
116
            @Override
116
            protected ModulePreferencePanel createPanel() {
117
            protected ModulePreferencePanel createPanel() {
117
                return new ModulePreferencePanel("Mon super titre") {
118
                return new ModulePreferencePanel(root, "Mon super titre") {
118
                    @Override
119
                    @Override
119
                    protected void addViews() {
120
                    protected void addViews() {
120
                        this.addView(new SQLPrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Un booléen", "boolPref").setDefaultValue(Boolean.TRUE));
121
                        this.addView(new SQLPrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Un booléen", "boolPref").setDefaultValue(Boolean.TRUE));
121
                        this.addView(new SQLPrefView<String>(PrefType.STRING_TYPE, 12, "Du texte", "textPref").setDefaultValue("court"));
122
                        this.addView(new SQLPrefView<String>(PrefType.STRING_TYPE, 12, "Du texte", "textPref").setDefaultValue("court"));
122
                        this.addView(new SQLPrefView<Double>(PrefType.DOUBLE_TYPE, "Un double", "doublePref"));
123
                        this.addView(new SQLPrefView<Double>(PrefType.DOUBLE_TYPE, "Un double", "doublePref"));
Line 124... Line 125...
124
                };
125
                };
125
            }
126
            }
126
        }, new ModulePreferencePanelDesc("Préf2") {
127
        }, new ModulePreferencePanelDesc("Préf2") {
127
            @Override
128
            @Override
128
            protected ModulePreferencePanel createPanel() {
129
            protected ModulePreferencePanel createPanel() {
129
                return new ModulePreferencePanel("Mon super titre") {
130
                return new ModulePreferencePanel(root, "Mon super titre") {
130
                    @Override
131
                    @Override
131
                    protected void addViews() {
132
                    protected void addViews() {
132
                        this.addView(new SQLPrefView<String>(PrefType.STRING_TYPE, 512, "Du texte", "textPref").setDefaultValue("long texte"));
133
                        this.addView(new SQLPrefView<String>(PrefType.STRING_TYPE, 512, "Du texte", "textPref").setDefaultValue("long texte"));
133
                        this.addView(new SQLPrefView<Long>(PrefType.LONG_TYPE, "Un long", "longPref"));
134
                        this.addView(new SQLPrefView<Long>(PrefType.LONG_TYPE, "Un long", "longPref"));
134
                    }
135
                    }