public class AreaBreakRenderer extends Object implements IRenderer
AreaBreak layout element. Will terminate the
current content area and initialize a new one.| Constructor and Description |
|---|
AreaBreakRenderer(AreaBreak areaBreak)
Creates an AreaBreakRenderer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(IRenderer renderer)
Throws an UnsupportedOperationException because instances of this
class are only used for terminating the current content area.
|
void |
deleteOwnProperty(int property)
Deletes the own property of this entity.
|
void |
draw(DrawContext drawContext)
Throws an UnsupportedOperationException because instances of this
class are only used for terminating the current content area.
|
List<IRenderer> |
getChildRenderers()
Gets the child
IRenderers. |
<T1> T1 |
getDefaultProperty(int property)
Gets the default property from this entity.
|
IPropertyContainer |
getModelElement()
Gets the model element associated with this renderer.
|
IRenderer |
getNextRenderer()
Gets a new instance of this class to be used as a next renderer, after this renderer is used, if
IRenderer.layout(LayoutContext) is called more than once. |
LayoutArea |
getOccupiedArea()
Throws an UnsupportedOperationException because instances of this
class are only used for terminating the current content area.
|
<T1> T1 |
getOwnProperty(int property)
Gets own property from this entity.
|
IRenderer |
getParent()
Gets the parent
IRenderer. |
<T1> T1 |
getProperty(int key)
Gets the property from this entity.
|
<T1> T1 |
getProperty(int property,
T1 defaultValue)
Throws an UnsupportedOperationException because instances of this
class are only used for terminating the current content area.
|
boolean |
hasOwnProperty(int property)
Checks if this entity has the specified property, i.e.
|
boolean |
hasProperty(int property)
Checks if this entity has the specified property.
|
boolean |
isFlushed()
Indicates whether this renderer is flushed or not, i.e.
|
LayoutResult |
layout(LayoutContext layoutContext)
This method simulates positioning of the renderer, including all of its children, and returns
the
LayoutResult, representing the layout result, including occupied area, status, i.e. |
void |
move(float dx,
float dy)
Throws an UnsupportedOperationException because instances of this
class are only used for terminating the current content area.
|
IRenderer |
setParent(IRenderer parent)
Explicitly sets this object as the child of another
IRenderer in
the renderer hierarchy. |
void |
setProperty(int property,
Object value)
Throws an UnsupportedOperationException because instances of this
class are only used for terminating the current content area.
|
protected AreaBreak areaBreak
public void addChild(IRenderer renderer)
public LayoutResult layout(LayoutContext layoutContext)
IRendererLayoutResult, representing the layout result, including occupied area, status, i.e.
if there was enough place to fit the renderer subtree, etc.
LayoutResult can be extended to return custom layout results for custom elements, e.g.
TextRenderer uses TextLayoutResult as its result.
This method can be called standalone to learn how much area the renderer subtree needs, or can be called
before IRenderer.draw(DrawContext), to prepare the renderer to be flushed to the output stream.public void draw(DrawContext drawContext)
draw in interface IRendererdrawContext - contains the PdfDocument to which the renderer subtree if flushed,
the PdfCanvas on which the renderer subtree is drawn and other additional parameters
needed to perform drawingpublic LayoutArea getOccupiedArea()
getOccupiedArea in interface IRendererLayoutArea instancepublic boolean hasProperty(int property)
IPropertyContainerIPropertyContainer.hasOwnProperty(int),
this method can check parent's properties, styles, etc, depending on the origin of the instancehasProperty in interface IPropertyContainerproperty - the property to be checkedtrue if this instance has given property, false otherwisepublic boolean hasOwnProperty(int property)
IPropertyContainerhasOwnProperty in interface IPropertyContainerproperty - the property to be checkedtrue if this instance has given own property, false otherwisepublic <T1> T1 getProperty(int key)
IPropertyContainerIPropertyContainer.getOwnProperty(int),
this method can check parent's properties, styles, etc, depending on the origin of the instancegetProperty in interface IPropertyContainerT1 - the return type associated with the propertykey - the property to be retrievednull will be returned if the property value was not foundpublic <T1> T1 getOwnProperty(int property)
IPropertyContainernull will be returned.getOwnProperty in interface IPropertyContainerT1 - the return type associated with the propertyproperty - the property to be retrievednull will be returned if the property value was not foundpublic <T1> T1 getDefaultProperty(int property)
IPropertyContainergetDefaultProperty in interface IPropertyContainerT1 - the return type associated with the propertyproperty - the property to be retrievednull will be returnedpublic <T1> T1 getProperty(int property,
T1 defaultValue)
getProperty in interface IRendererT1 - the return type associated with the propertyproperty - the property to be retrieveddefaultValue - a fallback valuepublic void setProperty(int property,
Object value)
setProperty in interface IPropertyContainerproperty - the property to be setvalue - the value of the propertypublic void deleteOwnProperty(int property)
IPropertyContainerdeleteOwnProperty in interface IPropertyContainerproperty - the property to be deletedpublic IRenderer setParent(IRenderer parent)
IRendererIRenderer in
the renderer hierarchy. Some implementations also use this method
internally to create a consistent hierarchy tree.public IPropertyContainer getModelElement()
IRenderergetModelElement in interface IRenderercontainer of propertiespublic IRenderer getParent()
IRendererIRenderer.public List<IRenderer> getChildRenderers()
IRendererIRenderers.getChildRenderers in interface IRendererrenderers of this instancepublic boolean isFlushed()
IRendererIRenderer.draw(DrawContext) has already
been called.public void move(float dx,
float dy)
public IRenderer getNextRenderer()
IRendererIRenderer.layout(LayoutContext) is called more than once.getNextRenderer in interface IRendererCopyright © 1998–2020 iText Group NV. All rights reserved.