public class VerticalPositionMark extends Object implements DrawInterface, Element
Modifier and Type | Field and Description |
---|---|
protected DrawInterface |
drawInterface
Another implementation of the DrawInterface; its draw method will overrule LineSeparator.draw().
|
protected float |
offset
The offset for the line.
|
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK
Constructor and Description |
---|
VerticalPositionMark()
Creates a vertical position mark that won't draw anything unless
you define a DrawInterface.
|
VerticalPositionMark(DrawInterface drawInterface,
float offset)
Creates a vertical position mark that won't draw anything unless
you define a DrawInterface.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(PdfContentByte canvas,
float llx,
float lly,
float urx,
float ury,
float y)
Implement this method if you want to draw something at the current Y position
(for instance a line).
|
ArrayList |
getChunks()
Gets all the chunks in this element.
|
DrawInterface |
getDrawInterface()
Getter for the interface with the overruling draw() method.
|
float |
getOffset()
Getter for the offset relative to the baseline of the current line.
|
boolean |
isContent()
Checks if this element is a content object.
|
boolean |
isNestable()
Checks if this element is nestable.
|
boolean |
process(ElementListener listener)
Processes the element by adding it (or the different parts) to an
ElementListener . |
void |
setDrawInterface(DrawInterface drawInterface)
Setter for the interface with the overruling draw() method.
|
void |
setOffset(float offset)
Setter for the offset.
|
int |
type()
Gets the type of the text element.
|
protected DrawInterface drawInterface
protected float offset
public VerticalPositionMark()
public VerticalPositionMark(DrawInterface drawInterface, float offset)
drawInterface
- the drawInterface for this vertical position mark.offset
- the offset for this vertical position mark.public void draw(PdfContentByte canvas, float llx, float lly, float urx, float ury, float y)
DrawInterface
draw
in interface DrawInterface
canvas
- the canvas on which you can drawllx
- the x coordinate of the left page marginlly
- the y coordinate of the bottom page marginurx
- the x coordinate of the right page marginury
- the y coordinate of the top page marginy
- the current y position on the pageDrawInterface.draw(com.lowagie.text.pdf.PdfContentByte, float, float, float, float, float)
public boolean process(ElementListener listener)
Element
ElementListener
.process
in interface Element
listener
- an ElementListener
true
if the element was processed successfullyElement.process(com.lowagie.text.ElementListener)
public int type()
Element
type
in interface Element
Element.type()
public boolean isContent()
Element
isContent
in interface Element
Element.isContent()
public boolean isNestable()
Element
isNestable
in interface Element
Element.isNestable()
public ArrayList getChunks()
Element
getChunks
in interface Element
ArrayList
Element.getChunks()
public DrawInterface getDrawInterface()
public void setDrawInterface(DrawInterface drawInterface)
drawInterface
- a DrawInterface implementationpublic float getOffset()
public void setOffset(float offset)
offset
- an offsetCopyright © 2018. All rights reserved.