Package org.docx4j.wml

Examples of org.docx4j.wml.Br


  @Override
  public Node toNode(AbstractWmlConversionContext context, Object unmarshalledNode,
      Node modelContent, TransformState state, Document doc)
      throws TransformerException {
   
    Br modelData = (Br)unmarshalledNode;
    Element ret;
   
    if (modelData.getType()!=null
        && modelData.getType().equals(STBrType.PAGE)) {
   
      ret = doc.createElementNS(XSL_FO, "block");
      ret.setAttribute("break-before", "page");
   
    } else {
View Full Code Here


 
  @Override
  public Node toNode(AbstractWmlConversionContext context, Object unmarshalledNode,
      Node modelContent, TransformState state, Document doc)
      throws TransformerException {
  Br modelData = (Br)unmarshalledNode;
  Element ret = doc.createElement("br");
   
    if ((modelData.getClear() != null) &&
      (!modelData.getClear().equals(STBrClear.NONE))) {
      ret.setAttribute("clear", modelData.getClear().name());
    }
    if (modelData.getType()!=null
        && modelData.getType().equals(STBrType.PAGE)) {
      ret.setAttribute("style", "page-break-before:always");
    }
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.docx4j.wml.Br

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.