org.apache.poi.hslf.record
Class TxMasterStyleAtom

java.lang.Object
  extended by org.apache.poi.hslf.record.Record
      extended by org.apache.poi.hslf.record.RecordAtom
          extended by org.apache.poi.hslf.record.TxMasterStyleAtom

public final class TxMasterStyleAtom
extends RecordAtom

TxMasterStyleAtom atom (4003).

Stores default character and paragraph styles. The atom instance value is the text type and is encoded like the txstyle field in TextHeaderAtom. The text styles are located in the MainMaster container, except for the "other" style, which is in the Document.Environment container.

This atom can store up to 5 pairs of paragraph+character styles, each pair describes an indent level. The first pair describes first-level paragraph with no indentation.

Author:
Yegor Kozlov

Field Summary
 
Fields inherited from class org.apache.poi.hslf.record.Record
logger
 
Constructor Summary
protected TxMasterStyleAtom(byte[] source, int start, int len)
           
 
Method Summary
protected  TextProp[] getCharacterProps(int type, int level)
          Character properties for the specified text type and indent level.
 TextPropCollection[] getCharacterStyles()
          Returns array of character styles defined in this record.
protected  TextProp[] getParagraphProps(int type, int level)
          Paragraph properties for the specified text type and indent level Depending on the level and type, it may be our special ones, or the standard StyleTextPropAtom ones
 TextPropCollection[] getParagraphStyles()
          Returns array of paragraph styles defined in this record.
 long getRecordType()
          We are of type 4003
 int getTextType()
          Return type of the text.
protected  void init()
          parse the record data and initialize styles
 void writeOut(java.io.OutputStream out)
          Write the contents of the record back, so it can be written to disk
 
Methods inherited from class org.apache.poi.hslf.record.RecordAtom
getChildRecords, isAnAtom
 
Methods inherited from class org.apache.poi.hslf.record.Record
buildRecordAtOffset, createRecordForType, findChildRecords, writeLittleEndian, writeLittleEndian
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TxMasterStyleAtom

protected TxMasterStyleAtom(byte[] source,
                            int start,
                            int len)
Method Detail

getRecordType

public long getRecordType()
We are of type 4003

Specified by:
getRecordType in class Record
Returns:
type of this record
See Also:
RecordTypes.TxMasterStyleAtom

writeOut

public void writeOut(java.io.OutputStream out)
              throws java.io.IOException
Write the contents of the record back, so it can be written to disk

Specified by:
writeOut in class Record
Throws:
java.io.IOException

getCharacterStyles

public TextPropCollection[] getCharacterStyles()
Returns array of character styles defined in this record.

Returns:
character styles defined in this record

getParagraphStyles

public TextPropCollection[] getParagraphStyles()
Returns array of paragraph styles defined in this record.

Returns:
paragraph styles defined in this record

getTextType

public int getTextType()
Return type of the text. Must be a constant defined in TextHeaderAtom

Returns:
type of the text
See Also:
TextHeaderAtom

init

protected void init()
parse the record data and initialize styles


getParagraphProps

protected TextProp[] getParagraphProps(int type,
                                       int level)
Paragraph properties for the specified text type and indent level Depending on the level and type, it may be our special ones, or the standard StyleTextPropAtom ones


getCharacterProps

protected TextProp[] getCharacterProps(int type,
                                       int level)
Character properties for the specified text type and indent level. Depending on the level and type, it may be our special ones, or the standard StyleTextPropAtom ones



Copyright 2012 The Apache Software Foundation or its licensors, as applicable.