@Override public void addElement( Element element ) { this.empty = false; if ( element instanceof ListItem ) { List aList = new List(); aList.setIndentationLeft( ( (ListItem) element ).getIndentationLeft() ); aList.add( element ); super.addElement( aList ); } else { super.addElement( element ); } }
List list = new List(); list.setNumbered(Utilities.checkTrueOrFalse(attributes, ElementTags.NUMBERED)); list.setLettered(Utilities.checkTrueOrFalse(attributes, ElementTags.LETTERED)); list.setLowercase(Utilities.checkTrueOrFalse(attributes, ElementTags.LOWERCASE)); list.setAutoindent(Utilities.checkTrueOrFalse(attributes, ElementTags.AUTO_INDENT_ITEMS)); list.setAlignindent(Utilities.checkTrueOrFalse(attributes, ElementTags.ALIGN_INDENTATION_ITEMS)); char character = value.charAt(0); if (Character.isLetter(character)) { list.setFirst(character); } else { list.setFirst(Integer.parseInt(value)); if (value != null) { list .setListSymbol(new Chunk(value, FontFactory .getFont(attributes))); list.setIndentationLeft(Float.parseFloat(value + "f")); list.setIndentationRight(Float.parseFloat(value + "f")); list.setSymbolIndent(Float.parseFloat(value));
private boolean isSametype(com.lowagie.text.List list, int type) { return (!list.isNumbered() && type == WikiHelper.LIST_TYPE_NORMAL) || (list.isNumbered() && type == WikiHelper.LIST_TYPE_NUMERICAL); }
public StylableList( StylableDocument ownerDocument, IStylableContainer parent, int listLevel ) { this.parent = parent; this.listLevel = listLevel; // set defaults super.setNumbered( false ); super.setLettered( false ); super.setLowercase( false ); super.setPreSymbol( "" ); super.setPostSymbol( "" ); super.setListSymbol( "" ); super.setAutoindent( false ); }
super.setListSymbol( symbol ); super.setListSymbol( new Chunk( image, 0.0f, 0.0f ) ); if ( startValue != null ) super.setFirst( startValue ); if ( numPrefix != null ) super.setPreSymbol( numPrefix ); symbol = new Chunk( numPrefix, symbol.getFont() ); super.setPostSymbol( numSuffix ); symbol.append( numSuffix ); super.setNumbered( true ); super.setLettered( numFormat.isAlphabetical() ); this.romanNumbered = numFormat.isRoman(); super.setLowercase( numFormat.isLowercase() ); super.setListSymbol( symbol ); super.setIndentationLeft( Math.max( marginLeft + textIndent, 0.0f ) ); super.setSymbolIndent( Math.max( -textIndent, 0.0f ) ); super.setIndentationLeft( Math.max( spaceBefore, 0.0f ) ); super.setSymbolIndent( Math.max( minLabelWidth, 0.0f ) );
} else if (o instanceof List) { List nested = (List) o; nested.setIndentationLeft(nested.getIndentationLeft() + symbolIndent); first--; return list.add(nested);
skipText = true; cprops.addToChain(tag, h); com.lowagie.text.List list = new com.lowagie.text.List(false); try{ list.setIndentationLeft(new Float(cprops.getProperty("indent")).floatValue()); }catch (Exception e) { list.setAutoindent(true); list.setListSymbol("\u2022"); stack.push(list); return; skipText = true; cprops.addToChain(tag, h); com.lowagie.text.List list = new com.lowagie.text.List(true); try{ list.setIndentationLeft(new Float(cprops.getProperty("indent")).floatValue()); }catch (Exception e) { list.setAutoindent(true);
if(list.getSymbolIndent() > 0 && list.getIndentationLeft() > 0) { ll.setFirstIndent((int) (list.getSymbolIndent() * RtfElement.TWIPS_FACTOR * -1)); ll.setLeftIndent((int) ((list.getIndentationLeft() + list.getSymbolIndent()) * RtfElement.TWIPS_FACTOR)); } else if(list.getSymbolIndent() > 0) { ll.setFirstIndent((int) (list.getSymbolIndent() * RtfElement.TWIPS_FACTOR * -1)); ll.setLeftIndent((int) (list.getSymbolIndent() * RtfElement.TWIPS_FACTOR)); } else if(list.getIndentationLeft() > 0) { ll.setFirstIndent(0); ll.setLeftIndent((int) (list.getIndentationLeft() * RtfElement.TWIPS_FACTOR)); } else { ll.setFirstIndent(0); ll.setLeftIndent(0); ll.setRightIndent((int) (list.getIndentationRight() * RtfElement.TWIPS_FACTOR)); ll.setSymbolIndent((int) ((list.getSymbolIndent() + list.getIndentationLeft()) * RtfElement.TWIPS_FACTOR)); ll.correctIndentation(); ll.setTentative(false); if (list.isLowercase()) { ll.setListType(RtfListLevel.LIST_TYPE_LOWER_ROMAN); } else { ll.setListType(RtfListLevel.LIST_TYPE_UPPER_ROMAN); } else if (list.isNumbered()) { ll.setListType(RtfListLevel.LIST_TYPE_NUMBERED); } else if (list.isLettered()) { if (list.isLowercase()) { ll.setListType(RtfListLevel.LIST_TYPE_LOWER_LETTERS); } else {
nested.setIndentationLeft(nested.getIndentationLeft() + symbolIndent); first--; return list.add(nested); return this.add(new ListItem((String) o));
@Override public void handleAdd(Object o) { list.add(o); } }
if (o instanceof List) { List list = (List) o; list.setIndentationLeft(list.getIndentationLeft() + indentationLeft); list.setIndentationRight(indentationRight); return super.add(list);
if (list.isAlignindent()) { list.normalizeIndentation(); indentation.listIndentLeft += list.getIndentationLeft(); indentation.indentRight += list.getIndentationRight(); indentation.listIndentLeft -= list.getIndentationLeft(); indentation.indentRight -= list.getIndentationRight(); carriageReturn(); break;
ArrayList items = list.getItems(); ListItem item = null; float listIndentation = list.getIndentationLeft(); int count = 0; Stack stack = new Stack(); stack.push(new Object[]{list, new Integer(k), new Float(listIndentation)}); list = (com.lowagie.text.List)obj; items = list.getItems(); listIndentation += list.getIndentationLeft(); k = -1; continue; Object objs[] = (Object[])stack.pop(); list = (com.lowagie.text.List)objs[0]; items = list.getItems(); k = ((Integer)objs[1]).intValue(); listIndentation = ((Float)objs[2]).floatValue(); compositeColumn.setExtraParagraphSpace(item.getExtraParagraphSpace()); compositeColumn.setFollowingIndent(compositeColumn.getIndent()); compositeColumn.setRightIndent(item.getIndentationRight() + list.getIndentationRight()); compositeColumn.setLeading(item.getLeading(), item.getMultipliedLeading()); compositeColumn.setRunDirection(runDirection);
if (lowerCase != null) list.setLowercase(lowerCase); list.setLowercase(lowerCase); list = new List(true, indent); list = new List(false, true, indent); list = new List(false, indent); if (listSymbol != null) list.setListSymbol(listSymbol);
processActions(list, null, allActions); int aCounter = 0; for (Iterator it = list.getItems().iterator(); it.hasNext();) { Element ele = (Element)it.next(); switch (ele.type()) { case Element.LIST: List sublist = (List)ele; addList(sublist, left + sublist.getIndentationLeft(), right, alignment); break;
if (list.isNumbered()) { writeStart(HtmlTags.ORDEREDLIST); os.write(GT); for (Iterator i = list.getItems().iterator(); i.hasNext(); ) { write((Element) i.next(), indent + 1); if (list.isNumbered()) { writeEnd(HtmlTags.ORDEREDLIST);
skipText = true; cprops.addToChain(tag, h); com.lowagie.text.List list = new com.lowagie.text.List(false, 10); list.setListSymbol("\u2022"); stack.push(list); return; skipText = true; cprops.addToChain(tag, h); com.lowagie.text.List list = new com.lowagie.text.List(true, 10); stack.push(list); return;
parentlist.add(curlist); } else { parentlist = curlist; && state[curlevel - 1].size() > 0 && isSametype(state[curlevel - 1], curtype)) { curlist = state[curlevel - 1]; curlist = startList(curtype); for (int j = curlevel - 2; j >= 0; j--) { if (state[j] != null && state[j].size() > 0) { parentlist = state[j]; parentlist.add(curlist); break; ((Paragraph) e).add(curlist); } else { parentlist.add(curlist); prelevel = curlevel; curlist.add(child.jjtAccept(this, data));
break; case Element.LIST: for (i = ((List) element).getItems().iterator(); i.hasNext();) { processActions((Element) i.next(), action, allActions);
private com.lowagie.text.List startList(int type) { com.lowagie.text.List e = null; if (type == WikiHelper.LIST_TYPE_NORMAL) { e = new com.lowagie.text.List(false, LIST_INDENT); } else if (type == WikiHelper.LIST_TYPE_NUMERICAL) { e = new com.lowagie.text.List(true, LIST_INDENT); } return e; }