FileDocCategorySizeDatePackage
EscherProperty.javaAPI DocApache Poi 3.0.12906Mon Jan 01 12:39:40 GMT 2007org.apache.poi.ddf

EscherProperty

public abstract class EscherProperty extends Object
This is the abstract base class for all escher properties.
see
EscherOptRecord
author
Glen Stampoultzis (glens at apache.org)

Fields Summary
protected short
id
Constructors Summary
public EscherProperty(short id)
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.

        this.id   = id;
    
public EscherProperty(short propertyNumber, boolean isComplex, boolean isBlipId)
Constructs a new escher property. The three parameters are combined to form a property id.

        this.id   = (short)(propertyNumber +
                (isComplex ? 0x8000 : 0x0) +
                (isBlipId ? 0x4000 : 0x0));
    
Methods Summary
public shortgetId()

        return id;
    
public java.lang.StringgetName()

        return EscherProperties.getPropertyName(id);
    
public shortgetPropertyNumber()

        return (short) ( id & (short) 0x3FFF );
    
public intgetPropertySize()
Most properties are just 6 bytes in length. Override this if we're dealing with complex properties.

        return 6;
    
public booleanisBlipId()

        return ( id & (short) 0x4000 ) != 0;
    
public booleanisComplex()

        return ( id & (short) 0x8000 ) != 0;
    
public abstract intserializeComplexPart(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.

public abstract intserializeSimplePart(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.