The RenderMetricsFactory is used by the RenderManager (more specifically the
RenderCreationDecisive) to obtain metrics on renderer extensions. The RenderMetrics objects are
used to decide which renderers to instantiate to render a layer. As the state of udig changes
different renderers may be more suited so the RenderMetrics object are also used to judge whether
a new renderer should be used for rendering a layer.
author: Jesse Eichar version: $Revision: 1.9 $
Method Summary
public boolean
canRender(IRenderContext context) This method is used to determine whether the renderer can render the layer.
createMetrics(IRenderContext context) Returns a RenderMetrics object which provides metrics for a renderer while rendering
layer using data as the data source and rendering to a viewport
modeled by vmodel.
This method is used to determine whether the renderer can render the layer. It is used so
that not all metrics need to be created.
Parameters: toolkit - A toolkit containing reference to everything a renderer needs. true if the associated renderer can render the layer using the data provided by data. throws: IOException - See Also:IRenderContext
Returns a RenderMetrics object which provides metrics for a renderer while rendering
layer using data as the data source and rendering to a viewport
modeled by vmodel. NOTE: These metrics is a active object and cached by the
RenderManager. As such no references should be maintained to the objects returned by this
method.
Parameters: toolkit - A toolkit containing reference to everything a renderer needs. A RenderMetrics object which provides metrics for a renderer while renderinglayer using data as the data source and rendering to aviewport modeled by vmodel. See Also:IRenderMetrics See Also:IRenderContext
Returns the type of the Renderer that will be created.
Note if this is a MultiLayerRenderer the metrics values will be weighted depending on how
many adjacent layers can be rendered by the renderer for the current map.
Please return the class that this RenderMetricsFactory will create (if given
the appropriate context).
the type of the Renderer that will be created