com.lowagie.text.rtf.list
Class RtfList

java.lang.Object
  extended by com.lowagie.text.rtf.RtfElement
      extended by com.lowagie.text.rtf.list.RtfList
All Implemented Interfaces:
RtfBasicElement, RtfExtendedElement

public class RtfList
extends RtfElement
implements RtfExtendedElement

The RtfList stores one List. It also provides the methods to write the list declaration and the list data.

Version:
$Version:$
Author:
Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
 
Fields inherited from class com.lowagie.text.rtf.RtfElement
document, inHeader, inTable
 
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
 
Constructor Summary
RtfList(RtfDocument doc, List list)
          Constructs a new RtfList for the specified List.
 
Method Summary
protected  void correctIndentation()
          Correct the indentation of this RtfList by adding left/first line indentation from the parent RtfList.
 int getListLevel()
          Gets the list level of this RtfList
 int getListNumber()
          Gets the id of this list
 void setInHeader(boolean inHeader)
          Sets whether this RtfList is in a header.
 void setInTable(boolean inTable)
          Sets whether this RtfList is in a table.
 void setListLevel(int listLevel)
          Sets the list level of this RtfList.
 void setListNumber(int listNumber)
          Sets the id of this list
protected  void setParent(RtfList parent)
          Sets the parent RtfList of this RtfList
 byte[] write()
          Writes the content of the RtfList
 byte[] writeDefinition()
          Writes the definition part of this list level
protected  byte[] writeListBeginning()
          Writes the initialisation part of the RtfList
protected  byte[] writeListNumbers()
          Writes only the list number and list level number.
 
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setRtfDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.lowagie.text.rtf.RtfBasicElement
setRtfDocument
 

Constructor Detail

RtfList

public RtfList(RtfDocument doc,
               List list)
Constructs a new RtfList for the specified List.

Parameters:
doc - The RtfDocument this RtfList belongs to
list - The List this RtfList is based on
Method Detail

writeDefinition

public byte[] writeDefinition()
Writes the definition part of this list level

Specified by:
writeDefinition in interface RtfExtendedElement
Returns:
A byte array containing the definition of this list level

writeListBeginning

protected byte[] writeListBeginning()
Writes the initialisation part of the RtfList

Returns:
A byte array containing the initialisation part

writeListNumbers

protected byte[] writeListNumbers()
Writes only the list number and list level number.

Returns:
The list number and list level number of this RtfList.

write

public byte[] write()
Writes the content of the RtfList

Specified by:
write in interface RtfBasicElement
Overrides:
write in class RtfElement
Returns:
A byte array containing the actual content of the RtfList

getListLevel

public int getListLevel()
Gets the list level of this RtfList

Returns:
Returns the list level.

setListLevel

public void setListLevel(int listLevel)
Sets the list level of this RtfList. A list level > 0 will unregister this RtfList from the RtfListTable

Parameters:
listLevel - The list level to set.

setParent

protected void setParent(RtfList parent)
Sets the parent RtfList of this RtfList

Parameters:
parent - The parent RtfList to use.

getListNumber

public int getListNumber()
Gets the id of this list

Returns:
Returns the list number.

setListNumber

public void setListNumber(int listNumber)
Sets the id of this list

Parameters:
listNumber - The list number to set.

setInTable

public void setInTable(boolean inTable)
Sets whether this RtfList is in a table. Sets the correct inTable setting for all child elements.

Specified by:
setInTable in interface RtfBasicElement
Overrides:
setInTable in class RtfElement
Parameters:
inTable - True if this RtfList is in a table, false otherwise

setInHeader

public void setInHeader(boolean inHeader)
Sets whether this RtfList is in a header. Sets the correct inTable setting for all child elements.

Specified by:
setInHeader in interface RtfBasicElement
Overrides:
setInHeader in class RtfElement
Parameters:
inHeader - True if this RtfList is in a header, false otherwise

correctIndentation

protected void correctIndentation()
Correct the indentation of this RtfList by adding left/first line indentation from the parent RtfList. Also calls correctIndentation on all child RtfLists.



Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.