Class RtfListItem
java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfListItem
- All Implemented Interfaces:
IRtfListContainer
,IRtfParagraphContainer
,IRtfTextrunContainer
public class RtfListItem
extends RtfContainer
implements IRtfTextrunContainer, IRtfListContainer, IRtfParagraphContainer
Model of an RTF list item, which can contain RTF paragraphs.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch) and Andreas Putz (a.putz@skynamics.com).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
special RtfTextrun that is used as list item labelprivate class
special RtfParagraph that writes list item setup code before its content -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RtfListStyle
private int
private RtfParagraph
private RtfList
Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
attrib, parent, writer
-
Constructor Summary
ConstructorsConstructorDescriptionRtfListItem
(RtfList parent, Writer w) Create an RTF list item as a child of given container with default attributesRtfListItem
(RtfList parent, Writer w, RtfAttributes attr) Create an RTF list item as a child of given container with given attributes -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the list numberGet the parent list.Get list styleGet the current textrun.newList
(RtfAttributes attrs) Start a new list after closing current paragraph, list and tableClose current paragraph if any and start a new one with default attributesnewParagraph
(RtfAttributes attrs) Close current paragraph if any and start a new onevoid
Change list styleprotected void
Overridden to setup the list: start a group with appropriate attributesprotected void
End the list groupMethods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
addChild, containsText, dump, findChildren, getChildCount, getChildren, getOptions, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
-
Field Details
-
parentList
-
paragraph
-
listStyle
-
number
private int number
-
-
Constructor Details
-
RtfListItem
RtfListItem(RtfList parent, Writer w) throws IOException Create an RTF list item as a child of given container with default attributes- Throws:
IOException
-
RtfListItem
RtfListItem(RtfList parent, Writer w, RtfAttributes attr) throws IOException Create an RTF list item as a child of given container with given attributes- Throws:
IOException
-
-
Method Details
-
newParagraph
Close current paragraph if any and start a new one- Specified by:
newParagraph
in interfaceIRtfParagraphContainer
- Parameters:
attrs
- attributes of new paragraph- Returns:
- new RtfParagraph
- Throws:
IOException
- Thrown when an IO-problem occurs
-
newParagraph
Close current paragraph if any and start a new one with default attributes- Specified by:
newParagraph
in interfaceIRtfParagraphContainer
- Returns:
- new RtfParagraph
- Throws:
IOException
- Thrown when an IO-problem occurs
-
getTextrun
Get the current textrun.- Specified by:
getTextrun
in interfaceIRtfTextrunContainer
- Returns:
- current RtfTextrun object
- Throws:
IOException
- Thrown when an IO-problem occurs
-
newList
Start a new list after closing current paragraph, list and table- Specified by:
newList
in interfaceIRtfListContainer
- Parameters:
attrs
- attributes of new RftList object- Returns:
- new RtfList
- Throws:
IOException
- for I/O problems
-
writeRtfPrefix
Overridden to setup the list: start a group with appropriate attributes- Overrides:
writeRtfPrefix
in classRtfElement
- Throws:
IOException
- for I/O problems
-
writeRtfSuffix
End the list group- Overrides:
writeRtfSuffix
in classRtfElement
- Throws:
IOException
- for I/O problems
-
setRtfListStyle
Change list style- Parameters:
ls
- ListStyle to set
-
getRtfListStyle
Get list style- Returns:
- ListSytle of the List
-
getParentList
Get the parent list.- Returns:
- the parent list
-
getNumber
public int getNumber()Returns the list number- Returns:
- list number
-