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 Classes Modifier and Type Class Description class
RtfListItem.RtfListItemLabel
special RtfTextrun that is used as list item labelprivate class
RtfListItem.RtfListItemParagraph
special RtfParagraph that writes list item setup code before its content
-
Field Summary
Fields Modifier and Type Field Description private RtfListStyle
listStyle
private int
number
private RtfParagraph
paragraph
private RtfList
parentList
-
Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
attrib, parent, writer
-
-
Constructor Summary
Constructors Constructor Description RtfListItem(RtfList parent, java.io.Writer w)
Create an RTF list item as a child of given container with default attributesRtfListItem(RtfList parent, java.io.Writer w, RtfAttributes attr)
Create an RTF list item as a child of given container with given attributes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumber()
Returns the list numberRtfList
getParentList()
Get the parent list.RtfListStyle
getRtfListStyle()
Get list styleRtfTextrun
getTextrun()
Get the current textrun.RtfList
newList(RtfAttributes attrs)
Start a new list after closing current paragraph, list and tableRtfParagraph
newParagraph()
Close current paragraph if any and start a new one with default attributesRtfParagraph
newParagraph(RtfAttributes attrs)
Close current paragraph if any and start a new onevoid
setRtfListStyle(RtfListStyle ls)
Change list styleprotected void
writeRtfPrefix()
Overridden to setup the list: start a group with appropriate attributesprotected void
writeRtfSuffix()
End the list group-
Methods 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 Detail
-
parentList
private RtfList parentList
-
paragraph
private RtfParagraph paragraph
-
listStyle
private RtfListStyle listStyle
-
number
private int number
-
-
Constructor Detail
-
RtfListItem
RtfListItem(RtfList parent, java.io.Writer w) throws java.io.IOException
Create an RTF list item as a child of given container with default attributes- Throws:
java.io.IOException
-
RtfListItem
RtfListItem(RtfList parent, java.io.Writer w, RtfAttributes attr) throws java.io.IOException
Create an RTF list item as a child of given container with given attributes- Throws:
java.io.IOException
-
-
Method Detail
-
newParagraph
public RtfParagraph newParagraph(RtfAttributes attrs) throws java.io.IOException
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:
java.io.IOException
- Thrown when an IO-problem occurs
-
newParagraph
public RtfParagraph newParagraph() throws java.io.IOException
Close current paragraph if any and start a new one with default attributes- Specified by:
newParagraph
in interfaceIRtfParagraphContainer
- Returns:
- new RtfParagraph
- Throws:
java.io.IOException
- Thrown when an IO-problem occurs
-
getTextrun
public RtfTextrun getTextrun() throws java.io.IOException
Get the current textrun.- Specified by:
getTextrun
in interfaceIRtfTextrunContainer
- Returns:
- current RtfTextrun object
- Throws:
java.io.IOException
- Thrown when an IO-problem occurs
-
newList
public RtfList newList(RtfAttributes attrs) throws java.io.IOException
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:
java.io.IOException
- for I/O problems
-
writeRtfPrefix
protected void writeRtfPrefix() throws java.io.IOException
Overridden to setup the list: start a group with appropriate attributes- Overrides:
writeRtfPrefix
in classRtfElement
- Throws:
java.io.IOException
- for I/O problems
-
writeRtfSuffix
protected void writeRtfSuffix() throws java.io.IOException
End the list group- Overrides:
writeRtfSuffix
in classRtfElement
- Throws:
java.io.IOException
- for I/O problems
-
setRtfListStyle
public void setRtfListStyle(RtfListStyle ls)
Change list style- Parameters:
ls
- ListStyle to set
-
getRtfListStyle
public RtfListStyle getRtfListStyle()
Get list style- Returns:
- ListSytle of the List
-
getParentList
public RtfList getParentList()
Get the parent list.- Returns:
- the parent list
-
getNumber
public int getNumber()
Returns the list number- Returns:
- list number
-
-