Package com.itextpdf.text

Examples of com.itextpdf.text.List


                    break;
                }
                case Element.LIST: {
                    // we cast the element to a List
                    List list = (List) element;
                    if (list.isAlignindent()) {
                      list.normalizeIndentation();
                    }
                    // we adjust the document
                    indentation.listIndentLeft += list.getIndentationLeft();
                    indentation.indentRight += list.getIndentationRight();
                    // we process the items in the list
                    element.process(this);
                    // some parameters are set back to normal again
                    indentation.listIndentLeft -= list.getIndentationLeft();
                    indentation.indentRight -= list.getIndentationRight();
                    carriageReturn();
                    break;
                }
                case Element.LISTITEM: {
                  leadingCount++;
View Full Code Here


   * @param tag
   * @param chain
   * @return the List
   */
  public List createList(final String tag, final ChainedProperties chain) {
    List list;
    if (HtmlTags.UL.equalsIgnoreCase(tag)) {
      list = new List(List.UNORDERED);
      list.setListSymbol("\u2022 ");
    }
    else {
      list = new List(List.ORDERED);
    }
    try{
      list.setIndentationLeft(new Float(chain.getProperty(HtmlTags.INDENT)).floatValue());
    }catch (Exception e) {
      list.setAutoindent(true);
    }
    return list;
  }
View Full Code Here

   * @param tag
   * @param chain
   * @return the List
   */
  public List createList(final String tag, final ChainedProperties chain) {
    List list;
    if (HtmlTags.UL.equalsIgnoreCase(tag)) {
      list = new List(List.UNORDERED);
      list.setListSymbol("\u2022 ");
    }
    else {
      list = new List(List.ORDERED);
    }
    try{
      list.setIndentationLeft(new Float(chain.getProperty(HtmlTags.INDENT)).floatValue());
    }catch (Exception e) {
      list.setAutoindent(true);
    }
    return list;
  }
View Full Code Here

                    break;
                }
                case Element.LIST: {
                    // we cast the element to a List
                    List list = (List) element;
                    if (list.isAlignindent()) {
                      list.normalizeIndentation();
                    }
                    // we adjust the document
                    indentation.listIndentLeft += list.getIndentationLeft();
                    indentation.indentRight += list.getIndentationRight();
                    // we process the items in the list
                    element.process(this);
                    // some parameters are set back to normal again
                    indentation.listIndentLeft -= list.getIndentationLeft();
                    indentation.indentRight -= list.getIndentationRight();
                    carriageReturn();
                    break;
                }
                case Element.LISTITEM: {
                  leadingCount++;
View Full Code Here

                    break;
                }
                case Element.LIST: {
                    // we cast the element to a List
                    List list = (List) element;
                    if (list.isAlignindent()) {
                      list.normalizeIndentation();
                    }
                    // we adjust the document
                    indentation.listIndentLeft += list.getIndentationLeft();
                    indentation.indentRight += list.getIndentationRight();
                    // we process the items in the list
                    element.process(this);
                    // some parameters are set back to normal again
                    indentation.listIndentLeft -= list.getIndentationLeft();
                    indentation.indentRight -= list.getIndentationRight();
                    carriageReturn();
                    break;
                }
                case Element.LISTITEM: {
                  leadingCount++;
View Full Code Here

                    break;
                }
                case Element.LIST: {
                    // we cast the element to a List
                    List list = (List) element;
                    if (list.isAlignindent()) {
                      list.normalizeIndentation();
                    }
                    // we adjust the document
                    indentation.listIndentLeft += list.getIndentationLeft();
                    indentation.indentRight += list.getIndentationRight();
                    // we process the items in the list
                    element.process(this);
                    // some parameters are set back to normal again
                    indentation.listIndentLeft -= list.getIndentationLeft();
                    indentation.indentRight -= list.getIndentationRight();
                    carriageReturn();
                    break;
                }
                case Element.LISTITEM: {
                  leadingCount++;
View Full Code Here

   * Creates a List object based on a list of properties.
   * @param attributes
   * @return the List
   */
  public static List getList(Properties attributes) {
    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));

    String value;

    value = attributes.getProperty(ElementTags.FIRST);
    if (value != null) {
      char character = value.charAt(0);
      if (Character.isLetter(character)) {
        list.setFirst(character);
      } else {
        list.setFirst(Integer.parseInt(value));
      }
    }

    value = attributes.getProperty(ElementTags.LISTSYMBOL);
    if (value != null) {
      list
          .setListSymbol(new Chunk(value, FontFactory
              .getFont(attributes)));
    }

    value = attributes.getProperty(ElementTags.INDENTATIONLEFT);
    if (value != null) {
      list.setIndentationLeft(Float.parseFloat(value + "f"));
    }

    value = attributes.getProperty(ElementTags.INDENTATIONRIGHT);
    if (value != null) {
      list.setIndentationRight(Float.parseFloat(value + "f"));
    }

    value = attributes.getProperty(ElementTags.SYMBOLINDENT);
    if (value != null) {
      list.setSymbolIndent(Float.parseFloat(value));
    }

    return list;
  }
View Full Code Here

   * @param tag
   * @param chain
   * @return the List
   */
  public List createList(final String tag, final ChainedProperties chain) {
    List list;
    if (HtmlTags.UL.equalsIgnoreCase(tag)) {
      list = new List(List.UNORDERED);
      list.setListSymbol("\u2022 ");
    }
    else {
      list = new List(List.ORDERED);
    }
    try{
      list.setIndentationLeft(new Float(chain.getProperty(HtmlTags.INDENT)).floatValue());
    }catch (Exception e) {
      list.setAutoindent(true);
    }
    return list;
  }
View Full Code Here

                    break;
                }
                case Element.LIST: {
                    // we cast the element to a List
                    List list = (List) element;
                    if (isTagged(writer)) {
                        flushLines();
                        text.openMCBlock(list);
                    }
                    if (list.isAlignindent()) {
                      list.normalizeIndentation();
                    }
                    // we adjust the document
                    indentation.listIndentLeft += list.getIndentationLeft();
                    indentation.indentRight += list.getIndentationRight();
                    // we process the items in the list
                    element.process(this);

                    // some parameters are set back to normal again
                    indentation.listIndentLeft -= list.getIndentationLeft();
                    indentation.indentRight -= list.getIndentationRight();
                    carriageReturn();
                    if (isTagged(writer)) {
                        flushLines();
                        text.closeMCBlock(list);
                    }
View Full Code Here

   * @param tag
   * @param chain
   * @return the List
   */
  public List createList(final String tag, final ChainedProperties chain) {
    List list;
    if (HtmlTags.UL.equalsIgnoreCase(tag)) {
      list = new List(List.UNORDERED);
      list.setListSymbol("\u2022 ");
    }
    else {
      list = new List(List.ORDERED);
    }
    try{
      list.setIndentationLeft(new Float(chain.getProperty(HtmlTags.INDENT)).floatValue());
    }catch (Exception e) {
      list.setAutoindent(true);
    }
    return list;
  }
View Full Code Here

TOP

Related Classes of com.itextpdf.text.List

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.