org.jfree.chart.imagemap

Class ImageMapUtilities


public class ImageMapUtilities
extends java.lang.Object

Collection of utility methods related to producing image maps. Functionality was originally in ChartUtilities.
Author:
Richard Atkinson

Method Summary

static String
getImageMap(String name, ChartRenderingInfo info)
Creates an image map element that complies with the XHTML 1.0 specification.
static String
getImageMap(String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)
Creates an image map element that complies with the XHTML 1.0 specification.
static void
writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info)
Writes an image map to an output stream.
static void
writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, boolean useOverLibForToolTips)
Writes an image map to an output stream.
static void
writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)
Writes an image map to an output stream.

Method Details

getImageMap

public static String getImageMap(String name,
                                 ChartRenderingInfo info)
Creates an image map element that complies with the XHTML 1.0 specification.
Parameters:
name - the map name (null not permitted).
info - the chart rendering info (null not permitted).
Returns:
The map element.

getImageMap

public static String getImageMap(String name,
                                 ChartRenderingInfo info,
                                 ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
                                 URLTagFragmentGenerator urlTagFragmentGenerator)
Creates an image map element that complies with the XHTML 1.0 specification.
Parameters:
name - the map name (null not permitted).
info - the chart rendering info (null not permitted).
toolTipTagFragmentGenerator - the tool tip generator.
urlTagFragmentGenerator - the url generator.
Returns:
The map tag.

writeImageMap

public static void writeImageMap(PrintWriter writer,
                                 String name,
                                 ChartRenderingInfo info)
            throws IOException
Writes an image map to an output stream.
Parameters:
writer - the writer (null not permitted).
name - the map name (null not permitted).
info - the chart rendering info (null not permitted).

writeImageMap

public static void writeImageMap(PrintWriter writer,
                                 String name,
                                 ChartRenderingInfo info,
                                 boolean useOverLibForToolTips)
            throws IOException
Writes an image map to an output stream.
Parameters:
writer - the writer (null not permitted).
name - the map name (null not permitted).
info - the chart rendering info (null not permitted).
useOverLibForToolTips - whether to use OverLIB for tooltips (http://www.bosrup.com/web/overlib/).

writeImageMap

public static void writeImageMap(PrintWriter writer,
                                 String name,
                                 ChartRenderingInfo info,
                                 ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
                                 URLTagFragmentGenerator urlTagFragmentGenerator)
            throws IOException
Writes an image map to an output stream.
Parameters:
writer - the writer (null not permitted).
name - the map name (null not permitted).
info - the chart rendering info (null not permitted).
toolTipTagFragmentGenerator - the tool tip generator.
urlTagFragmentGenerator - the url generator.