FileDocCategorySizeDatePackage
TableCellDescriptor.javaAPI DocApache Poi 3.0.12779Mon Jan 01 18:55:22 GMT 2007org.apache.poi.hdf.model.hdftypes

TableCellDescriptor

public class TableCellDescriptor extends TCAbstractType implements HDFType
Comment me
author
Ryan Ackley

Fields Summary
Constructors Summary
public TableCellDescriptor()

  
Methods Summary
static org.apache.poi.hdf.model.hdftypes.TableCellDescriptorconvertBytesToTC(byte[] array, int offset)

    TableCellDescriptor tc = new TableCellDescriptor();
    int rgf = LittleEndian.getShort(array, offset);
    tc.setFFirstMerged((rgf & 0x0001) > 0);
    tc.setFMerged((rgf & 0x0002) > 0);
    tc.setFVertical((rgf & 0x0004) > 0);
    tc.setFBackward((rgf & 0x0008) > 0);
    tc.setFRotateFont((rgf & 0x0010) > 0);
    tc.setFVertMerge((rgf & 0x0020) > 0);
    tc.setFVertRestart((rgf & 0x0040) > 0);
    tc.setVertAlign((byte)((rgf & 0x0180) >> 7));

    short[] brcTop = new short[2];
    short[] brcLeft = new short[2];
    short[] brcBottom = new short[2];
    short[] brcRight = new short[2];

    brcTop[0] = LittleEndian.getShort(array, offset + 4);
    brcTop[1] = LittleEndian.getShort(array, offset + 6);

    brcLeft[0] = LittleEndian.getShort(array, offset + 8);
    brcLeft[1] = LittleEndian.getShort(array, offset + 10);

    brcBottom[0] = LittleEndian.getShort(array, offset + 12);
    brcBottom[1] = LittleEndian.getShort(array, offset + 14);

    brcRight[0] = LittleEndian.getShort(array, offset + 16);
    brcRight[1] = LittleEndian.getShort(array, offset + 18);

    return tc;