Package com.teamten.typeset.element
Class VBox
java.lang.Object
com.teamten.typeset.element.Element
com.teamten.typeset.element.NonDiscardableElement
com.teamten.typeset.element.Box
com.teamten.typeset.element.VBox
- All Implemented Interfaces:
Dimensions
Represents a page in the output medium.
-
Field Summary
Fields inherited from class com.teamten.typeset.element.Element
DRAW_DEBUG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfixed
(long newSize, VerticalAlignment verticalAlignment) Return a new VBox with all the elements stretches or shrunk to benewSize
.void
layOut
(long x, long y, org.apache.pdfbox.pdmodel.PDPageContentStream contents) Lay out all the elements back to back vertically.long
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.void
println
(PrintStream stream, String indent) Pretty prints the element to the PrintWriter with the given indent.void
Calls the consumer on this element and all child elements in pre-order.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, shouldSkipElementAtStart, toTextString, toTextString
-
Constructor Details
-
VBox
The elements are listed top to bottom. -
VBox
The elements are listed top to bottom. -
VBox
The elements are listed top to bottom.
-
-
Method Details
-
getElements
-
fixed
Return a new VBox with all the elements stretches or shrunk to benewSize
. -
layOut
public void layOut(long x, long y, org.apache.pdfbox.pdmodel.PDPageContentStream contents) throws IOException Lay out all the elements back to back vertically. Y is the upper-left, not the baseline.- Throws:
IOException
-
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
-
visit
Description copied from class:Element
Calls the consumer on this element and all child elements in pre-order. The default implementation just calls the consumer on this element. -
println
Description copied from class:Element
Pretty prints the element to the PrintWriter with the given indent. The method must print its own newline.
-