zhao
2021-06-04 c7ec496f9e41c2227103b3ef776e4a3f91bce6b2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
 
/* ====================================================================
   Licensed to the Apache Software Foundation (ASF) Under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for Additional information regarding copyright ownership.
   The ASF licenses this file to You Under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed Under the License is distributed on an "AS Is" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations Under the License.
==================================================================== */
 
 
namespace HH.WMS.Utils.NPOI.HSSF.Record.Chart
{
 
    using System;
    using System.Text;
    using HH.WMS.Utils.NPOI.Util;
 
 
    /**
     * The axis options record provides Unit information and other various tidbits about the axis.
     * NOTE: This source is automatically generated please do not modify this file.  Either subclass or
     *       Remove the record in src/records/definitions.
 
     * @author Andrew C. Oliver(acoliver at apache.org)
     */
    public class AxisOptionsRecord
       : StandardRecord
    {
        public const short sid = 0x1062;
        private short field_1_minimumCategory;
        private short field_2_maximumCategory;
        private short field_3_majorUnitValue;
        private short field_4_majorUnit;
        private short field_5_minorUnitValue;
        private short field_6_minorUnit;
        private short field_7_baseUnit;
        private short field_8_crossingPoint;
        private short field_9_options;
        private BitField defaultMinimum = BitFieldFactory.GetInstance(0x1);
        private BitField defaultMaximum = BitFieldFactory.GetInstance(0x2);
        private BitField defaultMajor = BitFieldFactory.GetInstance(0x4);
        private BitField defaultMinorUnit = BitFieldFactory.GetInstance(0x8);
        private BitField isDate = BitFieldFactory.GetInstance(0x10);
        private BitField defaultBase = BitFieldFactory.GetInstance(0x20);
        private BitField defaultCross = BitFieldFactory.GetInstance(0x40);
        private BitField defaultDateSettings = BitFieldFactory.GetInstance(0x80);
 
 
        public AxisOptionsRecord()
        {
 
        }
 
        /**
         * Constructs a AxisOptions record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */
 
        public AxisOptionsRecord(RecordInputStream in1)
        {
            field_1_minimumCategory = in1.ReadShort();
            field_2_maximumCategory = in1.ReadShort();
            field_3_majorUnitValue = in1.ReadShort();
            field_4_majorUnit = in1.ReadShort();
            field_5_minorUnitValue = in1.ReadShort();
            field_6_minorUnit = in1.ReadShort();
            field_7_baseUnit = in1.ReadShort();
            field_8_crossingPoint = in1.ReadShort();
            field_9_options = in1.ReadShort();
 
        }
 
 
        public override String ToString()
        {
            StringBuilder buffer = new StringBuilder();
 
            buffer.Append("[AXCEXT]\n");
            buffer.Append("    .minimumCategory      = ")
                .Append("0x").Append(HexDump.ToHex(MinimumCategory))
                .Append(" (").Append(MinimumCategory).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .maximumCategory      = ")
                .Append("0x").Append(HexDump.ToHex(MaximumCategory))
                .Append(" (").Append(MaximumCategory).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .majorUnitValue       = ")
                .Append("0x").Append(HexDump.ToHex(MajorUnitValue))
                .Append(" (").Append(MajorUnitValue).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .majorUnit            = ")
                .Append("0x").Append(HexDump.ToHex(MajorUnit))
                .Append(" (").Append(MajorUnit).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .minorUnitValue       = ")
                .Append("0x").Append(HexDump.ToHex(MinorUnitValue))
                .Append(" (").Append(MinorUnitValue).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .minorUnit            = ")
                .Append("0x").Append(HexDump.ToHex(MinorUnit))
                .Append(" (").Append(MinorUnit).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .baseUnit             = ")
                .Append("0x").Append(HexDump.ToHex(BaseUnit))
                .Append(" (").Append(BaseUnit).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .crossingPoint        = ")
                .Append("0x").Append(HexDump.ToHex(CrossingPoint))
                .Append(" (").Append(CrossingPoint).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("    .options              = ")
                .Append("0x").Append(HexDump.ToHex(Options))
                .Append(" (").Append(Options).Append(" )");
            buffer.Append(Environment.NewLine);
            buffer.Append("         .defaultMinimum           = ").Append(IsDefaultMinimum).Append('\n');
            buffer.Append("         .defaultMaximum           = ").Append(IsDefaultMaximum).Append('\n');
            buffer.Append("         .defaultMajor             = ").Append(IsDefaultMajor).Append('\n');
            buffer.Append("         .defaultMinorUnit         = ").Append(IsDefaultMinorUnit).Append('\n');
            buffer.Append("         .IsDate                   = ").Append(IsDate).Append('\n');
            buffer.Append("         .defaultBase              = ").Append(IsDefaultBase).Append('\n');
            buffer.Append("         .defaultCross             = ").Append(IsDefaultCross).Append('\n');
            buffer.Append("         .defaultDateSettings      = ").Append(IsDefaultDateSettings).Append('\n');
 
            buffer.Append("[/AXCEXT]\n");
            return buffer.ToString();
        }
 
        public override void Serialize(ILittleEndianOutput out1)
        {
            out1.WriteShort(field_1_minimumCategory);
            out1.WriteShort(field_2_maximumCategory);
            out1.WriteShort(field_3_majorUnitValue);
            out1.WriteShort(field_4_majorUnit);
            out1.WriteShort(field_5_minorUnitValue);
            out1.WriteShort(field_6_minorUnit);
            out1.WriteShort(field_7_baseUnit);
            out1.WriteShort(field_8_crossingPoint);
            out1.WriteShort(field_9_options);
        }
 
        /**
         * Size of record (exluding 4 byte header)
         */
        protected override int DataSize
        {
            get { return 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2; }
        }
 
        public override short Sid
        {
            get { return sid; }
        }
 
        public override Object Clone()
        {
            AxisOptionsRecord rec = new AxisOptionsRecord();
 
            rec.field_1_minimumCategory = field_1_minimumCategory;
            rec.field_2_maximumCategory = field_2_maximumCategory;
            rec.field_3_majorUnitValue = field_3_majorUnitValue;
            rec.field_4_majorUnit = field_4_majorUnit;
            rec.field_5_minorUnitValue = field_5_minorUnitValue;
            rec.field_6_minorUnit = field_6_minorUnit;
            rec.field_7_baseUnit = field_7_baseUnit;
            rec.field_8_crossingPoint = field_8_crossingPoint;
            rec.field_9_options = field_9_options;
            return rec;
        }
 
 
 
 
        /**
         * Get the minimum category field for the AxisOptions record.
         */
        public short MinimumCategory
        {
            get
            {
                return field_1_minimumCategory;
            }
            set 
            {
                this.field_1_minimumCategory = value;
            }
        }
 
        /**
         * Get the maximum category field for the AxisOptions record.
         */
        public short MaximumCategory
        {
            get
            {
                return field_2_maximumCategory;
            }
            set 
            {
                this.field_2_maximumCategory = value;
            }
        }
 
        /**
         * Get the major Unit value field for the AxisOptions record.
         */
        public short MajorUnitValue
        {
            get
            {
                return field_3_majorUnitValue;
            }
            set 
            {
                this.field_3_majorUnitValue = value;
            }
        }
 
        /**
         * Get the major Unit field for the AxisOptions record.
         */
        public short MajorUnit
        {
            get
            {
                return field_4_majorUnit;
            }
            set
            {
                this.field_4_majorUnit = value;
            }
        }
 
        /**
         * Get the minor Unit value field for the AxisOptions record.
         */
        public short MinorUnitValue
        {
            get
            {
                return field_5_minorUnitValue;
            }
            set
            {
                this.field_5_minorUnitValue = value;
            }
        }
 
        /**
         * Get the minor Unit field for the AxisOptions record.
         */
        public short MinorUnit
        {
            get
            {
                return field_6_minorUnit;
            }
            set 
            {
                this.field_6_minorUnit = value;
            }
        }
 
 
        /**
         * Get the base Unit field for the AxisOptions record.
         */
        public short BaseUnit
        {
            get
            {
                return field_7_baseUnit;
            }
            set 
            {
                this.field_7_baseUnit = value;
            }
        }
 
        /**
         * Get the crossing point field for the AxisOptions record.
         */
        public short CrossingPoint
        {
            get
            {
                return field_8_crossingPoint;
            }
            set 
            {
                this.field_8_crossingPoint = value;
            }
        }
 
        /**
         * Get the options field for the AxisOptions record.
         */
        public short Options
        {
            get { return field_9_options; }
            set { this.field_9_options = value; }
        }
 
        /**
         * use the default minimum category
         * @return  the default minimum field value.
         */
        public bool IsDefaultMinimum
        {
            get
            {
                return defaultMinimum.IsSet(field_9_options);
            }
            set { field_9_options = defaultMinimum.SetShortBoolean(field_9_options, value); }
        }
        /**
         * use the default maximum category
         * @return  the default maximum field value.
         */
        public bool IsDefaultMaximum
        {
            get
            {
                return defaultMaximum.IsSet(field_9_options);
            }
            set 
            {
                field_9_options = defaultMaximum.SetShortBoolean(field_9_options, value);
            }
        }
 
        /**
         * use the default major Unit
         * @return  the default major field value.
         */
        public bool IsDefaultMajor
        {
            get
            {
                return defaultMajor.IsSet(field_9_options);
            }
            set 
            {
                field_9_options = defaultMajor.SetShortBoolean(field_9_options, value);
            }
        }
 
        /**
         * use the default minor Unit
         * @return  the default minor Unit field value.
         */
        public bool IsDefaultMinorUnit
        {
            get
            {
                return defaultMinorUnit.IsSet(field_9_options);
            }
            set { field_9_options = defaultMinorUnit.SetShortBoolean(field_9_options, value); }
        }
 
 
        /**
         * this is a date axis
         * @return  the IsDate field value.
         */
        public bool IsDate
        {
            get
            {
                return isDate.IsSet(field_9_options);
            }
            set 
            {
                field_9_options = isDate.SetShortBoolean(field_9_options, value);
            }
        }
 
        /**
         * use the default base Unit
         * @return  the default base field value.
         */
        public bool IsDefaultBase
        {
            get
            {
                return defaultBase.IsSet(field_9_options);
            }
            set { field_9_options = defaultBase.SetShortBoolean(field_9_options, value); }
        }
 
        /**
         * use the default crossing point
         * @return  the default cross field value.
         */
        public bool IsDefaultCross
        {
            get
            {
                return defaultCross.IsSet(field_9_options);
            }
            set 
            {
                field_9_options = defaultCross.SetShortBoolean(field_9_options, value);
            }
        }
        /**
         * use default date Setttings for this axis
         * @return  the default date Settings field value.
         */
        public bool IsDefaultDateSettings
        {
            get
            {
                return defaultDateSettings.IsSet(field_9_options);
            }
            set { field_9_options = defaultDateSettings.SetShortBoolean(field_9_options, value); }
        }
 
 
    }
}