Package org.apache.fop.render
Class RendererContext
java.lang.Object
org.apache.fop.render.RendererContext
- Direct Known Subclasses:
AFPRendererContext
The Render Context for external handlers. This provides a rendering context
so that external handlers can get information to be able to render to the
render target.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Base class for a wrapper around RendererContext to access its properties in a type-safe, renderer-specific way. -
Constructor Summary
ConstructorDescriptionRendererContext
(AbstractRenderer renderer, String mime) Constructor for this class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the MIME type associated with this RendererContext.getProperty
(String prop) Returns a property from the RendererContext.Returns the user agent.void
setProperty
(String name, Object val) Sets a property on the RendererContext.void
Sets the user agent.toString()
wrapRendererContext
(RendererContext context) Wrap the render context to allow easier access to its values.
-
Constructor Details
-
RendererContext
Constructor for this class. It takes a MIME type as parameter.- Parameters:
renderer
- the current renderermime
- the MIME type of the output that's generated.
-
-
Method Details
-
getRenderer
- Returns:
- Returns the renderer.
-
getMimeType
Returns the MIME type associated with this RendererContext.- Returns:
- The MIME type (ex. application/pdf)
-
setUserAgent
Sets the user agent.- Parameters:
ua
- The user agent
-
getUserAgent
Returns the user agent.- Returns:
- The user agent
-
setProperty
Sets a property on the RendererContext.- Parameters:
name
- The key of the propertyval
- The value of the property
-
getProperty
Returns a property from the RendererContext.- Parameters:
prop
- The key of the property to return.- Returns:
- The requested value,
null
if it doesn't exist.
-
wrapRendererContext
Wrap the render context to allow easier access to its values.- Parameters:
context
- the renderer context- Returns:
- the generic renderer context wrapper
-
toString
-