/** * @since 3.0.0 protected is now public static */ public static float setColumn(ColumnText ct, float left, float bottom, float right, float top) { if (left > right) right = left; if (bottom > top) top = bottom; ct.setSimpleColumn(left, bottom, right, top); return top; }
/** * @since 3.0.0 protected is now public static */ public static float setColumn(ColumnText ct, float left, float bottom, float right, float top) { if (left > right) right = left; if (bottom > top) top = bottom; ct.setSimpleColumn(left, bottom, right, top); return top; }
/** * @since 3.0.0 protected is now public static */ public static float setColumn(ColumnText ct, float left, float bottom, float right, float top) { if (left > right) right = left; if (bottom > top) top = bottom; ct.setSimpleColumn(left, bottom, right, top); return top; }
public ColumnText reconfigure( PdfContentByte cb, Phrase p ) { float filledWidth = ColumnText.getWidth( p, runDirection, 0 ) + 0.5f; ColumnText ct = new ColumnText( cb ); ct.setRunDirection( runDirection ); if ( alignment == Element.ALIGN_LEFT ) { ct.setSimpleColumn( llx, lly, llx + filledWidth, ury, leading, alignment ); } else if ( alignment == Element.ALIGN_RIGHT ) { ct.setSimpleColumn( urx - filledWidth, lly, urx, ury, leading, alignment ); } else if ( alignment == Element.ALIGN_CENTER ) { float delta = ( ( urx - llx ) - filledWidth ) / 2; ct.setSimpleColumn( urx + delta, lly, urx - delta, ury, leading, alignment ); } else { ct.setSimpleColumn( llx, lly, urx, ury, leading, alignment ); } return ct; } }
/** * Simplified method for rectangular columns. * * @param phrase a <CODE>Phrase</CODE> * @param llx the lower left x corner * @param lly the lower left y corner * @param urx the upper right x corner * @param ury the upper right y corner * @param leading the leading * @param alignment the column alignment */ public void setSimpleColumn(Phrase phrase, float llx, float lly, float urx, float ury, float leading, int alignment) { addText(phrase); setSimpleColumn(llx, lly, urx, ury, leading, alignment); }
/** * Simplified method for rectangular columns. * * @param llx the lower left x corner * @param lly the lower left y corner * @param urx the upper right x corner * @param ury the upper right y corner * @param leading the leading * @param alignment the column alignment */ public void setSimpleColumn(float llx, float lly, float urx, float ury, float leading, int alignment) { setLeading(leading); this.alignment = alignment; setSimpleColumn(llx, lly, urx, ury); }
/** * Simplified method for rectangular columns. * * @param llx the lower left x corner * @param lly the lower left y corner * @param urx the upper right x corner * @param ury the upper right y corner * @param leading the leading * @param alignment the column alignment */ public void setSimpleColumn(float llx, float lly, float urx, float ury, float leading, int alignment) { setLeading(leading); this.alignment = alignment; setSimpleColumn(llx, lly, urx, ury); }
/** * Simplified method for rectangular columns. * * @param llx the lower left x corner * @param lly the lower left y corner * @param urx the upper right x corner * @param ury the upper right y corner * @param leading the leading * @param alignment the column alignment */ public void setSimpleColumn(float llx, float lly, float urx, float ury, float leading, int alignment) { setLeading(leading); this.alignment = alignment; setSimpleColumn(llx, lly, urx, ury); }
/** * Simplified method for rectangular columns. * * @param phrase a <CODE>Phrase</CODE> * @param llx the lower left x corner * @param lly the lower left y corner * @param urx the upper right x corner * @param ury the upper right y corner * @param leading the leading * @param alignment the column alignment */ public void setSimpleColumn(Phrase phrase, float llx, float lly, float urx, float ury, float leading, int alignment) { addText(phrase); setSimpleColumn(llx, lly, urx, ury, leading, alignment); }
/** * Simplified method for rectangular columns. * * @param phrase a <CODE>Phrase</CODE> * @param llx the lower left x corner * @param lly the lower left y corner * @param urx the upper right x corner * @param ury the upper right y corner * @param leading the leading * @param alignment the column alignment */ public void setSimpleColumn(Phrase phrase, float llx, float lly, float urx, float ury, float leading, int alignment) { addText(phrase); setSimpleColumn(llx, lly, urx, ury, leading, alignment); }
/** * Consumes part of the content of the cell. * @param height the hight of the part that has to be consumed * @since 2.1.6 */ void consumeHeight(float height) { float rightLimit = getRight() - getEffectivePaddingRight(); float leftLimit = getLeft() + getEffectivePaddingLeft(); float bry = height - getEffectivePaddingTop() - getEffectivePaddingBottom(); if (getRotation() != 90 && getRotation() != 270) { column.setSimpleColumn(leftLimit, bry + 0.001f, rightLimit, 0); } else { column.setSimpleColumn(0, leftLimit, bry + 0.001f, rightLimit); } try { column.go(true); } catch (DocumentException e) { // do nothing } }
/** * Consumes part of the content of the cell. * @param height the hight of the part that has to be consumed * @since 2.1.6 */ void consumeHeight(float height) { float rightLimit = getRight() - getEffectivePaddingRight(); float leftLimit = getLeft() + getEffectivePaddingLeft(); float bry = height - getEffectivePaddingTop() - getEffectivePaddingBottom(); if (getRotation() != 90 && getRotation() != 270) { column.setSimpleColumn(leftLimit, bry + 0.001f, rightLimit, 0); } else { column.setSimpleColumn(0, leftLimit, bry + 0.001f, rightLimit); } try { column.go(true); } catch (DocumentException e) { // do nothing } }
/** * Consumes part of the content of the cell. * @param height the hight of the part that has to be consumed * @since 2.1.6 */ void consumeHeight(float height) { float rightLimit = getRight() - getEffectivePaddingRight(); float leftLimit = getLeft() + getEffectivePaddingLeft(); float bry = height - getEffectivePaddingTop() - getEffectivePaddingBottom(); if (getRotation() != 90 && getRotation() != 270) { column.setSimpleColumn(leftLimit, bry + 0.001f, rightLimit, 0); } else { column.setSimpleColumn(0, leftLimit, bry + 0.001f, rightLimit); } try { column.go(true); } catch (DocumentException e) { // do nothing } }
private void setColIdx( int idx ) { colIdx = idx; PdfPCell cell = StylableDocumentSection.getCell( layoutTable, colIdx ); text.setSimpleColumn( cell.getLeft() + cell.getPaddingLeft(), -getAdjustedPageHeight(), cell.getRight() - cell.getPaddingRight(), 0.0f ); cell.setColumn( ColumnText.duplicate( text ) ); }
private void setColIdx( int idx ) { colIdx = idx; PdfPCell cell = StylableDocumentSection.getCell( layoutTable, colIdx ); text.setSimpleColumn( cell.getLeft() + cell.getPaddingLeft(), -getAdjustedPageHeight(), cell.getRight() - cell.getPaddingRight(), 0.0f ); cell.setColumn( ColumnText.duplicate( text ) ); }
private void setColIdx( int idx ) { colIdx = idx; PdfPCell cell = StylableDocumentSection.getCell( layoutTable, colIdx ); text.setSimpleColumn( cell.getLeft() + cell.getPaddingLeft(), -getAdjustedPageHeight(), cell.getRight() - cell.getPaddingRight(), 0.0f ); cell.setColumn( ColumnText.duplicate( text ) ); }
private void setColIdx( int idx ) { colIdx = idx; PdfPCell cell = StylableDocumentSection.getCell( layoutTable, colIdx ); text.setSimpleColumn( cell.getLeft() + cell.getPaddingLeft(), -getAdjustedPageHeight(), cell.getRight() - cell.getPaddingRight(), 0.0f ); cell.setColumn( ColumnText.duplicate( text ) ); }
protected void writePageAnchor(int pageIndex) throws DocumentException { Map pdfFontAttrs = getDefaultPdfFontAttributes(); Chunk chunk; if (pdfFontAttrs == null) { chunk = new Chunk(" "); } else { Font pdfFont = getFont(pdfFontAttrs, getLocale()); chunk = new Chunk(" ", pdfFont); } chunk.setLocalDestination(JR_PAGE_ANCHOR_PREFIX + reportIndex + "_" + (pageIndex + 1)); tagHelper.startPageAnchor(); ColumnText colText = new ColumnText(pdfContentByte); colText.setSimpleColumn( new Phrase(chunk), 0, jasperPrint.getPageHeight(), 1, 1, 0, Element.ALIGN_LEFT ); colText.go(); tagHelper.endPageAnchor(); }
int loop = 0; while (true) { ct.setSimpleColumn(indentLeft(), indentBottom(), indentRight(), indentTop() - currentHeight); int status = ct.go(); if ((status & ColumnText.NO_MORE_TEXT) != 0) {
int loop = 0; while (true) { ct.setSimpleColumn(indentLeft(), indentBottom(), indentRight(), indentTop() - currentHeight); int status = ct.go(); if ((status & ColumnText.NO_MORE_TEXT) != 0) {