001: /* ====================================================================
002: Licensed to the Apache Software Foundation (ASF) under one or more
003: contributor license agreements. See the NOTICE file distributed with
004: this work for additional information regarding copyright ownership.
005: The ASF licenses this file to You under the Apache License, Version 2.0
006: (the "License"); you may not use this file except in compliance with
007: the License. You may obtain a copy of the License at
008:
009: http://www.apache.org/licenses/LICENSE-2.0
010:
011: Unless required by applicable law or agreed to in writing, software
012: distributed under the License is distributed on an "AS IS" BASIS,
013: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: See the License for the specific language governing permissions and
015: limitations under the License.
016: ==================================================================== */
017:
018: package org.apache.poi.hdf.model.hdftypes.definitions;
019:
020: import org.apache.poi.util.BitField;
021: import org.apache.poi.util.BitFieldFactory;
022: import org.apache.poi.util.LittleEndian;
023: import org.apache.poi.util.StringUtil;
024: import org.apache.poi.util.HexDump;
025: import org.apache.poi.hdf.model.hdftypes.HDFType;
026:
027: /**
028: * Table Cell Descriptor.
029: * NOTE: This source is automatically generated please do not modify this file. Either subclass or
030: * remove the record in src/records/definitions.
031:
032: * @author S. Ryan Ackley
033: */
034: public abstract class TCAbstractType implements HDFType {
035:
036: private short field_1_rgf;
037: private static BitField fFirstMerged = BitFieldFactory
038: .getInstance(0x0001);
039: private static BitField fMerged = BitFieldFactory
040: .getInstance(0x0002);
041: private static BitField fVertical = BitFieldFactory
042: .getInstance(0x0004);
043: private static BitField fBackward = BitFieldFactory
044: .getInstance(0x0008);
045: private static BitField fRotateFont = BitFieldFactory
046: .getInstance(0x0010);
047: private static BitField fVertMerge = BitFieldFactory
048: .getInstance(0x0020);
049: private static BitField fVertRestart = BitFieldFactory
050: .getInstance(0x0040);
051: private static BitField vertAlign = BitFieldFactory
052: .getInstance(0x0180);
053: private short field_2_unused;
054: private short[] field_3_brcTop;
055: private short[] field_4_brcLeft;
056: private short[] field_5_brcBottom;
057: private short[] field_6_brcRight;
058:
059: public TCAbstractType() {
060:
061: }
062:
063: /**
064: * Size of record (exluding 4 byte header)
065: */
066: public int getSize() {
067: return 4 + +2 + 2 + 4 + 4 + 4 + 4;
068: }
069:
070: /**
071: * Get the rgf field for the TC record.
072: */
073: public short getRgf() {
074: return field_1_rgf;
075: }
076:
077: /**
078: * Set the rgf field for the TC record.
079: */
080: public void setRgf(short field_1_rgf) {
081: this .field_1_rgf = field_1_rgf;
082: }
083:
084: /**
085: * Get the unused field for the TC record.
086: */
087: public short getUnused() {
088: return field_2_unused;
089: }
090:
091: /**
092: * Set the unused field for the TC record.
093: */
094: public void setUnused(short field_2_unused) {
095: this .field_2_unused = field_2_unused;
096: }
097:
098: /**
099: * Get the brcTop field for the TC record.
100: */
101: public short[] getBrcTop() {
102: return field_3_brcTop;
103: }
104:
105: /**
106: * Set the brcTop field for the TC record.
107: */
108: public void setBrcTop(short[] field_3_brcTop) {
109: this .field_3_brcTop = field_3_brcTop;
110: }
111:
112: /**
113: * Get the brcLeft field for the TC record.
114: */
115: public short[] getBrcLeft() {
116: return field_4_brcLeft;
117: }
118:
119: /**
120: * Set the brcLeft field for the TC record.
121: */
122: public void setBrcLeft(short[] field_4_brcLeft) {
123: this .field_4_brcLeft = field_4_brcLeft;
124: }
125:
126: /**
127: * Get the brcBottom field for the TC record.
128: */
129: public short[] getBrcBottom() {
130: return field_5_brcBottom;
131: }
132:
133: /**
134: * Set the brcBottom field for the TC record.
135: */
136: public void setBrcBottom(short[] field_5_brcBottom) {
137: this .field_5_brcBottom = field_5_brcBottom;
138: }
139:
140: /**
141: * Get the brcRight field for the TC record.
142: */
143: public short[] getBrcRight() {
144: return field_6_brcRight;
145: }
146:
147: /**
148: * Set the brcRight field for the TC record.
149: */
150: public void setBrcRight(short[] field_6_brcRight) {
151: this .field_6_brcRight = field_6_brcRight;
152: }
153:
154: /**
155: * Sets the fFirstMerged field value.
156: *
157: */
158: public void setFFirstMerged(boolean value) {
159: field_1_rgf = (short) fFirstMerged.setBoolean(field_1_rgf,
160: value);
161:
162: }
163:
164: /**
165: *
166: * @return the fFirstMerged field value.
167: */
168: public boolean isFFirstMerged() {
169: return fFirstMerged.isSet(field_1_rgf);
170:
171: }
172:
173: /**
174: * Sets the fMerged field value.
175: *
176: */
177: public void setFMerged(boolean value) {
178: field_1_rgf = (short) fMerged.setBoolean(field_1_rgf, value);
179:
180: }
181:
182: /**
183: *
184: * @return the fMerged field value.
185: */
186: public boolean isFMerged() {
187: return fMerged.isSet(field_1_rgf);
188:
189: }
190:
191: /**
192: * Sets the fVertical field value.
193: *
194: */
195: public void setFVertical(boolean value) {
196: field_1_rgf = (short) fVertical.setBoolean(field_1_rgf, value);
197:
198: }
199:
200: /**
201: *
202: * @return the fVertical field value.
203: */
204: public boolean isFVertical() {
205: return fVertical.isSet(field_1_rgf);
206:
207: }
208:
209: /**
210: * Sets the fBackward field value.
211: *
212: */
213: public void setFBackward(boolean value) {
214: field_1_rgf = (short) fBackward.setBoolean(field_1_rgf, value);
215:
216: }
217:
218: /**
219: *
220: * @return the fBackward field value.
221: */
222: public boolean isFBackward() {
223: return fBackward.isSet(field_1_rgf);
224:
225: }
226:
227: /**
228: * Sets the fRotateFont field value.
229: *
230: */
231: public void setFRotateFont(boolean value) {
232: field_1_rgf = (short) fRotateFont
233: .setBoolean(field_1_rgf, value);
234:
235: }
236:
237: /**
238: *
239: * @return the fRotateFont field value.
240: */
241: public boolean isFRotateFont() {
242: return fRotateFont.isSet(field_1_rgf);
243:
244: }
245:
246: /**
247: * Sets the fVertMerge field value.
248: *
249: */
250: public void setFVertMerge(boolean value) {
251: field_1_rgf = (short) fVertMerge.setBoolean(field_1_rgf, value);
252:
253: }
254:
255: /**
256: *
257: * @return the fVertMerge field value.
258: */
259: public boolean isFVertMerge() {
260: return fVertMerge.isSet(field_1_rgf);
261:
262: }
263:
264: /**
265: * Sets the fVertRestart field value.
266: *
267: */
268: public void setFVertRestart(boolean value) {
269: field_1_rgf = (short) fVertRestart.setBoolean(field_1_rgf,
270: value);
271:
272: }
273:
274: /**
275: *
276: * @return the fVertRestart field value.
277: */
278: public boolean isFVertRestart() {
279: return fVertRestart.isSet(field_1_rgf);
280:
281: }
282:
283: /**
284: * Sets the vertAlign field value.
285: *
286: */
287: public void setVertAlign(byte value) {
288: field_1_rgf = (short) vertAlign.setValue(field_1_rgf, value);
289:
290: }
291:
292: /**
293: *
294: * @return the vertAlign field value.
295: */
296: public byte getVertAlign() {
297: return (byte) vertAlign.getValue(field_1_rgf);
298:
299: }
300:
301: } // END OF CLASS
|