Package com.lowagie.text.rtf.list
Class RtfListLevel
- java.lang.Object
-
- com.lowagie.text.rtf.RtfElement
-
- com.lowagie.text.rtf.list.RtfListLevel
-
- All Implemented Interfaces:
RtfBasicElement,RtfExtendedElement,RtfElementInterface
public class RtfListLevel extends RtfElement implements RtfExtendedElement
The RtfListLevel is a listlevel object in a list.- Since:
- 2.1.3
- Version:
- $Id: RtfListLevel.java 3580 2008-08-06 15:52:00Z howard_s $
- Author:
- Howard Shank (hgshank@yahoo.com)
-
-
Field Summary
Fields Modifier and Type Field Description private intalignmentThe alignment of this RtfListprivate java.lang.StringbulletCharacterThe text to use as the bullet characterprivate ChunkbulletChunkprivate intfirstIndentThe first indentation of this RtfListprivate RtfFontfontBulletThe RtfFont for bulleted listsprivate RtfFontfontNumberThe RtfFont for numbered listsprivate booleanisLegalFlag to indicate if the levellegal control word should be emitted.private booleanisTentativeFlag to indicate if the tentative control word should be emitted.private intleftIndentThe left indentation of this RtfListprivate intlevelFollowValueprivate intlevelPictureWhich picture bullet from the \listpicture destination should be appliedprivate intlevelTextNumberprivate static byte[]LIST_LEVELConstant for list levelprivate static byte[]LIST_LEVEL_ALIGNMENTConstant for list level alignment oldprivate static byte[]LIST_LEVEL_ALIGNMENT_NEWConstant for list level alignment newprivate static byte[]LIST_LEVEL_FIRST_INDENTConstant for the first indentationstatic intLIST_LEVEL_FOLLOW_NOTHINGstatic intLIST_LEVEL_FOLLOW_SPACEstatic intLIST_LEVEL_FOLLOW_TABprivate static byte[]LIST_LEVEL_FOLOWConstant which specifies which character follows the level textprivate static byte[]LIST_LEVEL_INDENTConstant which specifies the levelindent control wordprivate static byte[]LIST_LEVEL_LEGALConstant which specifies (1) if list numbers from previous levels should be converted to Arabic numbers; (0) if they should be left with the format specified by their own level's definition.private static byte[]LIST_LEVEL_NO_RESTARTConstant which specifies (1) if this level does/does not restart its count each time a super ordinate level is incremented (0) if this level does not restart its count each time a super ordinate level is incremented.private static byte[]LIST_LEVEL_NUMBERS_BEGINConstant for the beginning of the list level numbersprivate static byte[]LIST_LEVEL_NUMBERS_ENDConstant for the end of the list level numbersprivate static byte[]LIST_LEVEL_NUMBERS_NUMBEREDConstant for the list level numbersprivate static byte[]LIST_LEVEL_PICTUREConstant for the levelpictureN control wordprivate static byte[]LIST_LEVEL_SPACEConstant which specifies the levelspace controlwordprivate static byte[]LIST_LEVEL_START_ATConstant for list level start atprivate static byte[]LIST_LEVEL_STYLE_BULLETED_BEGINConstant for the beginning of the list level bulleted styleprivate static byte[]LIST_LEVEL_STYLE_BULLETED_ENDConstant for the end of the list level bulleted styleprivate static byte[]LIST_LEVEL_STYLE_NUMBERED_BEGINConstant for the beginning of the list level numbered styleprivate static byte[]LIST_LEVEL_STYLE_NUMBERED_ENDConstant for the end of the list level numbered styleprivate static byte[]LIST_LEVEL_SYMBOL_INDENTConstant for the symbol indentationprivate static byte[]LIST_LEVEL_TEMPLATE_IDConstant for list levelprivate static byte[]LIST_LEVEL_TENTATIVEConstant for the lvltentative control wordprivate static byte[]LIST_LEVEL_TEXTConstant for list level textprivate static byte[]LIST_LEVEL_TYPEConstant for list level style oldprivate static byte[]LIST_LEVEL_TYPE_NEWConstant for list level style newstatic intLIST_TYPE_ARABICstatic intLIST_TYPE_ARABIC_LEADING_ZEROstatic intLIST_TYPE_BASEstatic intLIST_TYPE_BULLETstatic intLIST_TYPE_CARDINAL_TEXT_NUMBERstatic intLIST_TYPE_LOWER_LETTERSstatic intLIST_TYPE_LOWER_ROMANstatic intLIST_TYPE_LOWERCASE_LETTERstatic intLIST_TYPE_LOWERCASE_ROMAN_NUMERALstatic intLIST_TYPE_NO_NUMBERstatic intLIST_TYPE_NUMBEREDstatic intLIST_TYPE_ORDINAL_NUMBERstatic intLIST_TYPE_ORDINAL_TEXT_NUMBERstatic intLIST_TYPE_UNKNOWNstatic intLIST_TYPE_UPPER_LETTERSstatic intLIST_TYPE_UPPER_ROMANstatic intLIST_TYPE_UPPERCASE_LETTERstatic intLIST_TYPE_UPPERCASE_ROMAN_NUMERALprivate intlistLevelThe level of this RtfListLevelprivate RtfListLevellistLevelParentprivate intlistNoRestartDoes the list restart numbering each time a super ordinate level is incrementedprivate intlistStartAtThe number to start counting atprivate intlistTypeWhether this RtfList is numberedprivate RtfListparentParent list objectprivate intrightIndentThe right indentation of this RtfListprivate intsymbolIndentThe symbol indentation of this RtfListprivate inttemplateID-
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
Constructors Constructor Description RtfListLevel(RtfDocument doc)RtfListLevel(RtfDocument doc, RtfList parent)RtfListLevel(RtfListLevel ll)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcorrectIndentation()Correct the indentation of this levelintgetAlignment()java.lang.StringgetBulletCharacter()intgetFirstIndent()RtfFontgetFontBullet()RtfFontgetFontNumber()intgetLeftIndent()intgetLevelFollowValue()intgetLevelTextNumber()intgetListLevel()Gets the list level of this RtfListRtfListLevelgetListLevelParent()intgetListNoRestart()intgetListStartAt()intgetListType()RtfListgetParent()intgetRightIndent()intgetSymbolIndent()booleanisLegal()booleanisTentative()voidsetAlignment(int alignment)voidsetBulletCharacter(java.lang.String bulletCharacter)voidsetBulletChunk(Chunk bulletCharacter)voidsetBulletFont(Font f)set the bullet fontvoidsetFirstIndent(int firstIndent)voidsetFontBullet(RtfFont fontBullet)voidsetFontNumber(RtfFont fontNumber)voidsetLeftIndent(int leftIndent)voidsetLegal(boolean isLegal)voidsetLevelFollowValue(int levelFollowValue)voidsetLevelTextNumber(int levelTextNumber)voidsetListLevel(int listLevel)Sets the list level of this RtfList.voidsetListLevelParent(RtfListLevel listLevelParent)voidsetListNoRestart(int listNoRestart)voidsetListStartAt(int listStartAt)voidsetListType(int listType)voidsetParent(RtfList parent)voidsetRightIndent(int rightIndent)voidsetSymbolIndent(int symbolIndent)voidsetTentative(boolean isTentative)voidwriteContent(java.io.OutputStream result)unusedvoidwriteDefinition(java.io.OutputStream result)Write the definition part of the elementvoidwriteIndentation(java.io.OutputStream result)Write the indentation values for thisRtfList.voidwriteListBeginning(java.io.OutputStream result)Writes the initialization part of the RtfListprotected voidwriteListNumbers(java.io.OutputStream result)Writes only the list number and list level number.-
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable, 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
setInHeader, setInTable, setRtfDocument
-
-
-
-
Field Detail
-
LIST_LEVEL
private static final byte[] LIST_LEVEL
Constant for list level
-
LIST_LEVEL_TEMPLATE_ID
private static final byte[] LIST_LEVEL_TEMPLATE_ID
Constant for list level
-
LIST_LEVEL_TYPE
private static final byte[] LIST_LEVEL_TYPE
Constant for list level style old
-
LIST_LEVEL_TYPE_NEW
private static final byte[] LIST_LEVEL_TYPE_NEW
Constant for list level style new
-
LIST_LEVEL_ALIGNMENT
private static final byte[] LIST_LEVEL_ALIGNMENT
Constant for list level alignment old
-
LIST_LEVEL_ALIGNMENT_NEW
private static final byte[] LIST_LEVEL_ALIGNMENT_NEW
Constant for list level alignment new
-
LIST_LEVEL_START_AT
private static final byte[] LIST_LEVEL_START_AT
Constant for list level start at
-
LIST_LEVEL_TEXT
private static final byte[] LIST_LEVEL_TEXT
Constant for list level text
-
LIST_LEVEL_STYLE_NUMBERED_BEGIN
private static final byte[] LIST_LEVEL_STYLE_NUMBERED_BEGIN
Constant for the beginning of the list level numbered style
-
LIST_LEVEL_STYLE_NUMBERED_END
private static final byte[] LIST_LEVEL_STYLE_NUMBERED_END
Constant for the end of the list level numbered style
-
LIST_LEVEL_STYLE_BULLETED_BEGIN
private static final byte[] LIST_LEVEL_STYLE_BULLETED_BEGIN
Constant for the beginning of the list level bulleted style
-
LIST_LEVEL_STYLE_BULLETED_END
private static final byte[] LIST_LEVEL_STYLE_BULLETED_END
Constant for the end of the list level bulleted style
-
LIST_LEVEL_NUMBERS_BEGIN
private static final byte[] LIST_LEVEL_NUMBERS_BEGIN
Constant for the beginning of the list level numbers
-
LIST_LEVEL_FOLOW
private static final byte[] LIST_LEVEL_FOLOW
Constant which specifies which character follows the level text
-
LIST_LEVEL_SPACE
private static final byte[] LIST_LEVEL_SPACE
Constant which specifies the levelspace controlword
-
LIST_LEVEL_INDENT
private static final byte[] LIST_LEVEL_INDENT
Constant which specifies the levelindent control word
-
LIST_LEVEL_LEGAL
private static final byte[] LIST_LEVEL_LEGAL
Constant which specifies (1) if list numbers from previous levels should be converted to Arabic numbers; (0) if they should be left with the format specified by their own level's definition.
-
LIST_LEVEL_NO_RESTART
private static final byte[] LIST_LEVEL_NO_RESTART
Constant which specifies (1) if this level does/does not restart its count each time a super ordinate level is incremented (0) if this level does not restart its count each time a super ordinate level is incremented.
-
LIST_LEVEL_NUMBERS_NUMBERED
private static final byte[] LIST_LEVEL_NUMBERS_NUMBERED
Constant for the list level numbers
-
LIST_LEVEL_NUMBERS_END
private static final byte[] LIST_LEVEL_NUMBERS_END
Constant for the end of the list level numbers
-
LIST_LEVEL_FIRST_INDENT
private static final byte[] LIST_LEVEL_FIRST_INDENT
Constant for the first indentation
-
LIST_LEVEL_SYMBOL_INDENT
private static final byte[] LIST_LEVEL_SYMBOL_INDENT
Constant for the symbol indentation
-
LIST_LEVEL_TENTATIVE
private static final byte[] LIST_LEVEL_TENTATIVE
Constant for the lvltentative control word
-
LIST_LEVEL_PICTURE
private static final byte[] LIST_LEVEL_PICTURE
Constant for the levelpictureN control word
-
LIST_TYPE_NUMBERED
public static final int LIST_TYPE_NUMBERED
- See Also:
- Constant Field Values
-
LIST_TYPE_UPPER_LETTERS
public static final int LIST_TYPE_UPPER_LETTERS
- See Also:
- Constant Field Values
-
LIST_TYPE_LOWER_LETTERS
public static final int LIST_TYPE_LOWER_LETTERS
- See Also:
- Constant Field Values
-
LIST_TYPE_UPPER_ROMAN
public static final int LIST_TYPE_UPPER_ROMAN
- See Also:
- Constant Field Values
-
LIST_TYPE_LOWER_ROMAN
public static final int LIST_TYPE_LOWER_ROMAN
- See Also:
- Constant Field Values
-
LIST_TYPE_UNKNOWN
public static final int LIST_TYPE_UNKNOWN
- See Also:
- Constant Field Values
-
LIST_TYPE_BASE
public static final int LIST_TYPE_BASE
- See Also:
- Constant Field Values
-
LIST_TYPE_ARABIC
public static final int LIST_TYPE_ARABIC
- See Also:
- Constant Field Values
-
LIST_TYPE_UPPERCASE_ROMAN_NUMERAL
public static final int LIST_TYPE_UPPERCASE_ROMAN_NUMERAL
- See Also:
- Constant Field Values
-
LIST_TYPE_LOWERCASE_ROMAN_NUMERAL
public static final int LIST_TYPE_LOWERCASE_ROMAN_NUMERAL
- See Also:
- Constant Field Values
-
LIST_TYPE_UPPERCASE_LETTER
public static final int LIST_TYPE_UPPERCASE_LETTER
- See Also:
- Constant Field Values
-
LIST_TYPE_LOWERCASE_LETTER
public static final int LIST_TYPE_LOWERCASE_LETTER
- See Also:
- Constant Field Values
-
LIST_TYPE_ORDINAL_NUMBER
public static final int LIST_TYPE_ORDINAL_NUMBER
- See Also:
- Constant Field Values
-
LIST_TYPE_CARDINAL_TEXT_NUMBER
public static final int LIST_TYPE_CARDINAL_TEXT_NUMBER
- See Also:
- Constant Field Values
-
LIST_TYPE_ORDINAL_TEXT_NUMBER
public static final int LIST_TYPE_ORDINAL_TEXT_NUMBER
- See Also:
- Constant Field Values
-
LIST_TYPE_ARABIC_LEADING_ZERO
public static final int LIST_TYPE_ARABIC_LEADING_ZERO
- See Also:
- Constant Field Values
-
LIST_TYPE_BULLET
public static final int LIST_TYPE_BULLET
- See Also:
- Constant Field Values
-
LIST_TYPE_NO_NUMBER
public static final int LIST_TYPE_NO_NUMBER
- See Also:
- Constant Field Values
-
listType
private int listType
Whether this RtfList is numbered
-
bulletCharacter
private java.lang.String bulletCharacter
The text to use as the bullet character
-
bulletChunk
private Chunk bulletChunk
- Since:
- 2.1.4
-
listStartAt
private int listStartAt
The number to start counting at
-
listLevel
private int listLevel
The level of this RtfListLevel
-
firstIndent
private int firstIndent
The first indentation of this RtfList
-
leftIndent
private int leftIndent
The left indentation of this RtfList
-
rightIndent
private int rightIndent
The right indentation of this RtfList
-
symbolIndent
private int symbolIndent
The symbol indentation of this RtfList
-
isTentative
private boolean isTentative
Flag to indicate if the tentative control word should be emitted.
-
isLegal
private boolean isLegal
Flag to indicate if the levellegal control word should be emitted. true if any list numbers from previous levels should be converted to Arabic numbers; false if they should be left with the format specified by their own level definition.
-
listNoRestart
private int listNoRestart
Does the list restart numbering each time a super ordinate level is incremented
-
LIST_LEVEL_FOLLOW_TAB
public static final int LIST_LEVEL_FOLLOW_TAB
- See Also:
- Constant Field Values
-
LIST_LEVEL_FOLLOW_SPACE
public static final int LIST_LEVEL_FOLLOW_SPACE
- See Also:
- Constant Field Values
-
LIST_LEVEL_FOLLOW_NOTHING
public static final int LIST_LEVEL_FOLLOW_NOTHING
- See Also:
- Constant Field Values
-
levelFollowValue
private int levelFollowValue
-
alignment
private int alignment
The alignment of this RtfList
-
levelPicture
private int levelPicture
Which picture bullet from the \listpicture destination should be applied
-
levelTextNumber
private int levelTextNumber
-
fontNumber
private RtfFont fontNumber
The RtfFont for numbered lists
-
fontBullet
private RtfFont fontBullet
The RtfFont for bulleted lists
-
templateID
private int templateID
-
listLevelParent
private RtfListLevel listLevelParent
-
parent
private RtfList parent
Parent list object
-
-
Constructor Detail
-
RtfListLevel
public RtfListLevel(RtfDocument doc)
-
RtfListLevel
public RtfListLevel(RtfDocument doc, RtfList parent)
-
RtfListLevel
public RtfListLevel(RtfListLevel ll)
-
-
Method Detail
-
getListNoRestart
public int getListNoRestart()
- Returns:
- the listNoRestart
-
setListNoRestart
public void setListNoRestart(int listNoRestart)
- Parameters:
listNoRestart- the listNoRestart to set
-
getAlignment
public int getAlignment()
- Returns:
- the alignment
-
setAlignment
public void setAlignment(int alignment)
- Parameters:
alignment- the alignment to set
-
writeDefinition
public void writeDefinition(java.io.OutputStream result) throws java.io.IOExceptionDescription copied from interface:RtfExtendedElementWrite the definition part of the element- Specified by:
writeDefinitionin interfaceRtfExtendedElement- Parameters:
result- TheOutputStreamto write the element definition to- Throws:
java.io.IOException
-
writeContent
public void writeContent(java.io.OutputStream result) throws java.io.IOExceptionunused- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
java.io.IOException
-
writeListNumbers
protected void writeListNumbers(java.io.OutputStream result) throws java.io.IOExceptionWrites only the list number and list level number.- Parameters:
result- TheOutputStreamto write to- Throws:
java.io.IOException- On i/o errors.
-
writeIndentation
public void writeIndentation(java.io.OutputStream result) throws java.io.IOExceptionWrite the indentation values for thisRtfList.- Parameters:
result- TheOutputStreamto write to.- Throws:
java.io.IOException- On i/o errors.
-
writeListBeginning
public void writeListBeginning(java.io.OutputStream result) throws java.io.IOExceptionWrites the initialization part of the RtfList- Parameters:
result- TheOutputStreamto write to- Throws:
java.io.IOException- On i/o errors.
-
correctIndentation
protected void correctIndentation()
Correct the indentation of this level
-
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.- Parameters:
listLevel- The list level to set.
-
getBulletCharacter
public java.lang.String getBulletCharacter()
-
getListStartAt
public int getListStartAt()
- Returns:
- the listStartAt
-
setListStartAt
public void setListStartAt(int listStartAt)
- Parameters:
listStartAt- the listStartAt to set
-
getFirstIndent
public int getFirstIndent()
- Returns:
- the firstIndent
-
setFirstIndent
public void setFirstIndent(int firstIndent)
- Parameters:
firstIndent- the firstIndent to set
-
getLeftIndent
public int getLeftIndent()
- Returns:
- the leftIndent
-
setLeftIndent
public void setLeftIndent(int leftIndent)
- Parameters:
leftIndent- the leftIndent to set
-
getRightIndent
public int getRightIndent()
- Returns:
- the rightIndent
-
setRightIndent
public void setRightIndent(int rightIndent)
- Parameters:
rightIndent- the rightIndent to set
-
getSymbolIndent
public int getSymbolIndent()
- Returns:
- the symbolIndent
-
setSymbolIndent
public void setSymbolIndent(int symbolIndent)
- Parameters:
symbolIndent- the symbolIndent to set
-
getParent
public RtfList getParent()
- Returns:
- the parent
-
setParent
public void setParent(RtfList parent)
- Parameters:
parent- the parent to set
-
setBulletCharacter
public void setBulletCharacter(java.lang.String bulletCharacter)
- Parameters:
bulletCharacter- the bulletCharacter to set
-
setBulletChunk
public void setBulletChunk(Chunk bulletCharacter)
- Parameters:
bulletCharacter-- Since:
- 2.1.4
-
getListType
public int getListType()
- Returns:
- the listType
-
setListType
public void setListType(int listType)
- Parameters:
listType- the listType to set
-
setBulletFont
public void setBulletFont(Font f)
set the bullet font- Parameters:
f-
-
getFontNumber
public RtfFont getFontNumber()
- Returns:
- the fontNumber
-
setFontNumber
public void setFontNumber(RtfFont fontNumber)
- Parameters:
fontNumber- the fontNumber to set
-
getFontBullet
public RtfFont getFontBullet()
- Returns:
- the fontBullet
-
setFontBullet
public void setFontBullet(RtfFont fontBullet)
- Parameters:
fontBullet- the fontBullet to set
-
isTentative
public boolean isTentative()
- Returns:
- the isTentative
-
setTentative
public void setTentative(boolean isTentative)
- Parameters:
isTentative- the isTentative to set
-
isLegal
public boolean isLegal()
- Returns:
- the isLegal
-
setLegal
public void setLegal(boolean isLegal)
- Parameters:
isLegal- the isLegal to set
-
getLevelFollowValue
public int getLevelFollowValue()
- Returns:
- the levelFollowValue
-
setLevelFollowValue
public void setLevelFollowValue(int levelFollowValue)
- Parameters:
levelFollowValue- the levelFollowValue to set
-
getLevelTextNumber
public int getLevelTextNumber()
- Returns:
- the levelTextNumber
-
setLevelTextNumber
public void setLevelTextNumber(int levelTextNumber)
- Parameters:
levelTextNumber- the levelTextNumber to set
-
getListLevelParent
public RtfListLevel getListLevelParent()
- Returns:
- the listLevelParent
-
setListLevelParent
public void setListLevelParent(RtfListLevel listLevelParent)
- Parameters:
listLevelParent- the listLevelParent to set
-
-