|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.list.RtfList
public class RtfList
The RtfList stores one List. It also provides the methods to write the list declaration and the list data.
Field Summary | |
---|---|
private ArrayList |
items
The subitems of this RtfList |
private static byte[] |
LIST
Constant for the list |
private static byte[] |
LIST_HYBRID
Constant for the hybrid list |
static byte[] |
LIST_ID
Constant for the list id |
static byte[] |
LIST_LEVEL_NUMBER
Constant for the list level value |
private static byte[] |
LIST_NAME
Constant for the name of this list |
static byte[] |
LIST_NUMBER
Constant for the list number |
static byte[] |
LIST_NUMBER_END
Constant for the old list number end |
private static byte[] |
LIST_RESTARTHDN
Constant to indicate if the list restarts at each section. |
private static byte[] |
LIST_SIMPLE
Constant for the simple list |
private static byte[] |
LIST_STYLEID
Constant for the identifier of the style of this list. |
private static byte[] |
LIST_STYLENAME
Constant for the identifier of the style of this list. |
private static byte[] |
LIST_TEMPLATE_ID
Constant for the list template id |
static byte[] |
LIST_TEXT
Constant for the old list text |
static int |
LIST_TYPE_HYBRID
List type of listhybrid |
static int |
LIST_TYPE_NORMAL
List type of NORMAL - no control word |
static int |
LIST_TYPE_SIMPLE
List type of listsimple |
private int |
listID
The list id |
private ArrayList |
listLevels
The RtfList lists managed by this RtfListTable |
private int |
listNumber
The list number of this RtfList |
private int |
listType
This RtfList type |
private String |
name
The name of the list if it exists |
private RtfList |
parentList
The parent list if there is one. |
static byte[] |
TAB
Constant for a tab character |
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()
Constructs an empty RtfList object. |
|
RtfList(RtfDocument doc)
Constructs an empty RtfList object. |
|
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. |
protected void |
createDefaultLevels()
Create a default set of listlevels |
int |
getID()
Get the list ID number |
RtfListLevel |
getListLevel(int index)
|
int |
getListNumber()
Gets the id of this list |
int |
getListType()
|
String |
getName()
|
RtfList |
getParentList()
|
void |
setDocument(RtfDocument doc)
Set the document. |
void |
setID(int id)
Set the list ID number |
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 |
setListNumber(int listNumber)
Sets the id of this list |
void |
setListType(int listType)
|
void |
setName(String name)
|
void |
setParentList(RtfList parentList)
|
void |
writeContent(OutputStream result)
Writes the content of the RtfList |
void |
writeDefinition(OutputStream result)
Writes the definition part of this list level |
protected void |
writeListNumbers(OutputStream result)
Writes only the list number and list level number. |
protected void |
writeListTextBlock(OutputStream result,
int itemNr,
RtfListLevel listLevel)
|
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 |
Field Detail |
---|
public static final byte[] LIST_NUMBER
private static final byte[] LIST
public static final byte[] LIST_ID
private static final byte[] LIST_TEMPLATE_ID
private static final byte[] LIST_SIMPLE
private static final byte[] LIST_HYBRID
private static final byte[] LIST_RESTARTHDN
private static final byte[] LIST_NAME
private static final byte[] LIST_STYLEID
private static final byte[] LIST_STYLENAME
public static final byte[] LIST_LEVEL_NUMBER
public static final byte[] LIST_TEXT
public static final byte[] LIST_NUMBER_END
public static final byte[] TAB
private ArrayList items
private RtfList parentList
private int listID
public static final int LIST_TYPE_NORMAL
public static final int LIST_TYPE_SIMPLE
public static final int LIST_TYPE_HYBRID
private int listType
private String name
private int listNumber
private ArrayList listLevels
Constructor Detail |
---|
public RtfList()
public RtfList(RtfDocument doc)
doc
- The RtfDocument this RtfList belongs topublic RtfList(RtfDocument doc, List list)
doc
- The RtfDocument this RtfList belongs tolist
- The List this RtfList is based onMethod Detail |
---|
public void setDocument(RtfDocument doc)
doc
- The RtfDocumentpublic void writeDefinition(OutputStream result) throws IOException
writeDefinition
in interface RtfExtendedElement
result
-
IOException
public void writeContent(OutputStream result) throws IOException
writeContent
in interface RtfBasicElement
writeContent
in class RtfElement
result
- The OutputStream
to write the content to
IOException
protected void writeListTextBlock(OutputStream result, int itemNr, RtfListLevel listLevel) throws IOException
result
- itemNr
- listLevel
-
IOException
protected void writeListNumbers(OutputStream result) throws IOException
result
- The OutputStream
to write to
IOException
- On i/o errors.protected void createDefaultLevels()
public int getListNumber()
public void setListNumber(int listNumber)
listNumber
- The list number to set.public void setInTable(boolean inTable)
setInTable
in interface RtfBasicElement
setInTable
in class RtfElement
inTable
- True
if this RtfList is in a table, false
otherwisepublic void setInHeader(boolean inHeader)
setInHeader
in interface RtfBasicElement
setInHeader
in class RtfElement
inHeader
- True
if this RtfList is in a header, false
otherwiseprotected void correctIndentation()
public void setID(int id)
id
- public int getID()
public int getListType()
LIST_TYPE_NORMAL
,
LIST_TYPE_SIMPLE
,
LIST_TYPE_HYBRID
public void setListType(int listType) throws InvalidParameterException
listType
- the listType to set
InvalidParameterException
LIST_TYPE_NORMAL
,
LIST_TYPE_SIMPLE
,
LIST_TYPE_HYBRID
public RtfList getParentList()
public void setParentList(RtfList parentList)
parentList
- the parentList to setpublic String getName()
public void setName(String name)
name
- the name to setpublic RtfListLevel getListLevel(int index)
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |