public final class ContentsCreatorPageSegmentBuilder extends Object
Constructor and Description |
---|
ContentsCreatorPageSegmentBuilder() |
Modifier and Type | Method and Description |
---|---|
ContentsCreatorPageSegmentBuilder |
addShape(Shape shape,
ContentsCreatorControls controls)
Adds a
Shape to the ContentsCreatorPageSegmentBuilder which will then be
contained in the PageSegment retrieved using the finish() method. |
ContentsCreatorPageSegmentBuilder |
addShape(Shape shape,
ContentsCreatorControls controls,
int absoluteX,
int absoluteY)
Adds a
Shape to the ContentsCreatorPageSegmentBuilder which will then be
contained in the PageSegment retrieved using the finish() method. |
ContentsCreatorPageSegmentBuilder |
addText(String text,
ContentsCreatorControls controls)
Adds a text to the
ContentsCreatorPageSegmentBuilder which will then be contained in the
PageSegment retrieved using the finish() method. |
ContentsCreatorPageSegmentBuilder |
addText(String text,
ContentsCreatorControls controls,
int absoluteX,
int absoluteY)
Adds a text to the
ContentsCreatorPageSegmentBuilder which will then be contained in the
PageSegment retrieved using the finish() method. |
PageSegment |
finish()
Finishes this
ContentsCreatorPageSegmentBuilder and creates a PageSegment based
on the elements added beforehand. |
ContentsCreatorPageSegmentBuilder |
sized(Dimension2D dimension)
Sets a fixed
Dimension2D for the ContentsCreatorPageSegment to be created using
this ContentsCreatorPageSegmentBuilder. |
ContentsCreatorPageSegmentBuilder |
sized(int width,
int height)
Sets a fixed width and height for the
ContentsCreatorPageSegment to be created using this
ContentsCreatorPageSegmentBuilder. |
public ContentsCreatorPageSegmentBuilder addText(String text, ContentsCreatorControls controls)
ContentsCreatorPageSegmentBuilder
which will then be contained in the
PageSegment retrieved using the finish()
method. The properties how to manipulate the
rendering of the text are set in the controls parameter. Changing the
ContentsCreatorControls
object after calling this method will not affect the rendering of
the text. The lower left corner of the textcontainer will be placed on the upper left corner of
the PageSegment
.text
- The text to add to the PageSegment. This parameter must not be null
.controls
- the ContentsCreatorControls
to be used to manipulate the rendering of the
shape. The ContentsCreatorPageSegmentBuilder
will create a snapshot of this
object at the time the text is being added. This means that changes to the settings in
the controls object do no longer affect the way the text is being rendered once it has
been added. This parameter must not be null
.IllegalStateException
- if the ContentsCreatorPageSegmentBuilder
was already
finished,IllegalArgumentException
- if one of the parameters is null
public ContentsCreatorPageSegmentBuilder addText(String text, ContentsCreatorControls controls, int absoluteX, int absoluteY)
ContentsCreatorPageSegmentBuilder
which will then be contained in the
PageSegment retrieved using the finish()
method. The properties how to manipulate the
rendering of the text are set in the controls parameter. Changing the
ContentsCreatorControls
object after calling this method will not affect the rendering of
the text. Additionally an absolute position of the lower left corner of the text container can be
set using the absoluteX and absoluteY parameters. This is done in a way that the text to which
the ContentsCreatorTransformationSettings
defined in the ContentsCreatorControls
have been applied will then moved so the lower left corner of the textcontainer will be at
(absoluteX | absoluteY).text
- The text to add to the PageSegment. This parameter must not be null
.controls
- the ContentsCreatorControls
to be used to manipulate the rendering of the
shape. The ContentsCreatorPageSegmentBuilder
will create a snapshot of this
object at the time the text is being added. This means that changes to the settings in
the controls object do no longer affect the way the text is being rendered once it has
been added. This parameter must not be null
.absoluteX
- the x coordinate of the lower left corner of the textcontainer in a coordinate
system with the origin in the upper left corner of the PageSegment
in jadice
unitsabsoluteY
- the y coordinate of the lower left corner of the textcontainer in a coordinate
system with the origin in the upper left corner of the PageSegment
in jadice
unitsIllegalStateException
- if the ContentsCreatorPageSegmentBuilder
was already
finished,IllegalArgumentException
- if one of the parameters is null
public ContentsCreatorPageSegmentBuilder addShape(Shape shape, ContentsCreatorControls controls)
Shape
to the ContentsCreatorPageSegmentBuilder
which will then be
contained in the PageSegment retrieved using the finish()
method. The properties how to
manipulate the rendering of the Shape
can be set in the controls parameter. Changing the
ContentsCreatorControls
object after calling this method will not affect the rendering of
the Shape.
IllegalStateException
if the ContentsCreatorPageSegmentBuilder
was
already finished.IllegalArgumentException
if one of the parameters is null
shape
- The Shape
to add to the builder. This parameter must not be
null
.controls
- the ContentsCreatorControls
to be used to manipulate the rendering of the
shape. The ContentsCreatorPageSegmentBuilder
will create a snapshot of this
object at the time the Shape
is being added. This means that changes to the
settings in the controls object do no longer affect the way the Shape
is being
rendered once it has been added. This parameter must not be null
.public ContentsCreatorPageSegmentBuilder addShape(Shape shape, ContentsCreatorControls controls, int absoluteX, int absoluteY)
Shape
to the ContentsCreatorPageSegmentBuilder
which will then be
contained in the PageSegment retrieved using the finish()
method. The properties how to
manipulate the rendering of the Shape
can be set in the controls parameter. Changing the
ContentsCreatorControls
object after calling this method will not affect the rendering of
the Shape.shape
- The Shape
to add to the builder. This parameter must not be
null
.controls
- the ContentsCreatorControls
to be used to manipulate the rendering of the
shape. The ContentsCreatorPageSegmentBuilder
will create a snapshot of this
object at the time the Shape
is being added. This means that changes to the
settings in the controls object do no longer affect the way the Shape
is being
rendered once it has been added. This parameter must not be null
.IllegalStateException
if the ContentsCreatorPageSegmentBuilder
was
already finished.IllegalArgumentException
if one of the parameters is null
public ContentsCreatorPageSegmentBuilder sized(int width, int height)
ContentsCreatorPageSegment
to be created using this
ContentsCreatorPageSegmentBuilder. Both values must not be ≤0.width
- the width in jadice Units of the ContentsCreatorPageSegment to be created.height
- the height in jadice Units of the ContentsCreatorPageSegment to be created.IllegalArgumentException
- is thrown if the width or the height is ≤ 0.public ContentsCreatorPageSegmentBuilder sized(Dimension2D dimension)
Dimension2D
for the ContentsCreatorPageSegment
to be created using
this ContentsCreatorPageSegmentBuilder. The width and the height of the dimension given must both
not be ≤0.dimension
- the Dimension2D in jadice Units of the ContentsCreatorPageSegment to be created.
If this value is null
the size of the ContentsCreatorPageSegment will be
calculated on request based on the elements contained in the ContentsCreatorPageSegment.IllegalArgumentException
- is thrown if the width or the height of the given dimension is
≤ 0.public PageSegment finish()
ContentsCreatorPageSegmentBuilder
and creates a PageSegment
based
on the elements added beforehand. Once the ContentsCreatorPageSegmentBuilder
has been
finished it is no longer possible to add new elements or finish it again.PageSegment
containing the elements which have been added to the builder
together with the manipulations as defined while adding the elements. IllegalStateException
is thrown if the
ContentsCreatorPageSegmentBuilder
was already finished,Copyright © 2024 levigo holding gmbh. All rights reserved.