本文整理匯總了Java中com.lowagie.text.Rectangle.setBottom方法的典型用法代碼示例。如果您正苦於以下問題:Java Rectangle.setBottom方法的具體用法?Java Rectangle.setBottom怎麽用?Java Rectangle.setBottom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.lowagie.text.Rectangle
的用法示例。
在下文中一共展示了Rectangle.setBottom方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onGenericTag
import com.lowagie.text.Rectangle; //導入方法依賴的package包/類
/**
* @see com.lowagie.text.pdf.PdfPageEvent#onGenericTag(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document, com.lowagie.text.Rectangle, java.lang.String)
*/
public void onGenericTag(PdfWriter writer, Document document,
Rectangle rect, String text) {
rect.setBottom(rect.getBottom() - 3);
PdfFormField field = (PdfFormField) genericChunkFields.get(text);
if (field == null) {
TextField tf = new TextField(writer, new Rectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)), text);
tf.setFontSize(14);
try {
field = tf.getTextField();
} catch (Exception e) {
throw new ExceptionConverter(e);
}
}
else {
field.put(PdfName.RECT, new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
}
if (parent == null)
writer.addAnnotation(field);
else
parent.addKid(field);
}
示例2: rectangle
import com.lowagie.text.Rectangle; //導入方法依賴的package包/類
/**
* Gets a Rectangle that is altered to fit on the page.
*
* @param top the top position
* @param bottom the bottom position
* @return a <CODE>Rectangle</CODE>
*/
public Rectangle rectangle(float top, float bottom) {
Rectangle tmp = new Rectangle(getLeft(), getBottom(), getRight(), getTop());
tmp.cloneNonPositionParameters(this);
if (getTop() > top) {
tmp.setTop(top);
tmp.setBorder(border - (border & TOP));
}
if (getBottom() < bottom) {
tmp.setBottom(bottom);
tmp.setBorder(border - (border & BOTTOM));
}
return tmp;
}