OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 80 Rev 83
Line 32... Line 32...
32
    public static final int TYPE_LIST = 4;
32
    public static final int TYPE_LIST = 4;
33
    public static final int TYPE_CHECKBOX = 5;
33
    public static final int TYPE_CHECKBOX = 5;
34
    public static final int TYPE_TABBED_UI = 6;
34
    public static final int TYPE_TABBED_UI = 6;
35
    public static final int TYPE_COMBOBOX_ELEMENT = 7;
35
    public static final int TYPE_COMBOBOX_ELEMENT = 7;
36
    public static final int TYPE_DESCRIPTOR = 8;
36
    public static final int TYPE_DESCRIPTOR = 8;
-
 
37
    public static final int TYPE_TREE = 9;
37
    public static final int TYPE_BUTTON = 20;
38
    public static final int TYPE_BUTTON = 20;
38
    public static final int TYPE_BUTTON_WITH_CONTEXT = 21;
39
    public static final int TYPE_BUTTON_WITH_CONTEXT = 21;
39
    public static final int TYPE_BUTTON_CANCEL = 22;
40
    public static final int TYPE_BUTTON_CANCEL = 22;
40
    public static final int TYPE_BUTTON_UNMANAGED = 23;
41
    public static final int TYPE_BUTTON_UNMANAGED = 23;
41
    public static final int TYPE_BUTTON_WITH_SELECTION_CONTEXT = 24;
42
    public static final int TYPE_BUTTON_WITH_SELECTION_CONTEXT = 24;
Line 73... Line 74...
73
    // Icon
74
    // Icon
74
    private String icon;
75
    private String icon;
75
    private boolean required;
76
    private boolean required;
76
 
77
 
77
    private String toolTip;
78
    private String toolTip;
-
 
79
    private boolean verticalyResizable;
-
 
80
    private boolean horizontalyResizable;
78
 
81
 
79
    public int getType() {
82
    public int getType() {
80
        return type;
83
        return type;
81
    }
84
    }
82
 
85
 
Line 213... Line 216...
213
            this.tabs = new ArrayList<LightUIDescriptor>(5);
216
            this.tabs = new ArrayList<LightUIDescriptor>(5);
214
        }
217
        }
215
        this.tabs.add(desc);
218
        this.tabs.add(desc);
216
    }
219
    }
217
 
220
 
-
 
221
    public final boolean isVerticalyResizable() {
-
 
222
        return verticalyResizable;
-
 
223
    }
-
 
224
 
-
 
225
    public final void setVerticalyResizable(boolean verticalyResizable) {
-
 
226
        this.verticalyResizable = verticalyResizable;
-
 
227
    }
-
 
228
 
-
 
229
    public final boolean isHorizontalyResizable() {
-
 
230
        return horizontalyResizable;
-
 
231
    }
-
 
232
 
-
 
233
    public final void setHorizontalyResizable(boolean horizontalyResizable) {
-
 
234
        this.horizontalyResizable = horizontalyResizable;
-
 
235
    }
-
 
236
 
218
    public void dump(PrintStream out) {
237
    public void dump(PrintStream out) {
219
        String type = "?";
238
        String type = "?";
220
        if (this.type == TYPE_CHECKBOX) {
239
        if (this.type == TYPE_CHECKBOX) {
221
            type = "checkbox";
240
            type = "checkbox";
222
        } else if (this.type == TYPE_COMBOBOX) {
241
        } else if (this.type == TYPE_COMBOBOX) {
Line 227... Line 246...
227
            type = "textfield";
246
            type = "textfield";
228
        } else if (this.type == TYPE_LIST) {
247
        } else if (this.type == TYPE_LIST) {
229
            type = "list";
248
            type = "list";
230
        } else if (this.type == TYPE_TABBED_UI) {
249
        } else if (this.type == TYPE_TABBED_UI) {
231
            type = "tabs";
250
            type = "tabs";
-
 
251
        } else if (this.type == TYPE_TREE) {
-
 
252
            type = "tree";
232
        } else if (this.type == TYPE_BUTTON) {
253
        } else if (this.type == TYPE_BUTTON) {
233
            type = "button";
254
            type = "button";
234
        } else if (this.type == TYPE_BUTTON_WITH_CONTEXT) {
255
        } else if (this.type == TYPE_BUTTON_WITH_CONTEXT) {
235
            type = "button with context";
256
            type = "button with context";
236
        } else if (this.type == TYPE_BUTTON_CANCEL) {
257
        } else if (this.type == TYPE_BUTTON_CANCEL) {
237
            type = "cancel button";
258
            type = "cancel button";
238
        } else if (this.type == TYPE_COMBOBOX_ELEMENT) {
259
        } else if (this.type == TYPE_COMBOBOX_ELEMENT) {
239
            type = "combo element";
260
            type = "combo element";
-
 
261
        } else if (this.type == TYPE_BUTTON_WITH_SELECTION_CONTEXT) {
-
 
262
            type = "button with selection context";
240
        }
263
        }
241
        String valueType = "?";
264
        String valueType = "?";
242
        if (this.valueType == VALUE_TYPE_STRING) {
265
        if (this.valueType == VALUE_TYPE_STRING) {
243
            valueType = "string";
266
            valueType = "string";
244
        } else if (this.valueType == VALUE_TYPE_INTEGER) {
267
        } else if (this.valueType == VALUE_TYPE_INTEGER) {
Line 263... Line 286...
263
            str += "display prec.: " + displayPrecision;
286
            str += "display prec.: " + displayPrecision;
264
        }
287
        }
265
        if (label != null) {
288
        if (label != null) {
266
            str += " label:" + label;
289
            str += " label:" + label;
267
        }
290
        }
-
 
291
        if (horizontalyResizable) {
-
 
292
            str += "|- H ->";
-
 
293
        }
-
 
294
        if (verticalyResizable) {
-
 
295
            str += "|- V ->";
-
 
296
        }
268
        out.println(str);
297
        out.println(str);
269
 
298
 
270
    }
299
    }
271
 
300
 
272
    @Override
301
    @Override