public void setPageNumber(int pageNumber) { if (pageNumber > 0) { mElement.setStylePageNumberAttribute(pageNumber); } else { mElement.removeAttribute("style:page-number"); } }
public void setPageNumber(int pageNumber) { if (pageNumber > 0) { mElement.setStylePageNumberAttribute(pageNumber); } else { mElement.removeAttribute("style:page-number"); } }
public void setBreak(String breakPosition, String breakAttribute) { if (breakPosition == null) { return; } if (breakAttribute == null) { if (breakPosition.equals("before")) { mElement.removeAttribute(FoBreakBeforeAttribute.ATTRIBUTE_NAME.getQName()); } else if (breakPosition.equals("after")) { mElement.removeAttribute(FoBreakAfterAttribute.ATTRIBUTE_NAME.getQName()); } } else if (breakPosition.equals("before")) { mElement.setFoBreakBeforeAttribute(breakAttribute); } else if (breakPosition.equals("after")) { mElement.setFoBreakAfterAttribute(breakAttribute); } }
public void setBreak(String breakPosition, String breakAttribute) { if (breakPosition == null) { return; } if (breakAttribute == null) { if (breakPosition.equals("before")) { mElement.removeAttribute(FoBreakBeforeAttribute.ATTRIBUTE_NAME.getQName()); } else if (breakPosition.equals("after")) { mElement.removeAttribute(FoBreakAfterAttribute.ATTRIBUTE_NAME.getQName()); } } else if (breakPosition.equals("before")) { mElement.setFoBreakBeforeAttribute(breakAttribute); } else if (breakPosition.equals("after")) { mElement.setFoBreakAfterAttribute(breakAttribute); } }
/** * Set the bottom margin of this <code>ParagraphProperties</code> * * @param marginBottom the size of the bottom margin (in Millimeter) * @since 0.7 */ public void setMarginBottom(double marginBottom) { if (marginBottom == 0) { mElement.removeAttribute(FoMarginBottomAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginBottomAttribute(getInchValue(marginBottom)); } }
/** * Set the top margin of this <code>ParagraphProperties</code> * * @param marginTop the size of the right margin (in Millimeter) * @since 0.7 */ public void setMarginTop(double marginTop) { if (marginTop == 0) { mElement.removeAttribute(FoMarginTopAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginTopAttribute(getInchValue(marginTop)); } }
/** * Set the text indention size of this <code>ParagraphProperties</code> * * @param textIndent the size of the text indention (in Millimeter) * @since 0.7 */ public void setTextIndent(double textIndent) { if (textIndent == 0) { mElement.removeAttribute(FoTextIndentAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoTextIndentAttribute(getInchValue(textIndent)); } }
/** * Set the left margin of this <code>ParagraphProperties</code> * * @param marginLeft the size of the left margin (in Millimeter) * @since 0.7 */ public void setMarginLeft(double marginLeft) { if (marginLeft == 0) { mElement.removeAttribute(FoMarginLeftAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginLeftAttribute(getInchValue(marginLeft)); } }
/** * Set the right margin of this <code>ParagraphProperties</code> * * @param marginRight the size of the right margin (in Millimeter) * @since 0.7 */ public void setMarginRight(double marginRight) { if (marginRight == 0) { mElement.removeAttribute(FoMarginRightAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginRightAttribute(getInchValue(marginRight)); } }
/** * Set the left margin of this <code>ParagraphProperties</code> * * @param marginLeft the size of the left margin (in Millimeter) * @since 0.7 */ public void setMarginLeft(double marginLeft) { if (marginLeft == 0) { mElement.removeAttribute(FoMarginLeftAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginLeftAttribute(getInchValue(marginLeft)); } }
/** * Set the bottom margin of this <code>ParagraphProperties</code> * * @param marginBottom the size of the bottom margin (in Millimeter) * @since 0.7 */ public void setMarginBottom(double marginBottom) { if (marginBottom == 0) { mElement.removeAttribute(FoMarginBottomAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginBottomAttribute(getInchValue(marginBottom)); } }
/** * Set the right margin of this <code>ParagraphProperties</code> * * @param marginRight the size of the right margin (in Millimeter) * @since 0.7 */ public void setMarginRight(double marginRight) { if (marginRight == 0) { mElement.removeAttribute(FoMarginRightAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginRightAttribute(getInchValue(marginRight)); } }
/** * Set the text indention size of this <code>ParagraphProperties</code> * * @param textIndent the size of the text indention (in Millimeter) * @since 0.7 */ public void setTextIndent(double textIndent) { if (textIndent == 0) { mElement.removeAttribute(FoTextIndentAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoTextIndentAttribute(getInchValue(textIndent)); } }
/** * Set the top margin of this <code>ParagraphProperties</code> * * @param marginTop the size of the right margin (in Millimeter) * @since 0.7 */ public void setMarginTop(double marginTop) { if (marginTop == 0) { mElement.removeAttribute(FoMarginTopAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoMarginTopAttribute(getInchValue(marginTop)); } }
/** * Set the horizontal alignment. * <p> * If the first parameter is null, the horizontal alignment setting will be * removed. * * @param alignType * - the horizontal alignment */ public void setHorizontalAlignment(HorizontalAlignmentType alignType) { if (alignType == HorizontalAlignmentType.DEFAULT) mElement.removeAttribute(FoTextAlignAttribute.ATTRIBUTE_NAME.getQName()); else mElement.setFoTextAlignAttribute(alignType.getAlignmentString()); }
/** * Set the horizontal alignment. * <p> * If the first parameter is null, the horizontal alignment setting will be * removed. * * @param alignType - the horizontal alignment */ public void setHorizontalAlignment(HorizontalAlignmentType alignType) { if (alignType == HorizontalAlignmentType.DEFAULT) { mElement.removeAttribute(FoTextAlignAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoTextAlignAttribute(alignType.getAlignmentString()); } }
/** * Set the horizontal alignment. * <p> * If the first parameter is null, the horizontal alignment setting will be * removed. * * @param alignType - the horizontal alignment */ public void setHorizontalAlignment(HorizontalAlignmentType alignType) { if (alignType == HorizontalAlignmentType.DEFAULT) { mElement.removeAttribute(FoTextAlignAttribute.ATTRIBUTE_NAME.getQName()); } else { mElement.setFoTextAlignAttribute(alignType.getAlignmentString()); } }
StyleParagraphPropertiesElement property = (StyleParagraphPropertiesElement) paragraphProperties .item(0); property.removeAttribute("fo:break-before"); property.removeAttribute("fo:break-after"); property.removeAttribute("style:page-number");
StyleParagraphPropertiesElement property = (StyleParagraphPropertiesElement) paragraphProperties .item(0); property.removeAttribute("fo:break-before"); property.removeAttribute("fo:break-after"); property.removeAttribute("style:page-number");
StyleParagraphPropertiesElement property = (StyleParagraphPropertiesElement) paragraphProperties .item(0); property.removeAttribute("fo:break-before"); property.removeAttribute("fo:break-after"); property.removeAttribute("style:page-number");