IMPLTYPE - The implementation type of this class.public abstract class AbstractPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>> extends AbstractPLObject<IMPLTYPE> implements IPLRenderableObject<IMPLTYPE>
DEFAULT_MAX_SIZE, DEFAULT_MIN_SIZE| Constructor and Description |
|---|
AbstractPLRenderableObject() |
| Modifier and Type | Method and Description |
|---|---|
SizeSpec |
getMaxSize() |
SizeSpec |
getMinSize() |
SizeSpec |
getPreparedSize() |
protected void |
internalCheckNotPrepared()
Throw an exception, if this object is already prepared.
|
void |
internalMarkAsNotPrepared() |
IMPLTYPE |
internalMarkAsPrepared(SizeSpec aPreparedSize) |
boolean |
isPrepared() |
protected abstract void |
onPerform(RenderingContext aCtx)
Abstract method to be implemented by subclasses.
|
protected void |
onPerformFillAndBorder(RenderingContext aCtx)
method to be implemented by subclasses.
|
protected abstract SizeSpec |
onPrepare(PreparationContext aCtx)
The abstract method that must be implemented by all subclasses.
|
void |
perform(RenderingContext aCtx)
Second step: perform.
|
SizeSpec |
prepare(PreparationContext aCtx)
Prepare this element once for rendering.
|
IMPLTYPE |
setMaxSize(float fMaxWidth,
float fMaxHeight)
Set the maximum size to be used.
|
IMPLTYPE |
setMinSize(float fMinWidth,
float fMinHeight)
Set the minimum size to be used.
|
String |
toString() |
getDebugID, getID, setBasicDataFrom, setIDclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoPageSetup, setExactSizegetAsSplittable, getDebugID, isSplittablegetFullBottom, getFullLeft, getFullRight, getFullTop, getFullXSum, getFullYSum@Nonnull public SizeSpec getMinSize()
getMinSize in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>null.@Nonnull public IMPLTYPE setMinSize(@Nonnegative float fMinWidth, @Nonnegative float fMinHeight)
IPLRenderableObjectsetMinSize in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>fMinWidth - Minimum width. Must be ≥ 0.fMinHeight - Minimum height. Must be ≥ 0.@Nonnull public SizeSpec getMaxSize()
getMaxSize in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>null.@Nonnull public IMPLTYPE setMaxSize(@Nonnegative float fMaxWidth, @Nonnegative float fMaxHeight)
IPLRenderableObjectsetMaxSize in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>fMaxWidth - Maximum width. Must be ≥ 0.fMaxHeight - Maximum height. Must be ≥ 0.@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void internalCheckNotPrepared()
IllegalStateException - if already preparedpublic final boolean isPrepared()
isPrepared in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>true if this object was already prepared,
false otherwise.@Nullable public final SizeSpec getPreparedSize()
getPreparedSize in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>null if this object was not yet
prepared.IPLRenderableObject.isPrepared()@Nonnull protected abstract SizeSpec onPrepare(@Nonnull PreparationContext aCtx) throws IOException
aCtx - Preparation context. Never null.null.IOException - on error@Nonnull public final SizeSpec prepare(@Nonnull PreparationContext aCtx) throws IOException
IPLRenderableObjectprepare in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>aCtx - The preparation contextnull.IOException - if already preparedIPLRenderableObject.perform(RenderingContext)public final void internalMarkAsNotPrepared()
@Nonnull public final IMPLTYPE internalMarkAsPrepared(@Nonnull SizeSpec aPreparedSize)
aPreparedSize - The new prepared size without padding or margin.@OverrideOnDemand protected void onPerformFillAndBorder(@Nonnull RenderingContext aCtx) throws IOException
aCtx - Rendering contextIOException - In case of a PDFBox error@OverrideOnDemand protected abstract void onPerform(@Nonnull RenderingContext aCtx) throws IOException
aCtx - Rendering contextIOException - In case of a PDFBox error@Nonnegative public final void perform(@Nonnull RenderingContext aCtx) throws IOException
IPLRenderableObjectperform in interface IPLRenderableObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>aCtx - Rendering contextIOException - In case of a PDFBox errorIPLRenderableObject.prepare(PreparationContext)public String toString()
toString in class AbstractPLObject<IMPLTYPE extends AbstractPLRenderableObject<IMPLTYPE>>Copyright © 2014–2016 Philip Helger. All rights reserved.