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, BODY, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, DIV, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LANGUAGE, LIST, LISTITEM, MARKED, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TITLE, WRITABLE_DIRECT, 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).
|
List<Chunk> |
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 draw
llx
- the x coordinate of the left page margin
lly
- the y coordinate of the bottom page margin
urx
- the x coordinate of the right page margin
ury
- the y coordinate of the top page margin
y
- the current y position on the page
DrawInterface.draw(com.itextpdf.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 successfully
Element.process(com.itextpdf.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 List<Chunk> getChunks()
Element
getChunks
in interface Element
ArrayList
Element.getChunks()
public DrawInterface getDrawInterface()
public void setDrawInterface(DrawInterface drawInterface)
drawInterface
- a DrawInterface implementation
public float getOffset()
public void setOffset(float offset)
offset
- an offset
Copyright © 1998–2016. All rights reserved.