Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.render
Class RendererContext

    java.lang.Object
      org.apache.fop.render.RendererContext

Direct Known Subclasses:
  AFPRendererContext

public class RendererContext
extends java.lang.Object

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
`static class` | `RendererContext.RendererContextWrapper` Base class for a wrapper around RendererContext to access its properties in a type-safe, renderer-specific way.

Constructor Summary
`RendererContext(AbstractRenderer renderer, java.lang.String mime)` Constructor for this class.

Method Summary
`java.lang.String` | `getMimeType()` Returns the MIME type associated with this RendererContext.
`java.lang.Object` | `getProperty(java.lang.String prop)` Returns a property from the RendererContext.
`AbstractRenderer` | `getRenderer()`
`FOUserAgent` | `getUserAgent()` Returns the user agent.
`void` | `setProperty(java.lang.String name, java.lang.Object val)` Sets a property on the RendererContext.
`void` | `setUserAgent(FOUserAgent ua)` Sets the user agent.
`java.lang.String` | `toString()`
`static RendererContext.RendererContextWrapper` | `wrapRendererContext(RendererContext context)` Wrap the render context to allow easier access to its values.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RendererContext

    public RendererContext(AbstractRenderer renderer,
                           java.lang.String mime)

  Constructor for this class. It takes a MIME type as parameter.

Parameters:
  `renderer` - the current renderer
  `mime` - the MIME type of the output that's generated.

Method Detail

### getRenderer

    public AbstractRenderer getRenderer()

  Returns:
    Returns the renderer.

### getMimeType

    public java.lang.String getMimeType()

  Returns the MIME type associated with this RendererContext.

  Returns:
    The MIME type (ex. application/pdf)

### setUserAgent

    public void setUserAgent(FOUserAgent ua)

  Sets the user agent.

  Parameters:
    `ua` - The user agent

### getUserAgent

    public FOUserAgent getUserAgent()

  Returns the user agent.

  Returns:
    The user agent

### setProperty

    public void setProperty(java.lang.String name,
                            java.lang.Object val)

  Sets a property on the RendererContext.

  Parameters:
    `name` - The key of the property
    `val` - The value of the property

### getProperty

    public java.lang.Object getProperty(java.lang.String prop)

  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

    public static RendererContext.RendererContextWrapper wrapRendererContext(RendererContext context)

  Wrap the render context to allow easier access to its values.

  Parameters:
    `context` - the renderer context
  Returns:
    the generic renderer context wrapper

### toString

    public java.lang.String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.