Package com.teamten.typeset.element
Class Rule
java.lang.Object
com.teamten.typeset.element.Element
com.teamten.typeset.element.NonDiscardableElement
com.teamten.typeset.element.Box
com.teamten.typeset.element.Rule
- All Implemented Interfaces:
Dimensions
Represents a filled-in black rectangle (though usually a horizontal or vertical line).
-
Field Summary
Fields inherited from class com.teamten.typeset.element.Element
DRAW_DEBUG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
layOutHorizontally
(long x, long y, org.apache.pdfbox.pdmodel.PDPageContentStream contents) Add the element to the contents as part of a horizontal sequence.long
layOutVertically
(long x, long y, org.apache.pdfbox.pdmodel.PDPageContentStream contents) Add the element to the contents as part of a vertical sequence.Methods inherited from class com.teamten.typeset.element.Box
drawDebugRectangle, getDepth, getDimensionString, getHeight, getShift, getWidth, toString
Methods inherited from class com.teamten.typeset.element.Element
getVerticalSize, println, println, shouldSkipElementAtStart, toTextString, toTextString, visit
-
Constructor Details
-
Rule
public Rule(long width, long height, long depth)
-
-
Method Details
-
layOutHorizontally
public long layOutHorizontally(long x, long y, org.apache.pdfbox.pdmodel.PDPageContentStream contents) throws IOException Description copied from class:Element
Add the element to the contents as part of a horizontal sequence.- Overrides:
layOutHorizontally
in classBox
- Parameters:
x
- the left-most point of the element.y
- the baseline of the element.contents
- the stream to add the element to.- Returns:
- how much to move right afterward.
- Throws:
IOException
-
layOutVertically
public long layOutVertically(long x, long y, org.apache.pdfbox.pdmodel.PDPageContentStream contents) throws IOException Description copied from class:Element
Add the element to the contents as part of a vertical sequence.- Overrides:
layOutVertically
in classBox
- Parameters:
x
- the left-most point of the element.y
- the upper-left point of the element.contents
- the stream to add the element to.- Returns:
- how much to move down afterward.
- Throws:
IOException
-