protected void appendNoneBordersAndShading(List<Property> tableProperties) { CTBorder ctBrdr = null; CTShd shd = Context.getWmlObjectFactory().createCTShd(); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderLeft(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderRight(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderTop(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderBottom(ctBrdr)); shd.setColor("auto"); shd.setFill("auto"); shd.setVal(STShd.CLEAR); tableProperties.add(new Shading(shd)); }
public static CTBorder apply(CTBorder source, CTBorder destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTBorder(); destination.setColor(apply(source.getColor(), destination.getColor())); destination.setSpace(apply(source.getSpace(), destination.getSpace())); destination.setSz(apply(source.getSz(), destination.getSz())); destination.setThemeColor(source.getThemeColor()); destination.setThemeShade(apply(source.getThemeShade(), destination.getThemeShade())); destination.setThemeTint(apply(source.getThemeTint(), destination.getThemeTint())); destination.setVal(apply(source.getVal(), destination.getVal())); } return destination; }
public CTBorder keepDiff(CTBorder orig, CTBorder from) { if (from != null && orig != null) { if (orig.getVal() != null && from.getVal() != null && from.getVal() != null && orig.getVal().compareTo(from.getVal()) == 0) orig.setVal(null); if (orig.getThemeColor() != null && from.getThemeColor() != null && orig.getThemeColor().compareTo(from.getThemeColor()) == 0) orig.setThemeColor(null); if (orig.getSpace() != null && from.getSpace() != null && orig.getSpace().compareTo(from.getSpace()) == 0) orig.setSpace(null); if (orig.getSz() != null && from.getSz() != null && orig.getSz().compareTo(from.getSz()) == 0) orig.setSz(null); if (orig.getColor() != null && from.getColor() != null && orig.getColor().compareTo(from.getColor()) == 0) orig.setColor(null); if (orig.getThemeShade() != null && from.getThemeShade() != null && orig.getThemeShade().compareTo(from.getThemeShade()) == 0) orig.setThemeShade(null); if (orig.getThemeTint() != null && from.getThemeTint() != null && orig.getThemeTint().compareTo(from.getThemeTint()) == 0) orig.setThemeTint(null); if (orig.isFrame() == from.isFrame()) orig.setFrame(null); if (orig.isShadow() == from.isShadow()) orig.setShadow(null); } return StyleUtil.isEmpty(orig) ? null : orig; }
border.setVal(org.docx4j.wml.STBorder.SINGLE); border.setSz(BigInteger.valueOf(2)); border.setColor("000001"); border2.setVal(org.docx4j.wml.STBorder.SINGLE); border2.setSz(BigInteger.valueOf(2)); border2.setColor("000001"); border3.setVal(org.docx4j.wml.STBorder.SINGLE); border3.setSz(BigInteger.valueOf(2)); border3.setColor("000001"); border4.setVal(org.docx4j.wml.STBorder.SINGLE); border4.setSz(BigInteger.valueOf(2)); border4.setColor("000001"); border5.setVal(org.docx4j.wml.STBorder.SINGLE); border5.setSz(BigInteger.valueOf(2)); border5.setColor("000001"); border6.setVal(org.docx4j.wml.STBorder.SINGLE); border6.setSz(BigInteger.valueOf(2)); border6.setColor("000001");
public CTBorder getCopy(CTBorder copy, boolean whenNull) { if (copy != null) { CTBorder result = myFactory.createCTBorder(); result.setVal(copy.getVal()); result.setThemeColor(copy.getThemeColor()); result.setSpace(copy.getSpace()); result.setSz(copy.getSz()); result.setFrame(copy.isFrame()); result.setShadow(copy.isShadow()); result.setColor(copy.getColor()); result.setThemeShade(copy.getThemeShade()); result.setThemeTint(copy.getThemeTint()); return result; } if (whenNull) { return myFactory.createCTBorder(); } return null; }
private CTBorder createBorderStyle(STBorder val, String color, BigInteger sz) { CTBorder border = Context.getWmlObjectFactory().createCTBorder(); border.setVal(val); border.setColor(color); border.setSz(sz); return border; }
private CTBorder createBorderStyle(STBorder val, String color, BigInteger sz) { CTBorder border = Context.getWmlObjectFactory().createCTBorder(); border.setVal(val); border.setColor(color); border.setSz(sz); return border; }
protected void appendNoneBordersAndShading(List<Property> tableProperties) { CTBorder ctBrdr = null; CTShd shd = Context.getWmlObjectFactory().createCTShd(); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderLeft(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderRight(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderTop(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderBottom(ctBrdr)); shd.setColor("auto"); shd.setFill("auto"); shd.setVal(STShd.CLEAR); tableProperties.add(new Shading(shd)); }
public static CTBorder apply(CTBorder source, CTBorder destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTBorder(); destination.setColor(apply(source.getColor(), destination.getColor())); destination.setSpace(apply(source.getSpace(), destination.getSpace())); destination.setSz(apply(source.getSz(), destination.getSz())); destination.setThemeColor(source.getThemeColor()); destination.setThemeShade(apply(source.getThemeShade(), destination.getThemeShade())); destination.setThemeTint(apply(source.getThemeTint(), destination.getThemeTint())); destination.setVal(apply(source.getVal(), destination.getVal())); } return destination; }
borderNone.setVal(STBorder.NONE);