public static TblBorders apply(TblBorders source, TblBorders destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createTblBorders(); destination.setBottom(apply(source.getBottom(), destination.getBottom())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setTop(apply(source.getTop(), destination.getTop())); destination.setInsideH(apply(source.getInsideH(), destination.getInsideH())); destination.setInsideV(apply(source.getInsideV(), destination.getInsideV())); } return destination; }
/** * Create an instance of {@link TblBorders } * */ public TblBorders createTblBorders() { return new TblBorders(); }
public static boolean areEqual(TblBorders borders1, TblBorders borders2) { return (borders1 == borders2) || ((borders1 != null) && (borders2 != null) && areEqual(borders1.getBottom(), borders2.getBottom()) && areEqual(borders1.getLeft(), borders2.getLeft()) && areEqual(borders1.getRight(), borders2.getRight()) && areEqual(borders1.getTop(), borders2.getTop()) && areEqual(borders1.getInsideH(), borders2.getInsideH()) && areEqual(borders1.getInsideV(), borders2.getInsideV()) ); }
tblborders.setLeft(border); border.setVal(org.docx4j.wml.STBorder.SINGLE); border.setSz(BigInteger.valueOf(2)); tblborders.setRight(border2); border2.setVal(org.docx4j.wml.STBorder.SINGLE); border2.setSz(BigInteger.valueOf(2)); tblborders.setTop(border3); border3.setVal(org.docx4j.wml.STBorder.SINGLE); border3.setSz(BigInteger.valueOf(2)); tblborders.setBottom(border4); border4.setVal(org.docx4j.wml.STBorder.SINGLE); border4.setSz(BigInteger.valueOf(2)); tblborders.setInsideH(border5); border5.setVal(org.docx4j.wml.STBorder.SINGLE); border5.setSz(BigInteger.valueOf(2)); tblborders.setInsideV(border6); border6.setVal(org.docx4j.wml.STBorder.SINGLE); border6.setSz(BigInteger.valueOf(2));
if (tblBorders.getTop()!=null) properties.add(new BorderTop(tblBorders.getTop()) ); if (tblBorders.getBottom()!=null) properties.add(new BorderBottom(tblBorders.getBottom()) ); if (tblBorders.getLeft()!=null) properties.add(new BorderLeft(tblBorders.getLeft()) ); if (tblBorders.getRight()!=null) properties.add(new BorderRight(tblBorders.getRight()) );
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setBottom( (CTBorder)this.getObject() ); }
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setRight( (CTBorder)this.getObject() ); }
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setTop( (CTBorder)this.getObject() ); }
borders.setTop( copyBorderStyle(cssTable, "top", true) ); borders.setBottom( copyBorderStyle(cssTable, "bottom", true) ); borders.setLeft( copyBorderStyle(cssTable, "left", true) ); borders.setRight( copyBorderStyle(cssTable, "right", true) ); borders.setInsideH( createBorderStyle(STBorder.NONE, null, null) ); borders.setInsideV( createBorderStyle(STBorder.NONE, null, null) ); tblPr.setTblBorders(borders); CTBorder leftBorder = borders.getLeft(); if (leftBorder!=null && leftBorder.getVal()!=null
public static boolean isEmpty(TblBorders borders) { return (borders == null) || (isEmpty(borders.getBottom()) && isEmpty(borders.getLeft()) && isEmpty(borders.getRight()) && isEmpty(borders.getTop()) && isEmpty(borders.getInsideH()) && isEmpty(borders.getInsideV()) ); }
if (tblBorders.getTop()!=null) properties.add(new BorderTop(tblBorders.getTop()) ); if (tblBorders.getBottom()!=null) properties.add(new BorderBottom(tblBorders.getBottom()) ); if (tblBorders.getLeft()!=null) properties.add(new BorderLeft(tblBorders.getLeft()) ); if (tblBorders.getRight()!=null) properties.add(new BorderRight(tblBorders.getRight()) );
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setBottom( (CTBorder)this.getObject() ); }
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setRight( (CTBorder)this.getObject() ); }
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setTop( (CTBorder)this.getObject() ); }
public static TblBorders apply(TblBorders source, TblBorders destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createTblBorders(); destination.setBottom(apply(source.getBottom(), destination.getBottom())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setTop(apply(source.getTop(), destination.getTop())); destination.setInsideH(apply(source.getInsideH(), destination.getInsideH())); destination.setInsideV(apply(source.getInsideV(), destination.getInsideV())); } return destination; }
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()));
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setBottom( (CTBorder)this.getObject() ); }
/** * Create an instance of {@link TblBorders } * */ public TblBorders createTblBorders() { return new TblBorders(); }
&& s.getTblPr().getTblBorders()!=null ) { TblBorders tblBorders = s.getTblPr().getTblBorders(); if (tblBorders.getInsideH()!=null) { if (tblBorders.getInsideH().getVal()==STBorder.NONE || tblBorders.getInsideH().getVal()==STBorder.NIL || tblBorders.getInsideH().getSz()==BigInteger.ZERO ) { properties.add( new AdHocProperty("border-top-style", "none", null, null)); properties.add( new AdHocProperty("border-top-width", "0mm", null, null)); properties.add( new AdHocProperty("border-bottom-width", "0mm", null, null)); } else { properties.add( new BorderTop(tblBorders.getTop() )); properties.add( new BorderBottom(tblBorders.getBottom() )); if (tblBorders.getInsideV()!=null) { if (tblBorders.getInsideV().getVal()==STBorder.NONE || tblBorders.getInsideV().getVal()==STBorder.NIL || tblBorders.getInsideV().getSz()==BigInteger.ZERO ) { properties.add( new AdHocProperty("border-left-style", "none", null, null)); properties.add( new AdHocProperty("border-left-width", "0mm", null, null)); properties.add( new AdHocProperty("border-right-width", "0mm", null, null)); } else { properties.add( new BorderRight(tblBorders.getRight() )); properties.add( new BorderLeft(tblBorders.getLeft() ));
@Override public void set(TblPr tblPr) { if (tblPr.getTblBorders()==null) { TblBorders tblBorders = Context.getWmlObjectFactory().createTblBorders(); tblPr.setTblBorders(tblBorders); } tblPr.getTblBorders().setBottom( (CTBorder)this.getObject() ); }