Package com.itextpdf.layout.renderer
Class AbstractBreakRenderer
java.lang.Object
com.itextpdf.layout.renderer.AbstractBreakRenderer
- All Implemented Interfaces:
-
IPropertyContainer,IRenderer
- Direct Known Subclasses:
-
AreaBreakRenderer,SectionBreakRenderer
Class for storing logic shared by break renderers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteOwnProperty(int property) Deletes the own property of this entity.Gets the childIRenderers.T1 getDefaultProperty(int property) Gets the default property from this entity.T1 getOwnProperty(int property) Gets own property from this entity.Gets the parentIRenderer.T1 getProperty(int key) Gets the property from this entity.T1 getProperty(int property, T1 defaultValue) Gets a property from this entity or one of its hierarchical parents.booleanhasOwnProperty(int property) Checks if this entity has the specified property, i.e.booleanhasProperty(int property) Checks if this entity has the specified property.booleanIndicates whether this renderer is flushed or not, i.e.Explicitly sets this object as the child of anotherIRendererin the renderer hierarchy.voidsetProperty(int property, Object value) Sets a property for this entity.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itextpdf.layout.renderer.IRenderer
addChild, draw, getModelElement, getNextRenderer, getOccupiedArea, layout, move
-
Field Details
-
parent
-
properties
-
-
Constructor Details
-
AbstractBreakRenderer
protected AbstractBreakRenderer()Creates newAbstractBreakRendererinstance.
-
-
Method Details
-
hasProperty
public boolean hasProperty(int property) Checks if this entity has the specified property. Compared toIPropertyContainer.hasOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance- Specified by:
-
hasPropertyin interfaceIPropertyContainer - Parameters:
-
property- the property to be checked - Returns:
-
trueif this instance has given property,falseotherwise
-
hasOwnProperty
public boolean hasOwnProperty(int property) Checks if this entity has the specified property, i.e. if it was set to this very element earlier- Specified by:
-
hasOwnPropertyin interfaceIPropertyContainer - Parameters:
-
property- the property to be checked - Returns:
-
trueif this instance has given own property,falseotherwise
-
getProperty
publicT1 getProperty (int key) Gets the property from this entity. Compared toIPropertyContainer.getOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance- Specified by:
-
getPropertyin interfaceIPropertyContainer - Type Parameters:
-
T1- the return type associated with the property - Parameters:
-
key- the property to be retrieved - Returns:
-
the value of the given property.
nullwill be returned if the property value was not found
-
getProperty
publicT1 getProperty (int property, T1 defaultValue) Gets a property from this entity or one of its hierarchical parents. If the property is not found,defaultValuewill be returned.- Specified by:
-
getPropertyin interfaceIRenderer - Type Parameters:
-
T1- the return type associated with the property - Parameters:
-
property- the property to be retrieved -
defaultValue- a fallback value - Returns:
- the value of the given property
-
getOwnProperty
publicT1 getOwnProperty (int property) Gets own property from this entity. The property must have been set earlier to this entity. If the property is not found,nullwill be returned.- Specified by:
-
getOwnPropertyin interfaceIPropertyContainer - Type Parameters:
-
T1- the return type associated with the property - Parameters:
-
property- the property to be retrieved - Returns:
-
the value of the given own property.
nullwill be returned if the property value was not found
-
getDefaultProperty
publicT1 getDefaultProperty (int property) Gets the default property from this entity.- Specified by:
-
getDefaultPropertyin interfaceIPropertyContainer - Type Parameters:
-
T1- the return type associated with the property - Parameters:
-
property- the property to be retrieved - Returns:
-
the default property value. If the default property is not defined,
nullwill be returned
-
setProperty
Sets a property for this entity.- Specified by:
-
setPropertyin interfaceIPropertyContainer - Parameters:
-
property- the property to be set -
value- the value of the property
-
deleteOwnProperty
public void deleteOwnProperty(int property) Deletes the own property of this entity.- Specified by:
-
deleteOwnPropertyin interfaceIPropertyContainer - Parameters:
-
property- the property to be deleted
-
setParent
Description copied from interface:IRendererExplicitly sets this object as the child of anotherIRendererin the renderer hierarchy. Some implementations also use this method internally to create a consistent hierarchy tree. -
getParent
Description copied from interface:IRendererGets the parentIRenderer. -
getChildRenderers
Description copied from interface:IRendererGets the childIRenderers.- Specified by:
-
getChildRenderersin interfaceIRenderer - Returns:
-
a list of direct child
renderersof this instance
-
isFlushed
public boolean isFlushed()Description copied from interface:IRendererIndicates whether this renderer is flushed or not, i.e. ifIRenderer.draw(DrawContext)has already been called.
-