|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.itextpdf.text.pdf.draw.VerticalPositionMark
public class VerticalPositionMark
Helper class implementing the DrawInterface. Can be used to add horizontal or vertical separators. Won't draw anything unless you implement the draw method.
Field Summary | |
---|---|
protected DrawInterface |
drawInterface
Another implementation of the DrawInterface; its draw method will overrule LineSeparator.draw(). |
protected float |
offset
The offset for the line. |
Fields inherited from interface com.itextpdf.text.Element |
---|
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, 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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.itextpdf.text.Element |
---|
toString |
Field Detail |
---|
protected DrawInterface drawInterface
protected float offset
Constructor Detail |
---|
public VerticalPositionMark()
public VerticalPositionMark(DrawInterface drawInterface, float offset)
drawInterface
- the drawInterface for this vertical position mark.offset
- the offset for this vertical position mark.Method Detail |
---|
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.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 successfullyElement.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 implementationpublic float getOffset()
public void setOffset(float offset)
offset
- an offset
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |