|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.render.AbstractPageRenderer
public abstract class AbstractPageRenderer
An abstract base class to render the contents of a page into any valid Graphics2D
. This
class may be used as a base class for page renderers.
Constructor Summary | |
---|---|
AbstractPageRenderer()
|
Method Summary | |
---|---|
Page |
getPage()
Returns the page to be rendered. |
RenderControls |
getRenderControls()
Returns the render controls which will be applied the next time the page is rendered into a buffered image, in other words when the render(Graphics2D) method will be called. |
protected abstract void |
render(Graphics2D target)
Paint a Page . |
void |
setPage(Page page)
Changes the page reference, which will be rendered the next time the render(Graphics2D) method will be called. |
void |
setRenderControls(RenderControls renderControls)
Changes the render controls which will be applied the next time the page is rendered, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractPageRenderer()
Method Detail |
---|
protected abstract void render(Graphics2D target) throws JadiceException
Page
. This method will paint the Page
set using setPage(Page)
or if the Page
is null, return immediately.
target
- the Graphics2D
to paint to.
JadiceException
- will be thrown if the initialization or the rendering of the
Page
failed.public Page getPage()
Page
public void setPage(Page page)
render(Graphics2D)
method will be called.
page
- another page to be renderedpublic RenderControls getRenderControls()
render(Graphics2D)
method will be called. If
the render controls are null
, a default render context with zoom 100%, rotation 0
and deviceResolution 72dpi will be assumed.
public void setRenderControls(RenderControls renderControls)
render(Graphics2D)
method will be called. If the render context is set to
null
, a default render context with zoom 100%, rotation 0 and deviceResolution
72dpi will be assumed.
renderControls
- render controls to be applied while rendering
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |