public class RendererContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RendererContext.RendererContextWrapper
Base class for a wrapper around RendererContext to access its properties in a type-safe,
renderer-specific way.
|
Constructor and Description |
---|
RendererContext(AbstractRenderer renderer,
String mime)
Constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
String |
getMimeType()
Returns the MIME type associated with this RendererContext.
|
Object |
getProperty(String prop)
Returns a property from the RendererContext.
|
AbstractRenderer |
getRenderer() |
FOUserAgent |
getUserAgent()
Returns the user agent.
|
void |
setProperty(String name,
Object val)
Sets a property on the RendererContext.
|
void |
setUserAgent(FOUserAgent ua)
Sets the user agent.
|
String |
toString() |
static RendererContext.RendererContextWrapper |
wrapRendererContext(RendererContext context)
Wrap the render context to allow easier access to its values.
|
public RendererContext(AbstractRenderer renderer, String mime)
renderer
- the current renderermime
- the MIME type of the output that's generated.public AbstractRenderer getRenderer()
public String getMimeType()
public void setUserAgent(FOUserAgent ua)
ua
- The user agentpublic FOUserAgent getUserAgent()
public void setProperty(String name, Object val)
name
- The key of the propertyval
- The value of the propertypublic Object getProperty(String prop)
prop
- The key of the property to return.null
if it doesn't exist.public static RendererContext.RendererContextWrapper wrapRendererContext(RendererContext context)
context
- the renderer contextCopyright © 2025 Apache Software Foundation. All rights reserved.