/** * Returns the paragraph alignment which shall be applied to text in this * paragraph. * <p> * <p> * If this element is not set on a given paragraph, its value is determined * by the setting previously set at any level of the style hierarchy (i.e. * that previous setting remains unchanged). If this setting is never * specified in the style hierarchy, then no alignment is applied to the * paragraph. * </p> * * @return the paragraph alignment of this paragraph. */ public ParagraphAlignment getAlignment() { CTPPr pr = getCTPPr(); return pr == null || !pr.isSetJc() ? ParagraphAlignment.LEFT : ParagraphAlignment.valueOf(pr.getJc().getVal().intValue()); }
/** * Specifies the paragraph alignment which shall be applied to text in this * paragraph. * <p> * <p> * If this element is not set on a given paragraph, its value is determined * by the setting previously set at any level of the style hierarchy (i.e. * that previous setting remains unchanged). If this setting is never * specified in the style hierarchy, then no alignment is applied to the * paragraph. * </p> * * @param align the paragraph alignment to apply to this paragraph. */ public void setAlignment(ParagraphAlignment align) { CTPPr pr = getCTPPr(); CTJc jc = pr.isSetJc() ? pr.getJc() : pr.addNewJc(); STJc.Enum en = STJc.Enum.forInt(align.getValue()); jc.setVal(en); }
/** * Specifies the paragraph alignment which shall be applied to text in this * paragraph. * <p/> * <p/> * If this element is not set on a given paragraph, its value is determined * by the setting previously set at any level of the style hierarchy (i.e. * that previous setting remains unchanged). If this setting is never * specified in the style hierarchy, then no alignment is applied to the * paragraph. * </p> * * @param align the paragraph alignment to apply to this paragraph. */ public void setAlignment(ParagraphAlignment align) { CTPPr pr = getCTPPr(); CTJc jc = pr.isSetJc() ? pr.getJc() : pr.addNewJc(); STJc.Enum en = STJc.Enum.forInt(align.getValue()); jc.setVal(en); }
/** * Returns the paragraph alignment which shall be applied to text in this * paragraph. * <p/> * <p/> * If this element is not set on a given paragraph, its value is determined * by the setting previously set at any level of the style hierarchy (i.e. * that previous setting remains unchanged). If this setting is never * specified in the style hierarchy, then no alignment is applied to the * paragraph. * </p> * * @return the paragraph alignment of this paragraph. */ public ParagraphAlignment getAlignment() { CTPPr pr = getCTPPr(); return pr == null || !pr.isSetJc() ? ParagraphAlignment.LEFT : ParagraphAlignment.valueOf(pr.getJc().getVal().intValue()); }
@Override public ParagraphAlignment getValue( CTPPr pPr, XWPFStylesDocument document ) { return pPr == null || !pPr.isSetJc() ? null : ParagraphAlignment.valueOf( pPr.getJc().getVal().intValue() ); }
private ParagraphAlignment getTableAlignment( CTTblPrBase tblPr ) { return tblPr == null || !tblPr.isSetJc() ? null : ParagraphAlignment.valueOf( tblPr.getJc().getVal().intValue() ); }
private ParagraphAlignment getTableAlignment( CTTblPrBase tblPr ) { return tblPr == null || !tblPr.isSetJc() ? null : ParagraphAlignment.valueOf( tblPr.getJc().getVal().intValue() ); }
private ParagraphAlignment getTableAlignment( CTTblPrBase tblPr ) { return tblPr == null || !tblPr.isSetJc() ? null : ParagraphAlignment.valueOf( tblPr.getJc().getVal().intValue() ); }
/** * Returns the current table alignment or NULL * * @return Table Alignment as a {@link TableRowAlign} enum */ public TableRowAlign getTableAlignment() { CTTblPr tPr = getTblPr(false); return tPr == null ? null : tPr.isSetJc() ? TableRowAlign.valueOf(tPr.getJc().getVal().intValue()) : null; }
@Override public ParagraphAlignment getValue( CTPPr pPr, XWPFStylesDocument document ) { return pPr == null || !pPr.isSetJc() ? null : ParagraphAlignment.valueOf( pPr.getJc().getVal().intValue() ); }
/** * Set table alignment to specified {@link TableRowAlign} * * @param tra {@link TableRowAlign} to set */ public void setTableAlignment(TableRowAlign tra) { CTTblPr tPr = getTblPr(true); CTJc jc = tPr.isSetJc() ? tPr.getJc() : tPr.addNewJc(); jc.setVal(STJc.Enum.forInt(tra.getValue())); }
@Override public ParagraphAlignment getValue( CTPPr ppr ) { return ppr == null || !ppr.isSetJc() ? null : ParagraphAlignment.valueOf( ppr.getJc().getVal().intValue() ); }
private ParagraphAlignment getTableAlignment( CTTblPrBase tblPr ) { return tblPr == null || !tblPr.isSetJc() ? null : ParagraphAlignment.valueOf( tblPr.getJc().getVal().intValue() ); }
@Override public ParagraphAlignment getValue( CTPPr ppr ) { return ppr == null || !ppr.isSetJc() ? null : ParagraphAlignment.valueOf( ppr.getJc().getVal().intValue() ); }
/** * Specifies the paragraph alignment which shall be applied to text in this * paragraph. * <p> * <p> * If this element is not set on a given paragraph, its value is determined * by the setting previously set at any level of the style hierarchy (i.e. * that previous setting remains unchanged). If this setting is never * specified in the style hierarchy, then no alignment is applied to the * paragraph. * </p> * * @param align the paragraph alignment to apply to this paragraph. */ public void setAlignment(ParagraphAlignment align) { CTPPr pr = getCTPPr(); CTJc jc = pr.isSetJc() ? pr.getJc() : pr.addNewJc(); STJc.Enum en = STJc.Enum.forInt(align.getValue()); jc.setVal(en); }
/** * Returns the paragraph alignment which shall be applied to text in this * paragraph. * <p> * <p> * If this element is not set on a given paragraph, its value is determined * by the setting previously set at any level of the style hierarchy (i.e. * that previous setting remains unchanged). If this setting is never * specified in the style hierarchy, then no alignment is applied to the * paragraph. * </p> * * @return the paragraph alignment of this paragraph. */ public ParagraphAlignment getAlignment() { CTPPr pr = getCTPPr(); return pr == null || !pr.isSetJc() ? ParagraphAlignment.LEFT : ParagraphAlignment.valueOf(pr.getJc().getVal().intValue()); }
/** * Returns the current table alignment or NULL * * @return Table Alignment as a {@link TableRowAlign} enum */ public TableRowAlign getTableAlignment() { CTTblPr tPr = getTblPr(false); return tPr == null ? null : tPr.isSetJc() ? TableRowAlign.valueOf(tPr.getJc().getVal().intValue()) : null; }
/** * Set table alignment to specified {@link TableRowAlign} * * @param tra {@link TableRowAlign} to set */ public void setTableAlignment(TableRowAlign tra) { CTTblPr tPr = getTblPr(true); CTJc jc = tPr.isSetJc() ? tPr.getJc() : tPr.addNewJc(); jc.setVal(STJc.Enum.forInt(tra.getValue())); }