Package loci.poi.ddf
Class EscherClientAnchorRecord
java.lang.Object
loci.poi.ddf.EscherRecord
loci.poi.ddf.EscherClientAnchorRecord
The escher client anchor specifies which rows and cells the shape is bound to as well as
the offsets within those cells. Each cell is 1024 units wide by 256 units long regardless
of the actual size of the cell. The EscherClientAnchorRecord only applies to the top-most
shapes. Shapes contained in groups are bound using the EscherChildAnchorRecords.
- Author:
- Glen Stampoultzis
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfillFields(byte[] data, int offset, EscherRecordFactory recordFactory) This method deserializes the record from a byte array.shortgetCol1()The column number for the top-left position.shortgetCol2()The column of the bottom right corner of this shape.shortgetDx1()The x offset within the top-left cell.shortgetDx2()The x offset withing the cell for the bottom-right corner of this shape.shortgetDy1()The y offset within the top-left corner of the current shape.shortgetDy2()The y offset withing the cell for the bottom-right corner of this shape.shortgetFlag()0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.shortThe record id for this record.The short name for this recordintReturns the number of bytes that are required to serialize this record.byte[]Any remaining data in the recordshortgetRow1()The row number for the top-left corner of the shape.shortgetRow2()The row number for the bottom-right corner of the current shape.intserialize(int offset, byte[] data, EscherSerializationListener listener) This method serializes this escher record into a byte array.voidsetCol1(short field_2_col1) The column number for the top-left position.voidsetCol2(short field_6_col2) The column of the bottom right corner of this shape.voidsetDx1(short field_3_dx1) The x offset within the top-left cell.voidsetDx2(short field_7_dx2) The x offset withing the cell for the bottom-right corner of this shape.voidsetDy1(short field_5_dy1) The y offset within the top-left corner of the current shape.voidsetDy2(short field_9_dy2) The y offset withing the cell for the bottom-right corner of this shape.voidsetFlag(short field_1_flag) 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.voidsetRemainingData(byte[] remainingData) Any remaining data in the recordvoidsetRow1(short field_4_row1) The row number for the top-left corner of the shape.voidsetRow2(short field_8_row2) The row number for the bottom-right corner of the current shape.toString()Returns the string representation for this record.Methods inherited from class loci.poi.ddf.EscherRecord
clone, display, fillFields, getChild, getChildRecords, getInstance, getOptions, isContainerRecord, readHeader, serialize, serialize, setChildRecords, setOptions, setRecordId
-
Field Details
-
RECORD_ID
public static final short RECORD_ID- See Also:
-
RECORD_DESCRIPTION
- See Also:
-
-
Constructor Details
-
EscherClientAnchorRecord
public EscherClientAnchorRecord()
-
-
Method Details
-
fillFields
This method deserializes the record from a byte array.- Specified by:
fillFieldsin classEscherRecord- Parameters:
data- The byte array containing the escher record informationoffset- The starting offset intodata.recordFactory- May be null since this is not a container record.- Returns:
- The number of bytes read from the byte array.
-
serialize
This method serializes this escher record into a byte array.- Specified by:
serializein classEscherRecord- Parameters:
offset- The offset intodatato start writing the record data to.data- The byte array to serialize to.listener- A listener to retrieve start and end callbacks. Use aNullEscherSerailizationListenerto ignore these events.- Returns:
- The number of bytes written.
- See Also:
-
getRecordSize
public int getRecordSize()Returns the number of bytes that are required to serialize this record.- Specified by:
getRecordSizein classEscherRecord- Returns:
- Number of bytes
-
getRecordId
public short getRecordId()The record id for this record.- Overrides:
getRecordIdin classEscherRecord- Returns:
- The 16 bit record id.
-
getRecordName
The short name for this record- Specified by:
getRecordNamein classEscherRecord
-
toString
Returns the string representation for this record. -
getFlag
public short getFlag()0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. -
setFlag
public void setFlag(short field_1_flag) 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. -
getCol1
public short getCol1()The column number for the top-left position. 0 based. -
setCol1
public void setCol1(short field_2_col1) The column number for the top-left position. 0 based. -
getDx1
public short getDx1()The x offset within the top-left cell. Range is from 0 to 1023. -
setDx1
public void setDx1(short field_3_dx1) The x offset within the top-left cell. Range is from 0 to 1023. -
getRow1
public short getRow1()The row number for the top-left corner of the shape. -
setRow1
public void setRow1(short field_4_row1) The row number for the top-left corner of the shape. -
getDy1
public short getDy1()The y offset within the top-left corner of the current shape. -
setDy1
public void setDy1(short field_5_dy1) The y offset within the top-left corner of the current shape. -
getCol2
public short getCol2()The column of the bottom right corner of this shape. -
setCol2
public void setCol2(short field_6_col2) The column of the bottom right corner of this shape. -
getDx2
public short getDx2()The x offset withing the cell for the bottom-right corner of this shape. -
setDx2
public void setDx2(short field_7_dx2) The x offset withing the cell for the bottom-right corner of this shape. -
getRow2
public short getRow2()The row number for the bottom-right corner of the current shape. -
setRow2
public void setRow2(short field_8_row2) The row number for the bottom-right corner of the current shape. -
getDy2
public short getDy2()The y offset withing the cell for the bottom-right corner of this shape. -
setDy2
public void setDy2(short field_9_dy2) The y offset withing the cell for the bottom-right corner of this shape. -
getRemainingData
public byte[] getRemainingData()Any remaining data in the record -
setRemainingData
public void setRemainingData(byte[] remainingData) Any remaining data in the record
-