OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 149 | Rev 174 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 149 Rev 156
Line 16... Line 16...
16
import org.openconcerto.utils.io.HTMLable;
16
import org.openconcerto.utils.io.HTMLable;
17
import org.openconcerto.utils.io.JSONConverter;
17
import org.openconcerto.utils.io.JSONConverter;
18
import org.openconcerto.utils.io.Transferable;
18
import org.openconcerto.utils.io.Transferable;
19
 
19
 
20
import java.awt.Color;
20
import java.awt.Color;
-
 
21
import java.io.Externalizable;
-
 
22
import java.io.IOException;
-
 
23
import java.io.ObjectInput;
-
 
24
import java.io.ObjectOutput;
21
import java.io.PrintStream;
25
import java.io.PrintStream;
22
 
26
 
23
import net.minidev.json.JSONObject;
27
import net.minidev.json.JSONObject;
24
 
28
 
25
public abstract class LightUIElement implements Transferable {
29
public abstract class LightUIElement implements Transferable, Externalizable {
26
 
30
 
27
    private static final String HORIZONTALLY_RESIZABLE = "horizontally-resizable";
31
    private static final String HORIZONTALLY_RESIZABLE = "horizontally-resizable";
28
    private static final String VERTICALLY_SCROLLABLE = "vertically-scrollable";
32
    private static final String VERTICALLY_SCROLLABLE = "vertically-scrollable";
29
    private static final String VERTICALLY_RESIZABLE = "vertically-resizable";
33
    private static final String VERTICALLY_RESIZABLE = "vertically-resizable";
30
    private static final String HORIZONTALLY_SCROLLABLE = "horizontally-scrollable";
34
    private static final String HORIZONTALLY_SCROLLABLE = "horizontally-scrollable";
Line 82... Line 86...
82
    public static final int TYPE_BADGE = 30;
86
    public static final int TYPE_BADGE = 30;
83
    public static final int TYPE_AUTOCOMPLETE_COMBOBOX = 31;
87
    public static final int TYPE_AUTOCOMPLETE_COMBOBOX = 31;
84
    public static final int TYPE_COLOR_PICKER = 32;
88
    public static final int TYPE_COLOR_PICKER = 32;
85
    public static final int TYPE_HOUR_EDITOR = 33;
89
    public static final int TYPE_HOUR_EDITOR = 33;
86
    public static final int TYPE_RADIO_BUTTONS = 34;
90
    public static final int TYPE_RADIO_BUTTONS = 34;
-
 
91
    public static final int TYPE_PASSWORD_FIELD = 35;
-
 
92
 
87
    // valueType
93
    // valueType
88
    public static final int VALUE_TYPE_STRING = 0;
94
    public static final int VALUE_TYPE_STRING = 0;
89
    public static final int VALUE_TYPE_INTEGER = 1;
95
    public static final int VALUE_TYPE_INTEGER = 1;
90
    public static final int VALUE_TYPE_DATE = 2;
96
    public static final int VALUE_TYPE_DATE = 2;
91
    public static final int VALUE_TYPE_REF = 3;
97
    public static final int VALUE_TYPE_REF = 3;
Line 180... Line 186...
180
    private Color borderColor;
186
    private Color borderColor;
181
    private Color cellBackgroundColor;
187
    private Color cellBackgroundColor;
182
    private Color foreColor;
188
    private Color foreColor;
183
 
189
 
184
    private LightUIElement parent;
190
    private LightUIElement parent;
-
 
191
    private boolean destroyed;
-
 
192
 
-
 
193
    public LightUIElement() {
-
 
194
        // Serialization
-
 
195
    }
185
 
196
 
186
    public LightUIElement(final String id) {
197
    public LightUIElement(final String id) {
187
        this.id = id;
198
        this.id = id;
188
        this.UUID = java.util.UUID.randomUUID().toString();
199
        this.UUID = getNextUUID();// java.util.UUID.randomUUID().toString();
-
 
200
    }
189
 
201
 
-
 
202
    private static long count = 0;
190
        JSONToLightUIConvertorManager.getInstance().put(this.getClassName(), this.getConvertor());
203
    private static Integer counterLock = new Integer(123456);
-
 
204
 
-
 
205
    private String getNextUUID() {
-
 
206
        String result;
-
 
207
        synchronized (counterLock) {
-
 
208
            count++;
-
 
209
            result = "UUID" + count;
-
 
210
        }
-
 
211
        return result;
191
    }
212
    }
192
 
213
 
193
    // Init from json constructor
214
    // Init from json constructor
194
    public LightUIElement(final JSONObject json) {
215
    public LightUIElement(final JSONObject json) {
195
        this.fromJSON(json);
216
        this.fromJSON(json);
Line 520... Line 541...
520
 
541
 
521
    public String getUUID() {
542
    public String getUUID() {
522
        return this.UUID;
543
        return this.UUID;
523
    }
544
    }
524
 
545
 
525
    public void changeUUID() {
-
 
526
        this.UUID = java.util.UUID.randomUUID().toString();
-
 
527
    }
-
 
528
 
-
 
529
    public String getLabel() {
546
    public String getLabel() {
530
        return this.label;
547
        return this.label;
531
    }
548
    }
532
 
549
 
533
    public void setLabel(String label) {
550
    public void setLabel(String label) {
Line 725... Line 742...
725
            out.print("  ");
742
            out.print("  ");
726
        }
743
        }
727
    }
744
    }
728
 
745
 
729
    public final String getTypeAsString() {
746
    public final String getTypeAsString() {
730
        String type = "?";
747
        String result = "?";
731
        if (this.type == TYPE_CHECKBOX) {
748
        if (this.type == TYPE_CHECKBOX) {
732
            type = "checkbox";
749
            result = "checkbox";
733
        } else if (this.type == TYPE_COMBOBOX) {
750
        } else if (this.type == TYPE_COMBOBOX) {
734
            type = "combobox";
751
            result = "combobox";
735
        } else if (this.type == TYPE_LABEL) {
752
        } else if (this.type == TYPE_LABEL) {
736
            type = "label";
753
            result = "label";
737
        } else if (this.type == TYPE_TEXT_AREA) {
754
        } else if (this.type == TYPE_TEXT_AREA) {
738
            type = "textarea";
755
            result = "textarea";
739
        } else if (this.type == TYPE_TEXT_FIELD) {
756
        } else if (this.type == TYPE_TEXT_FIELD) {
740
            type = "textfield";
757
            result = "textfield";
741
        } else if (this.type == TYPE_TABLE) {
758
        } else if (this.type == TYPE_TABLE) {
742
            type = "table";
759
            result = "table";
743
        } else if (this.type == TYPE_TABBED_UI) {
760
        } else if (this.type == TYPE_TABBED_UI) {
744
            type = "tabs";
761
            result = "tabs";
745
        } else if (this.type == TYPE_TREE) {
762
        } else if (this.type == TYPE_TREE) {
746
            type = "tree";
763
            result = "tree";
747
        } else if (this.type == TYPE_BUTTON) {
764
        } else if (this.type == TYPE_BUTTON) {
748
            type = "button";
765
            result = "button";
749
        } else if (this.type == TYPE_BUTTON_WITH_CONTEXT) {
766
        } else if (this.type == TYPE_BUTTON_WITH_CONTEXT) {
750
            type = "button with context";
767
            result = "button with context";
751
        } else if (this.type == TYPE_BUTTON_CANCEL) {
768
        } else if (this.type == TYPE_BUTTON_CANCEL) {
752
            type = "cancel button";
769
            result = "cancel button";
753
        } else if (this.type == TYPE_COMBOBOX_ELEMENT) {
770
        } else if (this.type == TYPE_COMBOBOX_ELEMENT) {
754
            type = "combo element";
771
            result = "combo element";
755
        } else if (this.type == TYPE_BUTTON_WITH_SELECTION_CONTEXT) {
772
        } else if (this.type == TYPE_BUTTON_WITH_SELECTION_CONTEXT) {
756
            type = "button with selection context";
773
            result = "button with selection context";
757
        } else if (this.type == TYPE_FILE_UPLOAD_WITH_SELECTION) {
774
        } else if (this.type == TYPE_FILE_UPLOAD_WITH_SELECTION) {
758
            type = "file upload with selection";
775
            result = "file upload with selection";
759
        } else if (this.type == TYPE_FRAME) {
776
        } else if (this.type == TYPE_FRAME) {
760
            type = "frame";
777
            result = "frame";
761
        } else if (this.type == TYPE_DROPDOWN_BUTTON) {
778
        } else if (this.type == TYPE_DROPDOWN_BUTTON) {
762
            type = "drop down button";
779
            result = "drop down button";
763
        } else if (this.type == TYPE_IMAGE) {
780
        } else if (this.type == TYPE_IMAGE) {
764
            type = "image";
781
            result = "image";
765
        } else if (this.type == TYPE_LIST) {
782
        } else if (this.type == TYPE_LIST) {
766
            type = "list";
783
            result = "list";
767
        } else if (this.type == TYPE_RAW_HTML) {
784
        } else if (this.type == TYPE_RAW_HTML) {
768
            type = "raw html";
785
            result = "raw html";
769
        } else if (this.type == TYPE_SLIDER) {
786
        } else if (this.type == TYPE_SLIDER) {
770
            type = "slider";
787
            result = "slider";
771
        } else if (this.type == TYPE_PICTURE_UPLOAD) {
788
        } else if (this.type == TYPE_PICTURE_UPLOAD) {
772
            type = "picture upload";
789
            result = "picture upload";
773
        } else if (this.type == TYPE_FILE_UPLOAD) {
790
        } else if (this.type == TYPE_FILE_UPLOAD) {
774
            type = "file upload";
791
            result = "file upload";
775
        }
792
        }
776
 
793
 
777
        return type;
794
        return result;
778
    }
795
    }
779
 
796
 
780
    public String getClassName() {
797
    public String getClassName() {
781
        return this.getClass().getName();
798
        return this.getClass().getName();
782
    }
799
    }
783
 
800
 
784
    public abstract JSONToLightUIConvertor getConvertor();
-
 
785
 
-
 
786
    /**
801
    /**
787
     * { return new JSONToLightUIConvertor() {
802
     * { return new JSONToLightUIConvertor() {
788
     * 
803
     * 
789
     * @Override public LightUIElement convert(final JSONObject json) { return new
804
     * @Override public LightUIElement convert(final JSONObject json) { return new
790
     *           LightUIElement(json); } }; }
805
     *           LightUIElement(json); } }; }
Line 849... Line 864...
849
        this.foreColor = element.foreColor;
864
        this.foreColor = element.foreColor;
850
    }
865
    }
851
 
866
 
852
    @Override
867
    @Override
853
    public String toString() {
868
    public String toString() {
-
 
869
        if (!destroyed) {
854
        return super.toString() + " " + this.id;
870
            return super.toString() + " " + this.id;
-
 
871
        } else {
-
 
872
            return super.toString() + " " + this.id + " DESTROYED";
-
 
873
        }
855
    }
874
    }
856
 
875
 
857
    @Override
876
    @Override
858
    public JSONObject toJSON() {
877
    public JSONObject toJSON() {
859
        final JSONObject result = new JSONObject();
878
        final JSONObject result = new JSONObject();
Line 876... Line 895...
876
            result.put("vertical-alignment", this.verticalAlignment);
895
            result.put("vertical-alignment", this.verticalAlignment);
877
        }
896
        }
878
        if (this.weightX != DEFAULT_WEIGHT_X) {
897
        if (this.weightX != DEFAULT_WEIGHT_X) {
879
            result.put("weight-x", this.weightX);
898
            result.put("weight-x", this.weightX);
880
        }
899
        }
-
 
900
        if (this.weightY != DEFAULT_WEIGHT_Y) {
-
 
901
            result.put("weight-y", this.weightY);
881
 
902
        }
882
        if (this.commitMode != null) {
903
        if (this.commitMode != null) {
883
            result.put("commit-mode", this.commitMode);
904
            result.put("commit-mode", this.commitMode);
884
        }
905
        }
-
 
906
        if (this.width != null) {
-
 
907
            result.put("width", this.width);
-
 
908
        }
885
        if (this.height != null) {
909
        if (this.height != null) {
886
            result.put("height", this.height);
910
            result.put("height", this.height);
887
        }
911
        }
888
        if (this.marginBottom != null) {
912
        if (this.marginBottom != null) {
889
            result.put("m-bottom", this.marginBottom);
913
            result.put("m-bottom", this.marginBottom);
Line 926... Line 950...
926
        }
950
        }
927
        result.put("type", this.type);
951
        result.put("type", this.type);
928
        if (this.valueType != null) {
952
        if (this.valueType != null) {
929
            result.put("value-type", this.valueType);
953
            result.put("value-type", this.valueType);
930
        }
954
        }
931
        if (this.width != null) {
-
 
932
            result.put("width", this.width);
-
 
933
        }
-
 
934
 
955
 
935
        if (!this.enabled) {
956
        if (!this.enabled) {
936
            result.put("enabled", false);
957
            result.put("enabled", false);
937
        }
958
        }
938
        if (this.fillWidth) {
959
        if (this.fillWidth) {
Line 1038... Line 1059...
1038
        this.gridWidth = JSONConverter.getParameterFromJSON(json, "grid-width", Integer.class, DEFAULT_GRID_WIDTH);
1059
        this.gridWidth = JSONConverter.getParameterFromJSON(json, "grid-width", Integer.class, DEFAULT_GRID_WIDTH);
1039
        this.gridHeight = JSONConverter.getParameterFromJSON(json, "grid-height", Integer.class, DEFAULT_GRID_HEIGHT);
1060
        this.gridHeight = JSONConverter.getParameterFromJSON(json, "grid-height", Integer.class, DEFAULT_GRID_HEIGHT);
1040
        this.horizontalAlignment = JSONConverter.getParameterFromJSON(json, "horizontal-alignment", Integer.class, HALIGN_LEFT);
1061
        this.horizontalAlignment = JSONConverter.getParameterFromJSON(json, "horizontal-alignment", Integer.class, HALIGN_LEFT);
1041
        this.verticalAlignment = JSONConverter.getParameterFromJSON(json, "vertical-alignment", Integer.class, VALIGN_TOP);
1062
        this.verticalAlignment = JSONConverter.getParameterFromJSON(json, "vertical-alignment", Integer.class, VALIGN_TOP);
1042
        this.weightX = JSONConverter.getParameterFromJSON(json, "weight-x", Integer.class, DEFAULT_WEIGHT_X);
1063
        this.weightX = JSONConverter.getParameterFromJSON(json, "weight-x", Integer.class, DEFAULT_WEIGHT_X);
-
 
1064
        this.weightY = JSONConverter.getParameterFromJSON(json, "weight-y", Integer.class, DEFAULT_WEIGHT_Y);
1043
        this.minInputSize = JSONConverter.getParameterFromJSON(json, "min-input-size", Integer.class);
1065
        this.minInputSize = JSONConverter.getParameterFromJSON(json, "min-input-size", Integer.class);
1044
        this.type = JSONConverter.getParameterFromJSON(json, "type", Integer.class);
1066
        this.type = JSONConverter.getParameterFromJSON(json, "type", Integer.class);
1045
        this.valueType = JSONConverter.getParameterFromJSON(json, "value-type", Integer.class);
1067
        this.valueType = JSONConverter.getParameterFromJSON(json, "value-type", Integer.class);
1046
        this.width = JSONConverter.getParameterFromJSON(json, "width", Integer.class);
1068
        this.width = JSONConverter.getParameterFromJSON(json, "width", Integer.class);
-
 
1069
        this.height = JSONConverter.getParameterFromJSON(json, "height", Integer.class);
1047
        this.marginTop = JSONConverter.getParameterFromJSON(json, "m-top", Integer.class);
1070
        this.marginTop = JSONConverter.getParameterFromJSON(json, "m-top", Integer.class);
1048
        this.marginBottom = JSONConverter.getParameterFromJSON(json, "m-bottom", Integer.class);
1071
        this.marginBottom = JSONConverter.getParameterFromJSON(json, "m-bottom", Integer.class);
1049
        this.marginLeft = JSONConverter.getParameterFromJSON(json, "m-left", Integer.class);
1072
        this.marginLeft = JSONConverter.getParameterFromJSON(json, "m-left", Integer.class);
1050
        this.marginRight = JSONConverter.getParameterFromJSON(json, "m-right", Integer.class);
1073
        this.marginRight = JSONConverter.getParameterFromJSON(json, "m-right", Integer.class);
1051
        this.maxWidth = JSONConverter.getParameterFromJSON(json, "max-width", Integer.class);
1074
        this.maxWidth = JSONConverter.getParameterFromJSON(json, "max-width", Integer.class);
1052
        this.minWidth = JSONConverter.getParameterFromJSON(json, "min-width", Integer.class);
1075
        this.minWidth = JSONConverter.getParameterFromJSON(json, "min-width", Integer.class);
1053
        this.height = JSONConverter.getParameterFromJSON(json, "height", Integer.class);
-
 
-
 
1076
 
1054
        this.maxHeight = JSONConverter.getParameterFromJSON(json, "max-height", Integer.class);
1077
        this.maxHeight = JSONConverter.getParameterFromJSON(json, "max-height", Integer.class);
1055
        this.minHeight = JSONConverter.getParameterFromJSON(json, "min-height", Integer.class);
1078
        this.minHeight = JSONConverter.getParameterFromJSON(json, "min-height", Integer.class);
1056
        this.paddingTop = JSONConverter.getParameterFromJSON(json, "p-top", Integer.class);
1079
        this.paddingTop = JSONConverter.getParameterFromJSON(json, "p-top", Integer.class);
1057
        this.paddingBottom = JSONConverter.getParameterFromJSON(json, "p-bottom", Integer.class);
1080
        this.paddingBottom = JSONConverter.getParameterFromJSON(json, "p-bottom", Integer.class);
1058
        this.paddingLeft = JSONConverter.getParameterFromJSON(json, "p-left", Integer.class);
1081
        this.paddingLeft = JSONConverter.getParameterFromJSON(json, "p-left", Integer.class);
Line 1079... Line 1102...
1079
        this.foreColor = JSONConverter.getParameterFromJSON(json, "fore-color", Color.class);
1102
        this.foreColor = JSONConverter.getParameterFromJSON(json, "fore-color", Color.class);
1080
    }
1103
    }
1081
 
1104
 
1082
    public void destroy() {
1105
    public void destroy() {
1083
        this.setValue(null);
1106
        this.setValue(null);
-
 
1107
        this.parent = null;
-
 
1108
        this.destroyed = true;
-
 
1109
    }
-
 
1110
 
-
 
1111
    public boolean isDestroyed() {
-
 
1112
        return destroyed;
-
 
1113
    }
-
 
1114
 
-
 
1115
    @Override
-
 
1116
    public void writeExternal(ObjectOutput out) throws IOException {
-
 
1117
        out.writeInt(this.type);
-
 
1118
        if (this.id == null) {
-
 
1119
            throw new IllegalStateException("null id");
-
 
1120
        }
-
 
1121
        out.writeUTF(this.id);
-
 
1122
        if (this.UUID == null) {
-
 
1123
            throw new IllegalStateException("UUID");
-
 
1124
        }
-
 
1125
        out.writeUTF(this.UUID);
-
 
1126
 
-
 
1127
        writeIfNotNull(out, this.label);
-
 
1128
        writeIfNotNull(out, this.value);
-
 
1129
 
-
 
1130
        out.writeInt(this.fontSize);
-
 
1131
        out.writeInt(this.gridWidth);
-
 
1132
        out.writeInt(this.gridHeight);
-
 
1133
 
-
 
1134
        out.writeByte(this.horizontalAlignment);
-
 
1135
        out.writeByte(this.verticalAlignment);
-
 
1136
        out.writeByte(this.weightX);
-
 
1137
        out.writeByte(this.weightY);
-
 
1138
 
-
 
1139
        writeIfNotNull(out, this.commitMode);
-
 
1140
        writeIfNotNull(out, this.width);
-
 
1141
        writeIfNotNull(out, this.height);
-
 
1142
 
-
 
1143
        // Margins
-
 
1144
        writeIfNotNull(out, this.marginBottom);
-
 
1145
        writeIfNotNull(out, this.marginLeft);
-
 
1146
        writeIfNotNull(out, this.marginRight);
-
 
1147
        writeIfNotNull(out, this.marginTop);
-
 
1148
        //
-
 
1149
        writeIfNotNull(out, this.maxHeight);
-
 
1150
        writeIfNotNull(out, this.maxWidth);
-
 
1151
 
-
 
1152
        writeIfNotNull(out, this.minInputSize);
-
 
1153
        writeIfNotNull(out, this.minHeight);
-
 
1154
        writeIfNotNull(out, this.minWidth);
-
 
1155
 
-
 
1156
        // Paddings
-
 
1157
        writeIfNotNull(out, this.paddingBottom);
-
 
1158
        writeIfNotNull(out, this.paddingLeft);
-
 
1159
        writeIfNotNull(out, this.paddingRight);
-
 
1160
        writeIfNotNull(out, this.paddingTop);
-
 
1161
 
-
 
1162
        writeIfNotNull(out, this.valueType);
-
 
1163
 
-
 
1164
        out.writeBoolean(this.enabled);
-
 
1165
        out.writeBoolean(this.fillWidth);
-
 
1166
        out.writeBoolean(this.fillHeight);
-
 
1167
        out.writeBoolean(this.foldable);
-
 
1168
        out.writeBoolean(this.folded);
-
 
1169
        out.writeBoolean(this.fontBold);
-
 
1170
        out.writeBoolean(this.fontItalic);
-
 
1171
        out.writeBoolean(this.horizontallyResizable);
-
 
1172
        out.writeBoolean(this.horizontallyScrollable);
-
 
1173
        out.writeBoolean(this.required);
-
 
1174
        out.writeBoolean(this.readOnly);
-
 
1175
        out.writeBoolean(this.verticallyResizable);
-
 
1176
        out.writeBoolean(this.verticallyScrollable);
-
 
1177
 
-
 
1178
        out.writeBoolean(this.visible);
-
 
1179
        out.writeBoolean(this.notSaved);
-
 
1180
 
-
 
1181
        writeIfNotNull(out, this.displayPrecision);
-
 
1182
        writeIfNotNull(out, this.icon);
-
 
1183
        writeIfNotNull(out, this.toolTip);
-
 
1184
        writeIfNotNull(out, this.valuePrecision);
-
 
1185
        writeIfNotNull(out, this.valueRange);
-
 
1186
 
-
 
1187
        // Colors
-
 
1188
        writeIfNotNull(out, this.backgroundColor);
-
 
1189
        writeIfNotNull(out, this.borderColor);
-
 
1190
        writeIfNotNull(out, this.cellBackgroundColor);
-
 
1191
        writeIfNotNull(out, this.foreColor);
-
 
1192
    }
-
 
1193
 
-
 
1194
    void writeIfNotNull(ObjectOutput out, String s) throws IOException {
-
 
1195
        if (s != null) {
-
 
1196
            out.writeBoolean(true);
-
 
1197
            out.writeUTF(s);
-
 
1198
        } else {
-
 
1199
            out.writeBoolean(false);
-
 
1200
        }
-
 
1201
    }
-
 
1202
 
-
 
1203
    void writeIfNotNull(ObjectOutput out, Integer s) throws IOException {
-
 
1204
        if (s != null) {
-
 
1205
            out.writeBoolean(true);
-
 
1206
            out.writeInt(s);
-
 
1207
        } else {
-
 
1208
            out.writeBoolean(false);
-
 
1209
        }
-
 
1210
    }
-
 
1211
 
-
 
1212
    void writeIfNotNull(ObjectOutput out, Color s) throws IOException {
-
 
1213
        if (s != null) {
-
 
1214
            out.writeBoolean(true);
-
 
1215
            out.writeInt(s.getRGB());
-
 
1216
        } else {
-
 
1217
            out.writeBoolean(false);
-
 
1218
        }
-
 
1219
    }
-
 
1220
 
-
 
1221
    @Override
-
 
1222
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-
 
1223
        this.type = in.readInt();
-
 
1224
        this.id = in.readUTF();
-
 
1225
        this.UUID = in.readUTF();
-
 
1226
        if (in.readBoolean()) {
-
 
1227
            this.label = in.readUTF();
-
 
1228
        }
-
 
1229
        if (in.readBoolean()) {
-
 
1230
            this.value = in.readUTF();
-
 
1231
        }
-
 
1232
        this.fontSize = in.readInt();
-
 
1233
        this.gridWidth = in.readInt();
-
 
1234
        this.gridHeight = in.readInt();
-
 
1235
        this.horizontalAlignment = in.readByte();
-
 
1236
        this.verticalAlignment = in.readByte();
-
 
1237
        this.weightX = in.readByte();
-
 
1238
        this.weightY = in.readByte();
-
 
1239
 
-
 
1240
        if (in.readBoolean()) {
-
 
1241
            this.commitMode = in.readInt();
-
 
1242
        }
-
 
1243
        if (in.readBoolean()) {
-
 
1244
            this.width = in.readInt();
-
 
1245
        }
-
 
1246
        if (in.readBoolean()) {
-
 
1247
            this.height = in.readInt();
-
 
1248
        }
-
 
1249
        // Margins
-
 
1250
        if (in.readBoolean()) {
-
 
1251
            this.marginBottom = in.readInt();
-
 
1252
        }
-
 
1253
        if (in.readBoolean()) {
-
 
1254
            this.marginLeft = in.readInt();
-
 
1255
        }
-
 
1256
        if (in.readBoolean()) {
-
 
1257
            this.marginRight = in.readInt();
-
 
1258
        }
-
 
1259
        if (in.readBoolean()) {
-
 
1260
            this.marginTop = in.readInt();
-
 
1261
        }
-
 
1262
 
-
 
1263
        //
-
 
1264
        if (in.readBoolean()) {
-
 
1265
            this.maxHeight = in.readInt();
-
 
1266
        }
-
 
1267
        if (in.readBoolean()) {
-
 
1268
            this.maxWidth = in.readInt();
-
 
1269
        }
-
 
1270
 
-
 
1271
        if (in.readBoolean()) {
-
 
1272
            this.minInputSize = in.readInt();
-
 
1273
        }
-
 
1274
        if (in.readBoolean()) {
-
 
1275
            this.minHeight = in.readInt();
-
 
1276
        }
-
 
1277
        if (in.readBoolean()) {
-
 
1278
            this.minWidth = in.readInt();
-
 
1279
        }
-
 
1280
 
-
 
1281
        // Paddings
-
 
1282
        if (in.readBoolean()) {
-
 
1283
            this.paddingBottom = in.readInt();
-
 
1284
        }
-
 
1285
        if (in.readBoolean()) {
-
 
1286
            this.paddingLeft = in.readInt();
-
 
1287
        }
-
 
1288
        if (in.readBoolean()) {
-
 
1289
            this.paddingRight = in.readInt();
-
 
1290
        }
-
 
1291
        if (in.readBoolean()) {
-
 
1292
            this.paddingTop = in.readInt();
-
 
1293
        }
-
 
1294
        if (in.readBoolean()) {
-
 
1295
            this.valueType = in.readInt();
-
 
1296
        }
-
 
1297
 
-
 
1298
        this.enabled = in.readBoolean();
-
 
1299
        this.fillWidth = in.readBoolean();
-
 
1300
        this.fillHeight = in.readBoolean();
-
 
1301
        this.foldable = in.readBoolean();
-
 
1302
        this.folded = in.readBoolean();
-
 
1303
        this.fontBold = in.readBoolean();
-
 
1304
        this.fontItalic = in.readBoolean();
-
 
1305
        this.horizontallyResizable = in.readBoolean();
-
 
1306
        this.horizontallyScrollable = in.readBoolean();
-
 
1307
        this.required = in.readBoolean();
-
 
1308
        this.readOnly = in.readBoolean();
-
 
1309
        this.verticallyResizable = in.readBoolean();
-
 
1310
        this.verticallyScrollable = in.readBoolean();
-
 
1311
 
-
 
1312
        //
-
 
1313
        this.visible = in.readBoolean();
-
 
1314
        this.notSaved = in.readBoolean();
-
 
1315
        if (in.readBoolean()) {
-
 
1316
            this.displayPrecision = in.readUTF();
-
 
1317
        }
-
 
1318
        if (in.readBoolean()) {
-
 
1319
            this.icon = in.readUTF();
-
 
1320
        }
-
 
1321
        if (in.readBoolean()) {
-
 
1322
            this.toolTip = in.readUTF();
-
 
1323
        }
-
 
1324
        if (in.readBoolean()) {
-
 
1325
            this.valuePrecision = in.readUTF();
-
 
1326
        }
-
 
1327
        if (in.readBoolean()) {
-
 
1328
            this.valueRange = in.readUTF();
-
 
1329
        }
-
 
1330
        // Colors
-
 
1331
        if (in.readBoolean()) {
-
 
1332
            this.backgroundColor = new Color(in.readInt());
-
 
1333
        }
-
 
1334
        if (in.readBoolean()) {
-
 
1335
            this.borderColor = new Color(in.readInt());
-
 
1336
        }
-
 
1337
        if (in.readBoolean()) {
-
 
1338
            this.cellBackgroundColor = new Color(in.readInt());
-
 
1339
        }
-
 
1340
        if (in.readBoolean()) {
-
 
1341
            this.foreColor = new Color(in.readInt());
-
 
1342
        }
1084
    }
1343
    }
1085
}
1344
}