Methods Summary |
---|
public int | fillFields(byte[] data, int offset, org.apache.poi.ddf.EscherRecordFactory recordFactory)This method deserializes the record from a byte array.
int bytesRemaining = readHeader( data, offset );
int pos = offset + 8;
int size = 0;
field_1_dx1 = LittleEndian.getInt( data, pos + size );size+=4;
field_2_dy1 = LittleEndian.getInt( data, pos + size );size+=4;
field_3_dx2 = LittleEndian.getInt( data, pos + size );size+=4;
field_4_dy2 = LittleEndian.getInt( data, pos + size );size+=4;
return 8 + size;
|
public int | getDx1()Retrieves offset within the parent coordinate space for the top left point.
return field_1_dx1;
|
public int | getDx2()Retrieves offset within the parent coordinate space for the bottom right point.
return field_3_dx2;
|
public int | getDy1()Gets offset within the parent coordinate space for the top left point.
return field_2_dy1;
|
public int | getDy2()Gets the offset within the parent coordinate space for the bottom right point.
return field_4_dy2;
|
public short | getRecordId()The record id for the EscherChildAnchorRecord.
return RECORD_ID;
|
public java.lang.String | getRecordName()The short name for this record
return "ChildAnchor";
|
public int | getRecordSize()Returns the number of bytes that are required to serialize this record.
return 8 + 4 * 4;
|
public int | serialize(int offset, byte[] data, org.apache.poi.ddf.EscherSerializationListener listener)This method serializes this escher record into a byte array.
listener.beforeRecordSerialize( offset, getRecordId(), this );
int pos = offset;
LittleEndian.putShort( data, pos, getOptions() ); pos += 2;
LittleEndian.putShort( data, pos, getRecordId() ); pos += 2;
LittleEndian.putInt( data, pos, getRecordSize()-8 ); pos += 4;
LittleEndian.putInt( data, pos, field_1_dx1 ); pos += 4;
LittleEndian.putInt( data, pos, field_2_dy1 ); pos += 4;
LittleEndian.putInt( data, pos, field_3_dx2 ); pos += 4;
LittleEndian.putInt( data, pos, field_4_dy2 ); pos += 4;
listener.afterRecordSerialize( pos, getRecordId(), pos - offset, this );
return pos - offset;
|
public void | setDx1(int field_1_dx1)Sets offset within the parent coordinate space for the top left point.
this.field_1_dx1 = field_1_dx1;
|
public void | setDx2(int field_3_dx2)Sets offset within the parent coordinate space for the bottom right point.
this.field_3_dx2 = field_3_dx2;
|
public void | setDy1(int field_2_dy1)Sets offset within the parent coordinate space for the top left point.
this.field_2_dy1 = field_2_dy1;
|
public void | setDy2(int field_4_dy2)Sets the offset within the parent coordinate space for the bottom right point.
this.field_4_dy2 = field_4_dy2;
|
public java.lang.String | toString()The string representation of this record
String nl = System.getProperty("line.separator");
return getClass().getName() + ":" + nl +
" RecordId: 0x" + HexDump.toHex(RECORD_ID) + nl +
" Options: 0x" + HexDump.toHex(getOptions()) + nl +
" X1: " + field_1_dx1 + nl +
" Y1: " + field_2_dy1 + nl +
" X2: " + field_3_dx2 + nl +
" Y2: " + field_4_dy2 + nl ;
|