Class RtfStylesheetList
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.style.RtfStylesheetList
- All Implemented Interfaces:
RtfBasicElement, RtfExtendedElement
The RtfStylesheetList stores the RtfParagraphStyles that are used in the document.
- Version:
- $Id: RtfStylesheetList.java 3580 2008-08-06 15:52:00Z howard_s $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether the default settings have been loaded.private final Map<String, RtfParagraphStyle> The HashMap containing the RtfParagraphStyles.Fields inherited from class RtfElement
document, inHeader, inTableFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new RtfStylesheetList for the RtfDocument. -
Method Summary
Modifier and TypeMethodDescriptiongetRtfParagraphStyle(String styleName) Gets the RtfParagraphStyle with the given name.private voidRegisters all default styles.voidregisterParagraphStyle(RtfParagraphStyle rtfParagraphStyle) Register a RtfParagraphStyle with this RtfStylesheetList.voidwriteContent(OutputStream out) unusedvoidwriteDefinition(OutputStream result) Writes the definition of the stylesheet list.Methods inherited from class RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocumentMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RtfBasicElement
setInHeader, setInTable, setRtfDocument
-
Field Details
-
styleMap
The HashMap containing the RtfParagraphStyles. -
defaultsLoaded
private boolean defaultsLoadedWhether the default settings have been loaded.
-
-
Constructor Details
-
RtfStylesheetList
Constructs a new RtfStylesheetList for the RtfDocument.- Parameters:
doc- The RtfDocument this RtfStylesheetList belongs to.
-
-
Method Details
-
writeContent
unused- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
out- TheOutputStreamto write the content to- Throws:
IOException
-
registerParagraphStyle
Register a RtfParagraphStyle with this RtfStylesheetList.- Parameters:
rtfParagraphStyle- The RtfParagraphStyle to add.
-
registerDefaultStyles
private void registerDefaultStyles()Registers all default styles. If styles with the given name have already been registered, then they are NOT overwritten. -
getRtfParagraphStyle
Gets the RtfParagraphStyle with the given name. Makes sure that the defaults have been loaded.- Parameters:
styleName- The name of the RtfParagraphStyle to get.- Returns:
- The RtfParagraphStyle with the given name or null.
-
writeDefinition
Writes the definition of the stylesheet list.- Specified by:
writeDefinitionin interfaceRtfExtendedElement- Parameters:
result- TheOutputStreamto write the element definition to- Throws:
IOException
-