public Justification(CSSValue value) { debug(CSS_NAME, value); Jc jc = Context.getWmlObjectFactory().createJc(); if (value.getCssText().toLowerCase().equals("left")) { jc.setVal(JcEnumeration.LEFT); } else if (value.getCssText().toLowerCase().equals("center")) { jc.setVal(JcEnumeration.CENTER); } else if (value.getCssText().toLowerCase().equals("right")) { jc.setVal(JcEnumeration.RIGHT); } else if (value.getCssText().toLowerCase().equals("justify")) { jc.setVal(JcEnumeration.BOTH); } else { log.warn("How to handle justification: " + value.getCssText()); } this.setObject( jc ); }
public static Jc apply(Jc source, Jc destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createJc(); destination.setVal(source.getVal()); //enum } return destination; }
Jc jc = factory.createJc(); String algn = lvlPPr.getAlgn().value(); log.debug("algn: " + algn);
@Override public P getLastP() { final List<Object> content = myTc.getContent(); if (myFirstP[0] && (content == null || content.size() == 0)) { // Create object for p P p = myDocx.createP(); PPr ppr = p.getPPr(); // Create object for jc if (myNode.getAlignment() != null) { JcEnumeration alignValue = getAlignValue(myNode.getAlignment()); Jc jc3 = myDocx.getFactory().createJc(); ppr.setJc(jc3); jc3.setVal(alignValue); } myFirstP[0] = false; } if (content == null || content.size() == 0) return null; final Object o = content.get(content.size() - 1); return o instanceof P ? (P) o : null; } }
Jc jc = docx.getFactory().createJc(); tblpr.setJc(jc); jc.setVal(JcEnumeration.LEFT);
public Justification(CSSValue value) { debug(CSS_NAME, value); Jc jc = Context.getWmlObjectFactory().createJc(); if (value.getCssText().toLowerCase().equals("left")) { jc.setVal(JcEnumeration.LEFT); } else if (value.getCssText().toLowerCase().equals("center")) { jc.setVal(JcEnumeration.CENTER); } else if (value.getCssText().toLowerCase().equals("right")) { jc.setVal(JcEnumeration.RIGHT); } else if (value.getCssText().toLowerCase().equals("justify")) { jc.setVal(JcEnumeration.BOTH); } else { log.warn("How to handle justification: " + value.getCssText()); } this.setObject( jc ); }
public static Jc apply(Jc source, Jc destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createJc(); destination.setVal(source.getVal()); //enum } return destination; }
Jc jc = factory.createJc(); String algn = lvlPPr.getAlgn().value(); log.debug("algn: " + algn);
Jc jc = wmlObjectFactory.createJc(); lvl.setLvlJc(jc); jc.setVal(org.docx4j.wml.JcEnumeration.LEFT);
stylePPrJc = Context.getWmlObjectFactory().createJc(); stylePPrJc.setVal(JcEnumeration.LEFT);