Package org.apache.poi.ddf
Class EscherSimpleProperty
- java.lang.Object
-
- org.apache.poi.ddf.EscherProperty
-
- org.apache.poi.ddf.EscherSimpleProperty
-
- All Implemented Interfaces:
GenericRecord
- Direct Known Subclasses:
EscherBoolProperty
,EscherRGBProperty
,EscherShapePathProperty
public class EscherSimpleProperty extends EscherProperty
A simple property is of fixed length and as a property number in addition to a 32-bit value. Properties that can't be stored in only 32-bits are stored as EscherComplexProperty objects.
-
-
Constructor Summary
Constructors Constructor Description EscherSimpleProperty(short propertyNumber, boolean isComplex, boolean isBlipId, int propertyValue)
Constructs a new escher property.EscherSimpleProperty(short id, int propertyValue)
The id is distinct from the actual property number.EscherSimpleProperty(EscherPropertyTypes type, boolean isComplex, boolean isBlipId, int propertyValue)
Constructs a new escher property.EscherSimpleProperty(EscherPropertyTypes type, int propertyValue)
The id is distinct from the actual property number.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Returns true if one escher property is equal to another.Map<String,Supplier<?>>
getGenericProperties()
int
getPropertyValue()
int
hashCode()
Returns a hashcode so that this object can be stored in collections that require the use of such things.int
serializeComplexPart(byte[] data, int pos)
Escher properties consist of a simple fixed length part and a complex variable length part.int
serializeSimplePart(byte[] data, int offset)
Serialize the simple part of the escher record.-
Methods inherited from class org.apache.poi.ddf.EscherProperty
getGenericChildren, getGenericRecordType, getId, getName, getPropertyNumber, getPropertySize, isBlipId, isComplex, toString, toXml
-
-
-
-
Constructor Detail
-
EscherSimpleProperty
public EscherSimpleProperty(short id, int propertyValue)
The id is distinct from the actual property number. The id includes the property number the blip id flag and an indicator whether the property is complex or not.- Parameters:
id
- the property idpropertyValue
- the property value
-
EscherSimpleProperty
public EscherSimpleProperty(EscherPropertyTypes type, int propertyValue)
The id is distinct from the actual property number. The id includes the property number the blip id flag and an indicator whether the property is complex or not.- Parameters:
type
- the property typepropertyValue
- the property value
-
EscherSimpleProperty
public EscherSimpleProperty(short propertyNumber, boolean isComplex, boolean isBlipId, int propertyValue)
Constructs a new escher property. The three parameters are combined to form a property id.- Parameters:
propertyNumber
- the property numberisComplex
- true, if its a complex propertyisBlipId
- true, if its a blippropertyValue
- the property value
-
EscherSimpleProperty
public EscherSimpleProperty(EscherPropertyTypes type, boolean isComplex, boolean isBlipId, int propertyValue)
Constructs a new escher property. The three parameters are combined to form a property id.- Parameters:
type
- one of the defined property typesisComplex
- true, if its a complex propertyisBlipId
- true, if its a blippropertyValue
- the property value
-
-
Method Detail
-
serializeSimplePart
public int serializeSimplePart(byte[] data, int offset)
Serialize the simple part of the escher record.- Specified by:
serializeSimplePart
in classEscherProperty
- Parameters:
data
- the buffer to write tooffset
- the starting position- Returns:
- the number of bytes serialized.
-
serializeComplexPart
public int serializeComplexPart(byte[] data, int pos)
Escher properties consist of a simple fixed length part and a complex variable length part. The fixed length part is serialized first.- Specified by:
serializeComplexPart
in classEscherProperty
- Parameters:
data
- the buffer to write topos
- the starting position- Returns:
- the length of the part
-
getPropertyValue
public int getPropertyValue()
- Returns:
- Return the 32 bit value of this property.
-
equals
public boolean equals(Object o)
Returns true if one escher property is equal to another.
-
hashCode
public int hashCode()
Returns a hashcode so that this object can be stored in collections that require the use of such things.
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericProperties
in interfaceGenericRecord
- Overrides:
getGenericProperties
in classEscherProperty
-
-