Examples of CTTblCellMar


Examples of org.docx4j.wml.CTTblCellMar

      log.warn("table.getEffectiveTableStyle().getTblPr() is null, but should never be");
      return;
    }
   
  TblBorders tblBorders = tblPr.getTblBorders();
  CTTblCellMar tblCellMargin = tblPr.getTblCellMar();
    if (tblBorders!=null) {
      if (tblBorders.getInsideH()!=null) {
        properties.add(new BorderTop(tblBorders.getTop()));
        properties.add(new BorderBottom(tblBorders.getBottom()));
      }
      if (tblBorders.getInsideV()!=null) {
        properties.add(new BorderRight(tblBorders.getRight()));
        properties.add(new BorderLeft(tblBorders.getLeft()));
      }           
    }

    if (tblCellMargin != null) {
      if (tblCellMargin.getTop() != null)
        properties.add(new CellMarginTop(tblCellMargin.getTop()));
      if (tblCellMargin.getBottom() != null)
        properties.add(new CellMarginBottom(tblCellMargin.getBottom()));
      if (tblCellMargin.getLeft() != null)
        properties.add(new CellMarginLeft(tblCellMargin.getLeft()));
      if (tblCellMargin.getRight() != null)
        properties.add(new CellMarginRight(tblCellMargin.getRight()));
    }
   
  }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginTop() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getTop();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginLeft() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getLeft();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginBottom() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getBottom();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginRight() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getRight();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

        return margin;
    }

    public void setCellMargins(int top, int left, int bottom, int right) {
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.isSetTblCellMar() ? tblPr.getTblCellMar() : tblPr.addNewTblCellMar();

        CTTblWidth tw = tcm.isSetLeft() ? tcm.getLeft() : tcm.addNewLeft();
        tw.setType(STTblWidth.DXA);
        tw.setW(BigInteger.valueOf(left));

        tw = tcm.isSetTop() ? tcm.getTop() : tcm.addNewTop();
        tw.setType(STTblWidth.DXA);
        tw.setW(BigInteger.valueOf(top));

        tw = tcm.isSetBottom() ? tcm.getBottom() : tcm.addNewBottom();
        tw.setType(STTblWidth.DXA);
        tw.setW(BigInteger.valueOf(bottom));

        tw = tcm.isSetRight() ? tcm.getRight() : tcm.addNewRight();
        tw.setType(STTblWidth.DXA);
        tw.setW(BigInteger.valueOf(right));
    }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginTop() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getTop();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginLeft() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getLeft();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginBottom() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getBottom();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar

    }

    public int getCellMarginRight() {
        int margin = 0;
        CTTblPr tblPr = getTrPr();
        CTTblCellMar tcm = tblPr.getTblCellMar();
        if (tcm != null) {
            CTTblWidth tw = tcm.getRight();
            if (tw != null) {
                margin = tw.getW().intValue();
            }
        }
        return margin;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.