Package net.java.textilej.parser

Examples of net.java.textilej.parser.TableRowAttributes


    applyAttributes(attributes);
    if (attributes.getTitle() != null) {
      writer.writeAttribute("title", attributes.getTitle());
    }
    if (attributes instanceof TableRowAttributes) {
      TableRowAttributes tableRowAttributes = (TableRowAttributes) attributes;
      if (tableRowAttributes.getBgcolor() != null) {
        writer.writeAttribute("bgcolor", tableRowAttributes.getBgcolor());
      }
      if (tableRowAttributes.getAlign() != null) {
        writer.writeAttribute("align", tableRowAttributes.getAlign());
      }
      if (tableRowAttributes.getValign() != null) {
        writer.writeAttribute("valign", tableRowAttributes.getValign());
      }
    }
  }
View Full Code Here


      // table open line never has cells
      return -1;
    } else {
      Matcher newRowMatcher = newRowPattern.matcher(line);
      if (newRowMatcher.matches()) {
        TableRowAttributes attributes = new TableRowAttributes();
        String newRowOptions = newRowMatcher.group(1);
        if (newRowOptions != null) {
          Matcher optionsMatcher = optionsPattern.matcher(newRowOptions);
          while (optionsMatcher.find()) {
            String optionName = optionsMatcher.group(1);
            String optionValue = optionsMatcher.group(2);
            if (optionName.equalsIgnoreCase("id")) {
              attributes.setId(optionValue);
            } else if (optionName.equalsIgnoreCase("style")) {
              attributes.setCssStyle(optionValue);
            } else if (optionName.equalsIgnoreCase("class")) {
              attributes.setCssClass(optionValue);
            } else if (optionName.equalsIgnoreCase("title")) {
              attributes.setTitle(optionValue);
            } else if (optionName.equalsIgnoreCase("align")) {
              attributes.setAlign(optionValue);
            } else if (optionName.equalsIgnoreCase("valign")) {
              attributes.setValign(optionValue);
            } else if (optionName.equalsIgnoreCase("bgcolor")) {
              attributes.setBgcolor(optionValue);
            }
          }
        }
        openRow(newRowMatcher.start(),attributes);
        return -1;
View Full Code Here

    if (!rowMatcher.find()) {
      setClosed(true);
      return 0;
    }
    {
      TableRowAttributes rowAttributes = new TableRowAttributes();
      int rowStart = rowMatcher.start();
      if (rowStart > 0) {
        // if the row content starts somewhere in the line then it's likely
        // that we have some row-level attributes
        Matcher rowAttributesMatcher = rowAttributesPattern.matcher(textileLine);
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.TableRowAttributes

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.