/** * Returns the alignment that is applied to the paragraph. * * If this attribute is omitted, then a value of left is implied. * * @return alignment that is applied to the paragraph */ public TextAlignment getTextAlignment() { return findDefinedParagraphProperty(props -> props.isSetAlgn(), props -> props.getAlgn()) .map(align -> TextAlignment.valueOf(align)).orElse(null); }
public void setTextAlignment(TextAlignment align) { if (align == null) { if (props.isSetAlgn()) { props.unsetAlgn(); } } else { props.setAlgn(align.underlying); } }
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetAlgn()){ TextAlign val = TextAlign.values()[props.getAlgn().intValue() - 1]; setValue(val); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetAlgn()){ TextAlign val = TextAlign.values()[props.getAlgn().intValue() - 1]; setValue(val); return true; } return false; } };
@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)); } }
/** * Specifies the alignment that is to be applied to the paragraph. * Possible values for this include left, right, centered, justified and distributed, * see {@link org.apache.poi.xssf.usermodel.TextAlign}. * * @param align text align */ 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)); } }
public void setTextAlignment(TextAlignment align) { if (align == null) { if (props.isSetAlgn()) { props.unsetAlgn(); } } else { props.setAlgn(align.underlying); } }
/** * Returns the alignment that is applied to the paragraph. * * If this attribute is omitted, then a value of left is implied. * * @return alignment that is applied to the paragraph */ public TextAlignment getTextAlignment() { return findDefinedParagraphProperty(props -> props.isSetAlgn(), props -> props.getAlgn()) .map(align -> TextAlignment.valueOf(align)).orElse(null); }
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetAlgn()){ TextAlign val = TextAlign.values()[props.getAlgn().intValue() - 1]; setValue(val); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetAlgn()){ TextAlign val = TextAlign.values()[props.getAlgn().intValue() - 1]; setValue(val); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetAlgn()){ TextAlign val = TextAlign.values()[props.getAlgn().intValue() - 1]; setValue(val); return true; } return false; } };
@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)); } }
/** * Specifies the alignment that is to be applied to the paragraph. * Possible values for this include left, right, centered, justified and distributed, * see {@link org.apache.poi.xslf.usermodel.TextAlign}. * * @param align text align */ 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)); } }
/** * Specifies the alignment that is to be applied to the paragraph. * Possible values for this include left, right, centered, justified and distributed, * see {@link org.apache.poi.xssf.usermodel.TextAlign}. * * @param align text align */ 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)); } }