FileDocCategorySizeDatePackage
MainMaster.javaAPI DocApache Poi 3.0.13487Thu May 31 18:45:28 BST 2007org.apache.poi.hslf.record

MainMaster

public class MainMaster extends SheetContainer
Master slide
author
Yegor Kozlov

Fields Summary
private byte[]
_header
private static long
_type
private SlideAtom
slideAtom
private PPDrawing
ppDrawing
private TxMasterStyleAtom[]
txmasters
private ColorSchemeAtom[]
clrscheme
private ColorSchemeAtom
_colorScheme
Constructors Summary
protected MainMaster(byte[] source, int start, int len)
Set things up, and find our more interesting children

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

		// Find our children
		_children = Record.findChildRecords(source,start+8,len-8);

        ArrayList tx = new ArrayList();
        ArrayList clr = new ArrayList();
		// Find the interesting ones in there
		for(int i=0; i<_children.length; i++) {
			if(_children[i] instanceof SlideAtom) {
				slideAtom = (SlideAtom)_children[i];
			} else if(_children[i] instanceof PPDrawing) {
				ppDrawing = (PPDrawing)_children[i];
            } else if(_children[i] instanceof TxMasterStyleAtom) {
                tx.add(_children[i]);
            } else if(_children[i] instanceof ColorSchemeAtom) {
                clr.add(_children[i]);
			}

            if(ppDrawing != null && _children[i] instanceof ColorSchemeAtom) {
                _colorScheme = (ColorSchemeAtom)_children[i];
            }

		}
        txmasters = (TxMasterStyleAtom[])tx.toArray(new TxMasterStyleAtom[tx.size()]);
        clrscheme = (ColorSchemeAtom[])clr.toArray(new ColorSchemeAtom[clr.size()]);
	
Methods Summary
public org.apache.poi.hslf.record.ColorSchemeAtomgetColorScheme()

        return _colorScheme;
    
public org.apache.poi.hslf.record.ColorSchemeAtom[]getColorSchemeAtoms()

 return clrscheme; 
public org.apache.poi.hslf.record.PPDrawinggetPPDrawing()
Returns the PPDrawing of this Slide, which has all the interesting data in it

 return ppDrawing; 
public longgetRecordType()
We are of type 1016

 return _type; 
public org.apache.poi.hslf.record.SlideAtomgetSlideAtom()
Returns the SlideAtom of this Slide


	      	 
	    return slideAtom; 
public org.apache.poi.hslf.record.TxMasterStyleAtom[]getTxMasterStyleAtoms()

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

		writeOut(_header[0],_header[1],_type,_children,out);