FileDocCategorySizeDatePackage
OEPlaceholderAtom.javaAPI DocApache Poi 3.0.15342Sun Mar 11 12:59:30 GMT 2007org.apache.poi.hslf.record

OEPlaceholderAtom

public class OEPlaceholderAtom extends RecordAtom
OEPlaceholderAtom (3011).

Atom that describes the placeholder.

author
Yegor Kozlov

Fields Summary
public static final int
PLACEHOLDER_FULLSIZE
public static final int
PLACEHOLDER_HALFSIZE
public static final int
PLACEHOLDER_QUARTSIZE
public static final byte
None
public static final byte
MasterTitle
public static final byte
MasterBody
public static final byte
MasterCenteredTitle
public static final byte
MasterNotesSlideImage
public static final byte
MasterNotesBodyImage
public static final byte
MasterDate
public static final byte
MasterSlideNumber
public static final byte
MasterFooter
public static final byte
MasterHeader
public static final byte
MasterSubtitle
public static final byte
GenericTextObject
public static final byte
Title
public static final byte
Body
public static final byte
NotesBody
public static final byte
CenteredTitle
public static final byte
Subtitle
public static final byte
VerticalTextTitle
public static final byte
VerticalTextBody
public static final byte
NotesSlideImage
public static final byte
Object
public static final byte
Graph
public static final byte
Table
public static final byte
ClipArt
public static final byte
OrganizationChart
public static final byte
MediaClip
private byte[]
_header
private int
placementId
private int
placeholderId
private int
placeholderSize
Constructors Summary
public OEPlaceholderAtom()
Create a new instance of OEPlaceholderAtom



               
     
        _header = new byte[8];
        LittleEndian.putUShort(_header, 0, 0);
        LittleEndian.putUShort(_header, 2, (int)getRecordType());
        LittleEndian.putInt(_header, 4, 8);

        placementId = 0;
        placeholderId = 0;
        placeholderSize = 0;
    
protected OEPlaceholderAtom(byte[] source, int start, int len)
Build an instance of OEPlaceholderAtom from on-disk data

		_header = new byte[8];
		System.arraycopy(source,start,_header,0,8);

        placementId = LittleEndian.getInt(source, start);
        placeholderId = LittleEndian.getUnsignedByte(source, start+4);
        placeholderSize = LittleEndian.getUnsignedByte(source, start+5);
	
Methods Summary
public intgetPlaceholderId()
Returns the placeholder Id.

return
the placeholder Id.

        return placeholderId;
    
public intgetPlaceholderSize()
Returns the placeholder size. Must be one of the PLACEHOLDER_* static constants defined in this class.

return
the placeholder size.

        return placeholderSize;
    
public intgetPlacementId()
Returns the placement Id.

return
the placement Id.

        return placementId;
    
public longgetRecordType()

return
type of this record {@link RecordTypes#OEPlaceholderAtom}.

 return RecordTypes.OEPlaceholderAtom.typeID; 
public voidsetPlaceholderId(byte id)
Sets the placeholder Id.

param
id the placeholder Id.

        placeholderId = id;
    
public voidsetPlaceholderSize(byte size)
Sets the placeholder size. Must be one of the PLACEHOLDER_* static constants defined in this class.

param
size the placeholder size.

        placeholderSize = size;
    
public voidsetPlacementId(int id)
Sets the placement Id.

param
id the placement Id.

        placementId = id;
    
public voidwriteOut(java.io.OutputStream out)
Write the contents of the record back, so it can be written to disk

		out.write(_header);

        byte[] recdata = new byte[8];
        LittleEndian.putInt(recdata, 0, placementId);
        recdata[4] = (byte)placeholderId;
        recdata[5] = (byte)placeholderSize;

        out.write(recdata);