/**
* Writes an image map to an output stream.
*
* @param writer the writer (<code>null</code> not permitted).
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param useOverLibForToolTips whether to use OverLIB for tooltips
* (http://www.bosrup.com/web/overlib/).
*
* @throws IOException if there are any I/O errors.
*/
/**
* Writes an image map to an output stream.
*
* @param writer the writer (<code>null</code> not permitted).
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param useOverLibForToolTips whether to use OverLIB for tooltips
* (http://www.bosrup.com/web/overlib/).
*
* @throws java.io.IOException if there are any I/O errors.
*/
public static void writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, boolean useOverLibForToolTips) throws IOException {
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator = null;
if (useOverLibForToolTips) {
toolTipTagFragmentGenerator = new OverLIBToolTipTagFragmentGenerator();
}
else {
toolTipTagFragmentGenerator = new StandardToolTipTagFragmentGenerator();
}
ImageMapUtilities.writeImageMap(writer, name, info, toolTipTagFragmentGenerator, new StandardURLTagFragmentGenerator());
}
/**
* Writes an image map to the specified writer.
*
* @param writer the writer (<code>null</code> not permitted).
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text (<code>null</code> not permitted
* if <code>info</code> contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference (<code>null</code> not permitted if
* <code>info</code> contains URLs).
*
* @throws IOException if there are any I/O errors.
*/
/**
* Writes an image map to an output stream.
*
* @param writer the writer (<code>null</code> not permitted).
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
* @param toolTipTagFragmentGenerator a generator for the HTML fragment
* that will contain the tooltip text (<code>null</code> not permitted
* if <code>info</code> contains tooltip information).
* @param urlTagFragmentGenerator a generator for the HTML fragment that
* will contain the URL reference (<code>null</code> not permitted if
* <code>info</code> contains URLs).
*
* @throws java.io.IOException if there are any I/O errors.
*/
public static void writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) throws IOException {
writer.println(ImageMapUtilities.getImageMap(name, info, toolTipTagFragmentGenerator, urlTagFragmentGenerator));
}
/**
* Creates an HTML image map. This method maps to
* {@link ImageMapUtilities#getImageMap(String, ChartRenderingInfo,
* ToolTipTagFragmentGenerator, URLTagFragmentGenerator)}, using default
* generators.
*
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
*
* @return The map tag.
*/
/**
* Creates an image map element that complies with the XHTML 1.0
* specification.
*
* @param name the map name (<code>null</code> not permitted).
* @param info the chart rendering info (<code>null</code> not permitted).
*
* @return The map element.
*/
public static String getImageMap(String name, ChartRenderingInfo info) {
return ImageMapUtilities.getImageMap(name, info, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator());
}
|