Class PLTableCell
- java.lang.Object
-
- com.helger.pdflayout.base.AbstractPLObject<IMPLTYPE>
-
- com.helger.pdflayout.base.AbstractPLRenderableObject<IMPLTYPE>
-
- com.helger.pdflayout.base.AbstractPLElement<IMPLTYPE>
-
- com.helger.pdflayout.base.AbstractPLBlockElement<IMPLTYPE>
-
- com.helger.pdflayout.element.box.AbstractPLBox<PLTableCell>
-
- com.helger.pdflayout.element.table.PLTableCell
-
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,com.helger.commons.traits.IGenericImplTrait<PLTableCell>,IPLBlockElement<PLTableCell>,IPLElement<PLTableCell>,IPLHasBorder<PLTableCell>,IPLHasFillColor<PLTableCell>,IPLHasHorizontalAlignment<PLTableCell>,IPLHasMargin<PLTableCell>,IPLHasMarginBorderPadding<PLTableCell>,IPLHasOutline,IPLHasPadding<PLTableCell>,IPLHasVerticalAlignment<PLTableCell>,IPLObject<PLTableCell>,IPLRenderableObject<PLTableCell>,IPLSplittableObject<PLTableCell,PLTableCell>,IPLVisitable
@NotThreadSafe public class PLTableCell extends AbstractPLBox<PLTableCell>
This class represents a single table cell within a table row.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_COL_SPAN-
Fields inherited from interface com.helger.pdflayout.base.IPLBlockElement
DEFAULT_FULL_WIDTH
-
Fields inherited from interface com.helger.pdflayout.base.IPLElement
DEFAULT_MAX_SIZE, DEFAULT_MIN_SIZE
-
Fields inherited from interface com.helger.pdflayout.base.IPLHasBorder
DEFAULT_BORDER
-
Fields inherited from interface com.helger.pdflayout.base.IPLHasFillColor
DEFAULT_FILL_COLOR
-
Fields inherited from interface com.helger.pdflayout.base.IPLHasHorizontalAlignment
DEFAULT_HORZ_ALIGNMENT
-
Fields inherited from interface com.helger.pdflayout.base.IPLHasMargin
DEFAULT_MARGIN
-
Fields inherited from interface com.helger.pdflayout.base.IPLHasPadding
DEFAULT_PADDING
-
Fields inherited from interface com.helger.pdflayout.base.IPLHasVerticalAlignment
DEFAULT_VERT_ALIGNMENT
-
Fields inherited from interface com.helger.pdflayout.base.IPLSplittableObject
DEFAULT_VERT_SPLITTABLE
-
-
Constructor Summary
Constructors Constructor Description PLTableCell(IPLRenderableObject<?> aElement)PLTableCell(IPLRenderableObject<?> aElement, int nColSpan)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PLTableCellcreateEmptyCell()Utility method to create an empty cell.static PLTableCellcreateEmptyCell(int nColSpan)Utility method to create an empty cell with a colspan.static PLTableCell[]createEmptyCells(int nCellCount)Utility method to create an array of empty cells.intgetColSpan()PLTableCellinternalCreateNewVertSplitObject(PLTableCell aBase)Create a new object of the same type as this object.protected voidonRender(PageRenderContext aCtx)Abstract method to be implemented by subclasses.PLTableCellsetBasicDataFrom(PLTableCell aSource)For copying stuff internally.-
Methods inherited from class com.helger.pdflayout.element.box.AbstractPLBox
getElement, getElementPreparedSize, getRenderSize, hasElement, internalSetElementPreparedSize, isVertSplittable, onMarkAsNotPrepared, onPrepare, setElement, setVertSplittable, splitElementVert, toString, visit
-
Methods inherited from class com.helger.pdflayout.base.AbstractPLBlockElement
getHorzAlign, getVertAlign, isFullWidth, setFullWidth, setHorzAlign, setVertAlign
-
Methods inherited from class com.helger.pdflayout.base.AbstractPLElement
getBorder, getFillColor, getMargin, getMaxSize, getMinSize, getPadding, setBorder, setFillColor, setMargin, setMaxSize, setMinSize, setPadding
-
Methods inherited from class com.helger.pdflayout.base.AbstractPLRenderableObject
getPrepareAvailableSize, getPreparedSize, getRenderSize, internalCheckAlreadyPrepared, internalCheckNotPrepared, internalMarkAsNotPrepared, internalMarkAsNotPreparedDontPropagate, internalMarkAsPrepared, isPrepared, onRenderSizeChange, prepare, render
-
Methods inherited from class com.helger.pdflayout.base.AbstractPLObject
getDebugID, getID, onAfterSetID, setID
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.pdflayout.base.IPLElement
getMaxHeight, getMaxSize, getMaxWidth, getMinHeight, getMinSize, getMinWidth, setExactHeight, setExactSize, setExactWidth, setMaxHeight, setMaxSize, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinSize, setMinWidth
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasBorder
getBorder, getBorderBottomWidth, getBorderLeftWidth, getBorderRightWidth, getBorderTopWidth, getBorderXSumWidth, getBorderYSumWidth, setBorder, setBorder, setBorder, setBorder, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setBorderX, setBorderY
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasFillColor
getFillColor, hasFillColor, setFillColor
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasHorizontalAlignment
getIndentX
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasMargin
addMarginBottom, addMarginLeft, addMarginRight, addMarginTop, addMarginX, addMarginY, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMarginXSum, getMarginYSum, setMargin, setMargin, setMargin, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMarginX, setMarginY
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasMarginBorderPadding
getOutlineBottom, getOutlineLeft, getOutlineRight, getOutlineTop, getOutlineXSum, getOutlineYSum
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasPadding
addPaddingBottom, addPaddingLeft, addPaddingRight, addPaddingTop, addPaddingX, addPaddingY, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPaddingXSum, getPaddingYSum, setPadding, setPadding, setPadding, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPaddingX, setPaddingY
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasVerticalAlignment
getIndentY, getIndentY
-
Methods inherited from interface com.helger.pdflayout.base.IPLObject
getAsSplittable, getDebugID, hasID
-
Methods inherited from interface com.helger.pdflayout.base.IPLRenderableObject
beforeRender, getPreparedHeight, getPreparedSize, getPreparedWidth, getRenderHeight, getRenderSize, getRenderWidth, isPrepared, prepare, render
-
-
-
-
Field Detail
-
DEFAULT_COL_SPAN
public static final int DEFAULT_COL_SPAN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PLTableCell
public PLTableCell(@Nullable IPLRenderableObject<?> aElement)
-
PLTableCell
public PLTableCell(@Nullable IPLRenderableObject<?> aElement, @Nonnegative int nColSpan)
-
-
Method Detail
-
setBasicDataFrom
@Nonnull @OverridingMethodsMustInvokeSuper public PLTableCell setBasicDataFrom(@Nonnull PLTableCell aSource)
Description copied from interface:IPLObjectFor copying stuff internally. Must always call super method- Specified by:
setBasicDataFromin interfaceIPLObject<PLTableCell>- Overrides:
setBasicDataFromin classAbstractPLBox<PLTableCell>- Parameters:
aSource- Source object to copy from. May not benull.- Returns:
- this for chaining
-
getColSpan
@Nonnegative public int getColSpan()
-
internalCreateNewVertSplitObject
@Nonnull public PLTableCell internalCreateNewVertSplitObject(@Nonnull PLTableCell aBase)
Description copied from interface:IPLSplittableObjectCreate a new object of the same type as this object.- Parameters:
aBase- The source object to copy data from.- Returns:
- Never
null.
-
onRender
protected void onRender(@Nonnull PageRenderContext aCtx) throws IOException
Description copied from class:AbstractPLRenderableObjectAbstract method to be implemented by subclasses.- Overrides:
onRenderin classAbstractPLBox<PLTableCell>- Parameters:
aCtx- Rendering context. Nevernull.- Throws:
IOException- In case of a PDFBox error
-
createEmptyCell
@Nonnull public static PLTableCell createEmptyCell()
Utility method to create an empty cell.- Returns:
- The new empty table cell.
- Since:
- 5.1.3
-
createEmptyCell
@Nonnull public static PLTableCell createEmptyCell(@Nonnegative int nColSpan)
Utility method to create an empty cell with a colspan.- Parameters:
nColSpan- The column span to use. Must be > 0.- Returns:
- The new empty table cell.
- Since:
- 7.0.1
-
createEmptyCells
@Nonnull public static PLTableCell[] createEmptyCells(@Nonnegative int nCellCount)
Utility method to create an array of empty cells.- Parameters:
nCellCount- The number of cells to create. Must be ≥ 0.- Returns:
- The new empty table cell.
- Since:
- 7.0.1
-
-