public class HorizontalRuler extends Object implements Drawable, Element, WidthRespecting
max width.| Constructor and Description |
|---|
HorizontalRuler(Stroke stroke,
Color color) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
DrawListener drawListener)
Draws the object at the given position.
|
Position |
getAbsolutePosition()
If an absolute position is given, the drawable will be drawn at this
position ignoring any
Layout. |
Color |
getColor() |
float |
getHeight() |
float |
getMaxWidth() |
Stroke |
getStroke() |
float |
getWidth() |
Drawable |
removeLeadingEmptyVerticalSpace() |
void |
setMaxWidth(float maxWidth)
Sets the max width to respect.
|
public Stroke getStroke()
public Color getColor()
public float getMaxWidth()
getMaxWidth in interface WidthRespectingpublic void setMaxWidth(float maxWidth)
WidthRespectingsetMaxWidth in interface WidthRespectingmaxWidth - the maximum width.public float getWidth()
throws IOException
getWidth in interface DrawableIOException - by pdfboxpublic float getHeight()
throws IOException
getHeight in interface DrawableIOException - by pdfboxpublic Position getAbsolutePosition()
DrawableLayout.getAbsolutePosition in interface Drawablepublic void draw(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
DrawListener drawListener)
throws IOException
Drawabledraw in interface DrawablepdDocument - the underlying pdfbox document.contentStream - the stream to draw to.upperLeft - the upper left position to start drawing.drawListener - the listener to
notify on
drawn objects.IOException - by pdfboxpublic Drawable removeLeadingEmptyVerticalSpace()
removeLeadingEmptyVerticalSpace in interface DrawableCopyright © 2022. All rights reserved.