Top Description Fields Constructors Methods
org.apache.poi.ddf

public Class EscherDgRecord

extends EscherRecord
Class Inheritance
Imports
java.util.Map, java.util.function.Supplier, org.apache.poi.util.GenericRecordUtil, .LittleEndian

This record simply holds the number of shapes in the drawing group and the last shape id used for this drawing group.

Field Summary

Modifier and TypeField and Description
private int
private int
public static final short

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public EscherDgRecord
public int
fillFields(byte[]
The byte array containing the serialized escher records.
data
,
int
The offset into the byte array.
offset
,
EscherRecordFactory
A factory for creating new escher records.
recordFactory
)

Implements abstract org.apache.poi.ddf.EscherRecord.fillFields.

The contract of this method is to deserialize an escher record including its children.

public short

Returns:

a drawing group id.
getDrawingGroupId
()

Gets the drawing group id for this record.

public Map<String, Supplier<?>>
public Enum<E extends Enum<E>>
public int

Returns:

the last shape id
getLastMSOSPID
()

The last shape id used in this drawing group.

public int

Returns:

the number of shapes
getNumShapes
()

The number of shapes in this drawing group.

public short
getRecordId()

Overrides org.apache.poi.ddf.EscherRecord.getRecordId.

Return the current record id.

public String
getRecordName()

Implements abstract org.apache.poi.ddf.EscherRecord.getRecordName.

Subclasses should return the short name for this escher record.

public int

Returns:

Number of bytes
getRecordSize
()

Implements abstract org.apache.poi.ddf.EscherRecord.getRecordSize.

Returns the number of bytes that are required to serialize this record.

public void
incrementShapeCount()

Increments the number of shapes

public int
serialize(int
the offset within the byte array
offset
,
byte[]
the data array to serialize to
data
,
EscherSerializationListener
a listener for begin and end serialization events. This is useful because the serialization is hierarchical/recursive and sometimes you need to be able break into that.
listener
)

Implements abstract org.apache.poi.ddf.EscherRecord.serialize.

Serializes the record to an existing byte array.

public void
setLastMSOSPID(int
the last shape id
field_2_lastMSOSPID
)

The last shape id used in this drawing group.

public void
setNumShapes(int
the number of shapes
field_1_numShapes
)

The number of shapes in this drawing group.

Inherited from org.apache.poi.ddf.EscherRecord:
displayfillFieldsgetChildgetChildRecordsgetGenericChildrengetInstancegetOptionsgetVersionisContainerRecordreadHeaderreadInstanceserializeserializesetChildRecordssetInstancesetOptionssetRecordIdsetVersiontoStringtoXmltoXml

Field Detail

field_1_numShapesback to summary
private int field_1_numShapes
field_2_lastMSOSPIDback to summary
private int field_2_lastMSOSPID
RECORD_IDback to summary
public static final short RECORD_ID

Constructor Detail

EscherDgRecordback to summary
public EscherDgRecord()
EscherDgRecordback to summary
public EscherDgRecord(EscherDgRecord other)

Method Detail

copyback to summary
public EscherDgRecord copy()

Implements abstract org.apache.poi.ddf.EscherRecord.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:EscherDgRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
fillFieldsback to summary
public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory)

Implements abstract org.apache.poi.ddf.EscherRecord.fillFields.

Doc from org.apache.poi.ddf.EscherRecord.fillFields.

The contract of this method is to deserialize an escher record including its children.

Parameters
data:byte[]

The byte array containing the serialized escher records.

offset:int

The offset into the byte array.

recordFactory:EscherRecordFactory

A factory for creating new escher records.

Returns:int

The number of bytes written.

Annotations
@Override
getDrawingGroupIdback to summary
public short getDrawingGroupId()

Gets the drawing group id for this record. This is encoded in the instance part of the option record.

Returns:short

a drawing group id.

getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Overrides org.apache.poi.ddf.EscherRecord.getGenericProperties.

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getGenericRecordTypeback to summary
public Enum<E extends Enum<E>> getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Annotations
@Override
getLastMSOSPIDback to summary
public int getLastMSOSPID()

The last shape id used in this drawing group.

Returns:int

the last shape id

getNumShapesback to summary
public int getNumShapes()

The number of shapes in this drawing group.

Returns:int

the number of shapes

getRecordIdback to summary
public short getRecordId()

Overrides org.apache.poi.ddf.EscherRecord.getRecordId.

Doc from org.apache.poi.ddf.EscherRecord.getRecordId.

Return the current record id.

Returns:short

The 16 bit record id.

Annotations
@Override
getRecordNameback to summary
public String getRecordName()

Implements abstract org.apache.poi.ddf.EscherRecord.getRecordName.

Doc from org.apache.poi.ddf.EscherRecord.getRecordName.

Subclasses should return the short name for this escher record.

Returns:String

the short name for this escher record

Annotations
@Override
getRecordSizeback to summary
public int getRecordSize()

Implements abstract org.apache.poi.ddf.EscherRecord.getRecordSize.

Returns the number of bytes that are required to serialize this record.

Returns:int

Number of bytes

Annotations
@Override
incrementShapeCountback to summary
public void incrementShapeCount()

Increments the number of shapes

serializeback to summary
public int serialize(int offset, byte[] data, EscherSerializationListener listener)

Implements abstract org.apache.poi.ddf.EscherRecord.serialize.

Doc from org.apache.poi.ddf.EscherRecord.serialize.

Serializes the record to an existing byte array.

Parameters
offset:int

the offset within the byte array

data:byte[]

the data array to serialize to

listener:EscherSerializationListener

a listener for begin and end serialization events. This is useful because the serialization is hierarchical/recursive and sometimes you need to be able break into that.

Returns:int

the number of bytes written.

Annotations
@Override
setLastMSOSPIDback to summary
public void setLastMSOSPID(int field_2_lastMSOSPID)

The last shape id used in this drawing group.

Parameters
field_2_lastMSOSPID:int

the last shape id

setNumShapesback to summary
public void setNumShapes(int field_1_numShapes)

The number of shapes in this drawing group.

Parameters
field_1_numShapes:int

the number of shapes