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)
Adds a child to the current renderer
|
void |
deleteOwnProperty(int property)
Deletes the own property of this entity.
|
void |
draw(DrawContext drawContext)
Flushes the renderer subtree contents, i.e.
|
List<IRenderer> |
getChildRenderers()
Gets the child IRenderer s.
|
|
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()
Gets the resultant occupied area after the last call to the IRenderer.layout(LayoutContext) method.
|
|
getOwnProperty(int property)
Gets own property from this entity.
|
|
getProperty(int key)
Gets the property from this entity.
|
|
getProperty(int property, T1 defaultValue)
Gets a property from this entity or one of its hierarchical parents.
|
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)
Moves the renderer subtree by the specified offset.
|
IRenderer |
setParent(IRenderer parent)
Explicitly sets this object as the child of another IRenderer in the renderer hierarchy.
|
void |
setProperty(int property, Object value)
Sets a property for this entity.
|
protected AreaBreak areaBreak
public void addChild(IRenderer renderer)
IRenderer
public LayoutResult layout(LayoutContext layoutContext)
IRenderer
LayoutResult
, 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)
IRenderer
PdfDocument
etc.
draw
in interface IRenderer
drawContext
- 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 drawing
public LayoutArea getOccupiedArea()
IRenderer
IRenderer.layout(LayoutContext)
method.
getOccupiedArea
in interface IRenderer
LayoutArea
instance
public boolean hasProperty(int property)
IPropertyContainer
IPropertyContainer.hasOwnProperty(int)
, this method can check parent's properties, styles, etc, depending on the origin of the instance
hasProperty
in interface IPropertyContainer
property
- the property to be checked
true
if this instance has given property, false
otherwise
public boolean hasOwnProperty(int property)
IPropertyContainer
hasOwnProperty
in interface IPropertyContainer
property
- the property to be checked
true
if this instance has given own property, false
otherwise
publicT1 getProperty(int key)
IPropertyContainer
IPropertyContainer.getOwnProperty(int)
, this method can check parent's properties, styles, etc, depending on the origin of the instance
getProperty
in interface IPropertyContainer
T1
- the return type associated with the property
key
- the property to be retrieved
null
will be returned if the property value was not found
publicT1 getOwnProperty(int property)
IPropertyContainer
null
will be returned.
getOwnProperty
in interface IPropertyContainer
T1
- the return type associated with the property
property
- the property to be retrieved
null
will be returned if the property value was not found
publicT1 getDefaultProperty(int property)
IPropertyContainer
getDefaultProperty
in interface IPropertyContainer
T1
- the return type associated with the property
property
- the property to be retrieved
null
will be returned
publicT1 getProperty(int property, T1 defaultValue)
IRenderer
defaultValue
will be returned.
getProperty
in interface IRenderer
T1
- the return type associated with the property
property
- the property to be retrieved
defaultValue
- a fallback value
public void setProperty(int property, Object value)
IPropertyContainer
setProperty
in interface IPropertyContainer
property
- the property to be set
value
- the value of the property
public void deleteOwnProperty(int property)
IPropertyContainer
deleteOwnProperty
in interface IPropertyContainer
property
- the property to be deleted
public IRenderer setParent(IRenderer parent)
IRenderer
IRenderer
in the renderer hierarchy. Some implementations also use this method internally to create a consistent hierarchy tree.
public IPropertyContainer getModelElement()
IRenderer
getModelElement
in interface IRenderer
container of properties
public List<IRenderer> getChildRenderers()
IRenderer
IRenderer
s.
getChildRenderers
in interface IRenderer
renderers
of this instance
public boolean isFlushed()
IRenderer
IRenderer.draw(DrawContext)
has already been called.
public void move(float dx, float dy)
IRenderer
public IRenderer getNextRenderer()
IRenderer
IRenderer.layout(LayoutContext)
is called more than once.
getNextRenderer
in interface IRenderer
Copyright © 1998–2016 iText Group NV. All rights reserved.