/**
* Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
*
* @param o the object to add.
* @return true if adding the object succeeded
*/
public override bool Add(IElement o)
{
if (o is ListItem)
{
ListItem item = (ListItem)o;
Chunk chunk = new Chunk(preSymbol, symbol.Font);
chunk.Attributes = symbol.Attributes;
chunk.Append(GreekAlphabetFactory.GetString(first + list.Count, lowercase));
chunk.Append(postSymbol);
item.ListSymbol = chunk;
item.SetIndentationLeft(symbolIndent, autoindent);
item.IndentationRight = 0;
list.Add(item);
return(true);
}
else if (o is List)
{
List nested = (List)o;
nested.IndentationLeft = nested.IndentationLeft + symbolIndent;
first--;
list.Add(nested);
return(true);
}
return(false);
}