Class TextPropCollection
java.lang.Object
org.apache.poi.hslf.model.textproperties.TextPropCollection
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable
,GenericRecord
public class TextPropCollection
extends Object
implements GenericRecord, org.apache.poi.common.Duplicatable
For a given run of characters, holds the properties (which could
be paragraph properties or character properties).
Used to hold the number of characters affected, the list of active
properties, and the indent level if required.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTextPropCollection
(int charactersCovered, TextPropCollection.TextPropType textPropType) Create a new collection of text properties (be they paragraph or character) which will be groked via a subsequent call to buildTextPropList(). -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Add the property at the correct position.final <T extends TextProp>
TaddWithName
(String name) Add the TextProp with this name to the listint
buildTextPropList
(int containsField, byte[] data, int dataOffset) For an existing set of text properties, build the list of properties coded for in a given run of properties.copy()
Clones the given text propertiesboolean
compares most properties apart of the covered characters lengthfinal <T extends TextProp>
TfindByName
(String textPropName) Fetch the TextProp with this name, or null if it isn't presentint
Fetch the number of characters this styling applies toshort
int
Fetch the TextProps that define this styling in the record orderint
hashCode()
final <T extends TextProp>
TremoveByName
(String name) void
setIndentLevel
(short indentLevel) toString()
void
updateTextSize
(int textSize) Update the size of the text that this set of properties applies tovoid
Writes out to disk the header, and then all the propertiesvoid
writeOut
(OutputStream o, boolean isMasterStyle) Writes out to disk the header, and then all the propertiesMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
Constructor Details
-
TextPropCollection
Create a new collection of text properties (be they paragraph or character) which will be groked via a subsequent call to buildTextPropList(). -
TextPropCollection
-
-
Method Details
-
getSpecialMask
public int getSpecialMask() -
getCharactersCovered
public int getCharactersCovered()Fetch the number of characters this styling applies to -
getTextPropList
Fetch the TextProps that define this styling in the record order -
findByName
Fetch the TextProp with this name, or null if it isn't present -
removeByName
-
getTextPropType
-
addWithName
Add the TextProp with this name to the list -
addProp
Add the property at the correct position. Replaces an existing property with the same name.- Parameters:
textProp
- the property to be added
-
buildTextPropList
public int buildTextPropList(int containsField, byte[] data, int dataOffset) For an existing set of text properties, build the list of properties coded for in a given run of properties.- Returns:
- the number of bytes that were used encoding the properties list
-
copy
Clones the given text properties- Specified by:
copy
in interfaceorg.apache.poi.common.Duplicatable
-
updateTextSize
public void updateTextSize(int textSize) Update the size of the text that this set of properties applies to -
writeOut
Writes out to disk the header, and then all the properties- Throws:
IOException
-
writeOut
Writes out to disk the header, and then all the properties- Throws:
IOException
-
getIndentLevel
public short getIndentLevel() -
setIndentLevel
public void setIndentLevel(short indentLevel) -
hashCode
public int hashCode() -
equals
compares most properties apart of the covered characters length -
toString
-
getGenericProperties
- Specified by:
getGenericProperties
in interfaceGenericRecord
-