com.ge.research.acuity.ui.renderers
Interface GraphRenderer

All Superinterfaces:
Renderer
All Known Implementing Classes:
JFreeRenderer

public interface GraphRenderer
extends Renderer

This interface defines the set of methods that must be implemented in order to successfully transform a GraphPO into a visible, rendered chart.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:51 $
Author:
garbiras

Field Summary
static java.util.PropertyResourceBundle bundle
          Property resource which holds information whichis used to determine which GraphRenderer to return
 
Method Summary
 java.lang.String createChartImage(java.lang.Object chart, int width, int height)
          Takes a 3rd party graphing library chart object, and size dimensions, and passes to a graphing servlet to create an image of the chart, and store in the session
 int getChartImageHeightOffset()
          Returns the pixel offset of the chart image height, produced by the renderer.
 int getChartImageWidthOffset()
          Returns the pixel offset of the chart image width, produced by the renderer.
 java.lang.String getImageMap(java.lang.Object chart, java.lang.String identifier)
          Takes a 3rd party graphing library chart object, and its image identifier and retrieves/creates any image map information for the chart.
 java.lang.String getRenderServlet()
          Returns the graphing server servlet context path, so that the chart can be rendered within an HTML session and available to a browser.
 java.lang.Object render(GraphPO po)
          Converts a GraphPO presentation object into a 3rd party graphing library chart object
 
Methods inherited from interface com.ge.research.acuity.ui.renderers.Renderer
render
 

Field Detail

bundle

public static final java.util.PropertyResourceBundle bundle
Property resource which holds information whichis used to determine which GraphRenderer to return

Method Detail

createChartImage

public java.lang.String createChartImage(java.lang.Object chart,
                                         int width,
                                         int height)
Takes a 3rd party graphing library chart object, and size dimensions, and passes to a graphing servlet to create an image of the chart, and store in the session

Parameters:
chart - the 3rd party graphing library chart object
width - the width of the chart image
height - the height of the chart image
Returns:
An identifier by which to retrieve the cached chart from the session via a graphing servlet

getChartImageHeightOffset

public int getChartImageHeightOffset()
Returns the pixel offset of the chart image height, produced by the renderer. The renderer produces an chart of size equivalent to that of the presentation object it represents. The offset values allow the image of the chart to be properly rendered as a presentation object (to allow for presentation object borders and headers)

Returns:
The height offset (in pixels) for the chart image

getChartImageWidthOffset

public int getChartImageWidthOffset()
Returns the pixel offset of the chart image width, produced by the renderer. The renderer produces an chart of size equivalent to that of the presentation object it represents. The offset values allow the image of the chart to be properly rendered as a presentation object (to allow for presentation object borders and headers)

Returns:
The width offset (in pixels) for the chart image

getRenderServlet

public java.lang.String getRenderServlet()
Returns the graphing server servlet context path, so that the chart can be rendered within an HTML session and available to a browser.

Returns:
The servlet context path for the graphing engine to use to render the chart within an HTML session

getImageMap

public java.lang.String getImageMap(java.lang.Object chart,
                                    java.lang.String identifier)
Takes a 3rd party graphing library chart object, and its image identifier and retrieves/creates any image map information for the chart.

Parameters:
chart - the 3rd party graphing library chart object
identifier - the identifier of the chart image in the session, to get the image map information for
Returns:
An image map HTML tag for the chart image identified by identifier

render

public java.lang.Object render(GraphPO po)
Converts a GraphPO presentation object into a 3rd party graphing library chart object

Parameters:
po - the graph presentation object to convert into 3rd party library object
Returns:
The 3rd party graphing library graph object