Class TableCellRenderer
- java.lang.Object
-
- io.keikai.doc.io.schema.pdf.render.TableCellRenderer
-
- All Implemented Interfaces:
IContainerRenderer,IRenderer
public class TableCellRenderer extends java.lang.Object implements IContainerRenderer
Internal Use Only.Renderer to render a
TableCellNode.- Author:
- jamson
-
-
Constructor Summary
Constructors Constructor Description TableCellRenderer(PDFTableCell pdfCell, IRenderer parent, org.apache.pdfbox.pdmodel.common.PDRectangle rect)Create aTableCellRendererinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecreaseCursorY(float offset)Decrease (move down) the current cursor y position by the given offset.org.apache.pdfbox.pdmodel.PDPageContentStreamgetCS()Returns the content stream of current page.floatgetCursorY()Returns the current cursor y position.org.apache.pdfbox.pdmodel.common.PDRectanglegetRect()Returns the rectangle of the current page.DocumentRenderergetRootRenderer()Returns the root renderer.voidhandleExceedY()Handle the case that the current cursor y position is exceed the rectangle of the current page.booleanisExceedY(float offset)Returns whether the current cursor y position with the given offset is exceed the rectangle of the current page.voidrender()Render theDocumentNode.
-
-
-
Constructor Detail
-
TableCellRenderer
public TableCellRenderer(PDFTableCell pdfCell, IRenderer parent, org.apache.pdfbox.pdmodel.common.PDRectangle rect)
Create aTableCellRendererinstance.- Parameters:
pdfCell- thePDFTableCellto renderparent- the parentIRendererrect- the rectangle of the cell
-
-
Method Detail
-
render
public void render() throws java.io.IOExceptionDescription copied from interface:IRendererRender theDocumentNode.
-
getRootRenderer
public DocumentRenderer getRootRenderer()
Description copied from interface:IRendererReturns the root renderer.- Specified by:
getRootRendererin interfaceIRenderer- Returns:
- the root renderer
-
getCS
public org.apache.pdfbox.pdmodel.PDPageContentStream getCS()
Description copied from interface:IRendererReturns the content stream of current page.
-
getRect
public org.apache.pdfbox.pdmodel.common.PDRectangle getRect()
Description copied from interface:IContainerRendererReturns the rectangle of the current page.- Specified by:
getRectin interfaceIContainerRenderer- Returns:
- the rectangle of the current page.
-
getCursorY
public float getCursorY()
Description copied from interface:IContainerRendererReturns the current cursor y position.- Specified by:
getCursorYin interfaceIContainerRenderer- Returns:
- the current cursor y position.
-
decreaseCursorY
public void decreaseCursorY(float offset)
Description copied from interface:IContainerRendererDecrease (move down) the current cursor y position by the given offset.- Specified by:
decreaseCursorYin interfaceIContainerRenderer- Parameters:
offset- the y offset to decrease.
-
isExceedY
public boolean isExceedY(float offset)
Description copied from interface:IContainerRendererReturns whether the current cursor y position with the given offset is exceed the rectangle of the current page.- Specified by:
isExceedYin interfaceIContainerRenderer- Parameters:
offset- the y offset to check.- Returns:
- whether exceed the rectangle of the current page.
-
handleExceedY
public void handleExceedY()
Description copied from interface:IContainerRendererHandle the case that the current cursor y position is exceed the rectangle of the current page.- Specified by:
handleExceedYin interfaceIContainerRenderer
-
-