public List<XDDFTabStop> getTabStops() { if (_p.isSetPPr()) { return getProperties().getTabStops(); } else { return Collections.emptyList(); } }
/** * Set the font to be used on bullet characters within a given paragraph. * * @param font * the bullet font */ public void setBulletFont(XDDFFont font) { if (font != null || _p.isSetPPr()) { getOrCreateBulletProperties().setBulletFont(font); } }
public void removeTabStop(int index) { if (_p.isSetPPr()) { getProperties().removeTabStop(index); } }
/** * Specifies the alignment that is to be applied to the paragraph. Possible * values for this include left, right, centered, justified and distributed, * * @param align * text alignment */ public void setTextAlignment(TextAlignment align) { if (align != null || _p.isSetPPr()) { getOrCreateProperties().setTextAlignment(align); } }
/** * Set the color to be used on bullet characters within a given paragraph. * * @param color * the bullet color */ public void setBulletColor(XDDFColor color) { if (color != null || _p.isSetPPr()) { getOrCreateBulletProperties().setBulletColor(color); } }
public void setBulletStyle(XDDFBulletStyle style) { if (style != null || _p.isSetPPr()) { getOrCreateBulletProperties().setBulletStyle(style); } }
public void setLatinLineBreak(Boolean value) { if (value != null || _p.isSetPPr()) { getOrCreateProperties().setLatinLineBreak(value); } }
public XDDFParagraphBulletProperties getBulletProperties() { if (_p.isSetPPr()) { return getProperties().getBulletProperties(); } else { return null; } }
public void setHangingPunctuation(Boolean value) { if (value != null || _p.isSetPPr()) { getOrCreateProperties().setHangingPunctuation(value); } }
public XDDFTabStop getTabStop(int index) { if (_p.isSetPPr()) { return getProperties().getTabStop(index); } else { return null; } }
public int countTabStops() { if (_p.isSetPPr()) { return getProperties().countTabStops(); } else { return 0; } }
/** * Specifies the default size for a tab character within this paragraph. * * @param points * the default tab size in points. The value <code>null</code> * unsets the default tab size for this paragraph. */ public void setDefaultTabSize(Double points) { if (points != null || _p.isSetPPr()) { getOrCreateProperties().setDefaultTabSize(points); } }
public XDDFRunProperties getDefaultRunProperties() { if (_p.isSetPPr()) { return getProperties().getDefaultRunProperties(); } else { return null; } }
@Override public void setIndentLevel(int level){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); pr.setLvl(level); }
private XDDFParagraphProperties getOrCreateProperties() { if (!_p.isSetPPr()) { _properties = new XDDFParagraphProperties(_p.addNewPPr()); } return getProperties(); }
protected <R> Optional<R> findDefinedParagraphProperty(Function<CTTextParagraphProperties, Boolean> isSet, Function<CTTextParagraphProperties, R> getter) { if (_p.isSetPPr()) { int level = _p.getPPr().isSetLvl() ? 1 + _p.getPPr().getLvl() : 0; return findDefinedParagraphProperty(isSet, getter, level); } else { return _parent.findDefinedParagraphProperty(isSet, getter, 0); } }
protected <R> Optional<R> findDefinedRunProperty(Function<CTTextCharacterProperties, Boolean> isSet, Function<CTTextCharacterProperties, R> getter) { if (_p.isSetPPr()) { int level = _p.getPPr().isSetLvl() ? 1 + _p.getPPr().getLvl() : 0; return findDefinedRunProperty(isSet, getter, level); } else { return _parent.findDefinedRunProperty(isSet, getter, 0); } }
@Override public void setTextAlign(TextAlign align) { CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(align == null) { if(pr.isSetAlgn()) pr.unsetAlgn(); } else { pr.setAlgn(STTextAlignType.Enum.forInt(align.ordinal() + 1)); } }
/** * Add a single tab stop to be used on a line of text when there are one or more tab characters * present within the text. * * @param value the position of the tab stop relative to the left margin */ public void addTabStop(double value){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextTabStopList tabStops = pr.isSetTabLst() ? pr.getTabLst() : pr.addNewTabLst(); tabStops.addNewTab().setPos(Units.toEMU(value)); }