org.apache.fop.render.rtf.rtflib.rtfdoc

Class RtfListItem

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
Authors:
Bertrand Delacretaz bdelacretaz@codeconsult.ch
Andreas Putz a.putz@skynamics.com

Nested Class Summary

class
RtfListItem.RtfListItemLabel
special RtfTextrun that is used as list item label

Field Summary

Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement

attrib, parent, writer

Method Summary

int
getNumber()
Returns the list number
RtfList
getParentList()
Get the parent list.
RtfListStyle
getRtfListStyle()
Get list style
RtfTextrun
getTextrun()
Get the current textrun.
RtfList
newList(RtfAttributes attrs)
Start a new list after closing current paragraph, list and table
RtfParagraph
newParagraph()
Close current paragraph if any and start a new one with default attributes
RtfParagraph
newParagraph(RtfAttributes attrs)
Close current paragraph if any and start a new one
void
setRtfListStyle(RtfListStyle ls)
Change list style
protected void
writeRtfPrefix()
Overridden to setup the list: start a group with appropriate attributes
protected void
writeRtfSuffix()
End the list group

Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer

addChild, getChildCount, getChildren, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent

Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement

close, getRtfAttributes, isEmpty, newLine, okToWriteRtf, toString, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeRtfContent, writeRtfPrefix, writeRtfSuffix, writeStarControlWord, writeStarControlWordNS

Method Details

getNumber

public int getNumber()
Returns the list number
Returns:
list number

getParentList

public RtfList getParentList()
Get the parent list.
Returns:
the parent list

getRtfListStyle

public RtfListStyle getRtfListStyle()
Get list style
Returns:
ListSytle of the List

getTextrun

public RtfTextrun getTextrun()
            throws IOException
Get the current textrun.
Specified by:
getTextrun in interface IRtfTextrunContainer
Returns:
current RtfTextrun object

newList

public RtfList newList(RtfAttributes attrs)
            throws IOException
Start a new list after closing current paragraph, list and table
Specified by:
newList in interface IRtfListContainer
Parameters:
attrs - attributes of new RftList object
Returns:
new RtfList

newParagraph

public RtfParagraph newParagraph()
            throws IOException
Close current paragraph if any and start a new one with default attributes
Specified by:
newParagraph in interface IRtfParagraphContainer
Returns:
new RtfParagraph

newParagraph

public RtfParagraph newParagraph(RtfAttributes attrs)
            throws IOException
Close current paragraph if any and start a new one
Specified by:
newParagraph in interface IRtfParagraphContainer
Parameters:
attrs - attributes of new paragraph
Returns:
new RtfParagraph

setRtfListStyle

public void setRtfListStyle(RtfListStyle ls)
Change list style
Parameters:
ls - ListStyle to set

writeRtfPrefix

protected void writeRtfPrefix()
            throws IOException
Overridden to setup the list: start a group with appropriate attributes
Overrides:
writeRtfPrefix in interface RtfElement

writeRtfSuffix

protected void writeRtfSuffix()
            throws IOException
End the list group
Overrides:
writeRtfSuffix in interface RtfElement

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.