Package net.java.textilej.parser

Examples of net.java.textilej.parser.TableCellAttributes


    if (attributes.getTitle() != null) {
      writer.writeAttribute("title", attributes.getTitle());
    }

    if (attributes instanceof TableCellAttributes) {
      TableCellAttributes tableCellAttributes = (TableCellAttributes) attributes;
      if (tableCellAttributes.getBgcolor() != null) {
        writer.writeAttribute("bgcolor", tableCellAttributes.getBgcolor());
      }
      if (tableCellAttributes.getAlign() != null) {
        writer.writeAttribute("align", tableCellAttributes.getAlign());
      }
      if (tableCellAttributes.getValign() != null) {
        writer.writeAttribute("valign", tableCellAttributes.getValign());
      }
      if (tableCellAttributes.getRowspan() != null) {
        writer.writeAttribute("rowspan", tableCellAttributes.getRowspan());
      }
      if (tableCellAttributes.getColspan() != null) {
        writer.writeAttribute("colspan", tableCellAttributes.getColspan());
      }
    }
  }
View Full Code Here


      return;
    }
   
    int contentsStart = cellSplitterMatcher.start(2);
   
    TableCellAttributes attributes = new TableCellAttributes();
   
    if (cellOptions != null) {
      Matcher optionsMatcher = optionsPattern.matcher(cellOptions);
      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);
        } else if (optionName.equalsIgnoreCase("colspan")) {
          attributes.setColspan(optionValue);
        } else if (optionName.equalsIgnoreCase("rowspan")) {
          attributes.setRowspan(optionValue);
        }
      }
    }
    state.setLineCharacterOffset(lineCharacterOffset);
   
View Full Code Here

          textAlign = "text-align: left;";
        } else if (alignment.equals("^")) {
          textAlign = "text-align: top;";
        }
      }
      TableCellAttributes attributes = new TableCellAttributes();
      attributes.setCssStyle(textAlign);
      attributes.setRowspan(rowSpan);
      attributes.setColspan(colSpan);
      Textile.configureAttributes(attributes, rowMatcher,4,false);
     
      state.setLineCharacterOffset(start);
      builder.beginBlock(header?BlockType.TABLE_CELL_HEADER:BlockType.TABLE_CELL_NORMAL, attributes);
     
View Full Code Here

TOP

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

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.