com.lowagie.text
public class List extends Object implements TextElementArray
List
contains several ListItem
s.
Example 1:
The result of this code looks like this:List list = new List(true, 20); list.add(new ListItem("First line")); list.add(new ListItem("The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?")); list.add(new ListItem("Third line"));
The result of this code looks like this:List overview = new List(false, 10); overview.add(new ListItem("This is an item")); overview.add("This is another item");
Field Summary | |
---|---|
static boolean | ALPHABETICAL a possible value for the lettered parameter |
protected boolean | alignindent |
protected boolean | autoindent |
protected int | first This variable indicates the first number of a numbered list. |
protected float | indentationLeft The indentation of this list on the left side. |
protected float | indentationRight The indentation of this list on the right side. |
protected boolean | lettered |
protected ArrayList | list This is the ArrayList containing the different ListItem s. |
protected boolean | lowercase |
static boolean | LOWERCASE a possible value for the lettered parameter |
protected Properties | markupAttributes Contains extra markupAttributes |
protected boolean | numbered This variable indicates if the list has to be numbered. |
static boolean | NUMBERICAL a possible value for the lettered parameter |
static boolean | ORDERED a possible value for the numbered parameter |
protected Chunk | symbol This is the listsymbol of a list that is not numbered. |
protected float | symbolIndent The indentation of the listitems. |
static boolean | UNORDERED a possible value for the numbered parameter |
static boolean | UPPERCASE a possible value for the lettered parameter |
Constructor Summary | |
---|---|
List()
Constructs a List . | |
List(boolean numbered)
Constructs a List .
| |
List(boolean numbered, boolean lettered)
Constructs a List .
| |
List(boolean numbered, float symbolIndent)
Constructs a List .
| |
List(boolean numbered, boolean lettered, float symbolIndent)
Creates a list | |
List(Properties attributes)
Returns a List that has been constructed taking in account
the value of some attributes.
|
Method Summary | |
---|---|
boolean | add(Object o)
Adds an Object to the List .
|
int | first()
Gets the first number . |
ArrayList | getChunks()
Gets all the chunks in this element.
|
ArrayList | getItems()
Gets all the items in the list.
|
static String | getLowerCaseLetter(int index)
Translates a number to a letter(combination).
|
static String | getUpperCaseLetter(int index)
Translates a number to a letter(combination).
|
float | indentationLeft()
Gets the indentation of this paragraph on the left side.
|
float | indentationRight()
Gets the indentation of this paragraph on the right side.
|
boolean | isAlignindent() |
boolean | isLettered()
Checks if the list is lettered.
|
boolean | isLowerCase()
Checks if the list lettering is lowercase.
|
boolean | isNumbered()
Checks if the list is numbered.
|
static boolean | isSymbol(String tag)
Checks if a given tag corresponds with the listsymbol tag of this object.
|
static boolean | isTag(String tag)
Checks if a given tag corresponds with this object.
|
float | leading()
Gets the leading of the first listitem.
|
void | normalizeIndentation() |
boolean | process(ElementListener listener)
Processes the element by adding it (or the different parts) to an
ElementListener .
|
void | setAlignindent(boolean alignindent) |
void | setAutoindent(boolean autoindent) |
void | setFirst(int first)
Sets the number that has to come first in the list.
|
void | setIndentationLeft(float indentation)
Sets the indentation of this paragraph on the left side.
|
void | setIndentationRight(float indentation)
Sets the indentation of this paragraph on the right side.
|
void | setListSymbol(Chunk symbol)
Sets the listsymbol.
|
void | setListSymbol(String symbol)
Sets the listsymbol.
|
void | setLowerCase(boolean uppercase) |
int | size()
Gets the size of the list.
|
Chunk | symbol()
Gets the Chunk containing the symbol. |
float | symbolIndent()
Gets the symbol indentation. |
int | type()
Gets the type of the text element.
|
ArrayList
containing the different ListItem
s.List
.List
.
Parameters: numbered a boolean
List
.
Parameters: numbered a boolean lettered has the list to be 'numbered' with letters
List
.
Remark: the parameter symbolIndent is important for instance when generating PDF-documents; it indicates the indentation of the listsymbol. It is not important for HTML-documents.
Parameters: numbered a boolean symbolIndent the indentation that has to be used for the listsymbol
Parameters: numbered has the list to be numbered? lettered has the list to be 'numbered' with letters symbolIndent the indentation of the symbol
List
that has been constructed taking in account
the value of some attributes.
Parameters: attributes Some attributes
Object
to the List
.
Parameters: o the object to add.
Returns: true if adding the object succeeded
Returns: a number
Returns: an ArrayList
Returns: an ArrayList
containing ListItem
s.
Parameters: index a number greater than 0
Returns: a String corresponding with the index.
Parameters: index a number greater than 0
Returns: a String corresponding with the index.
Returns: the indentation
Returns: the indentation
Returns: the alignindent
Returns: true
if the list is lettered, false
otherwise.
Returns: true
if it is lowercase, false
otherwise.
Returns: true
if the list is numbered, false
otherwise.
Parameters: tag the given tag
Returns: true if the tag corresponds
Parameters: tag the given tag
Returns: true if the tag corresponds
Returns: a leading
ElementListener
.
Parameters: listener an ElementListener
Returns: true
if the element was processed successfully
Parameters: alignindent the alignindent to set
Parameters: autoindent the autoindent to set
Parameters: first a number
Parameters: indentation the new indentation
Parameters: indentation the new indentation
Parameters: symbol a Chunk
This is a shortcut for setListSymbol(Chunk symbol)
.
Parameters: symbol a String
Parameters: uppercase the uppercase to set
Returns: a size
Returns: a Chunk with a symbol
Returns: the symbol indentation
Returns: a type