Package org.jfree.chart.imagemap
Class ImageMapUtils
- java.lang.Object
-
- org.jfree.chart.imagemap.ImageMapUtils
-
public class ImageMapUtils extends java.lang.ObjectCollection of utility methods related to producing image maps. Functionality was originally inChartUtils.
-
-
Constructor Summary
Constructors Constructor Description ImageMapUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetImageMap(java.lang.String name, ChartRenderingInfo info)Creates an image map element that complies with the XHTML 1.0 specification.static java.lang.StringgetImageMap(java.lang.String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)Creates an image map element that complies with the XHTML 1.0 specification.static java.lang.StringhtmlEscape(java.lang.String input)Returns a string that is equivalent to the input string, but with special characters converted to HTML escape sequences.static java.lang.StringjavascriptEscape(java.lang.String input)Returns a string that is equivalent to the input string, but with special characters converted to JavaScript escape sequences.static voidwriteImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info)Writes an image map to an output stream.static voidwriteImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info, boolean useOverLibForToolTips)Writes an image map to an output stream.static voidwriteImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)Writes an image map to an output stream.
-
-
-
Method Detail
-
writeImageMap
public static void writeImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info) throws java.io.IOExceptionWrites an image map to an output stream.- Parameters:
writer- the writer (nullnot permitted).name- the map name (nullnot permitted).info- the chart rendering info (nullnot permitted).- Throws:
java.io.IOException- if there are any I/O errors.
-
writeImageMap
public static void writeImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info, boolean useOverLibForToolTips) throws java.io.IOExceptionWrites an image map to an output stream.- Parameters:
writer- the writer (nullnot permitted).name- the map name (nullnot permitted).info- the chart rendering info (nullnot permitted).useOverLibForToolTips- whether to use OverLIB for tooltips (http://www.bosrup.com/web/overlib/).- Throws:
java.io.IOException- if there are any I/O errors.
-
writeImageMap
public static void writeImageMap(java.io.PrintWriter writer, java.lang.String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) throws java.io.IOExceptionWrites an image map to an output stream.- Parameters:
writer- the writer (nullnot permitted).name- the map name (nullnot permitted).info- the chart rendering info (nullnot permitted).toolTipTagFragmentGenerator- a generator for the HTML fragment that will contain the tooltip text (nullnot permitted ifinfocontains tooltip information).urlTagFragmentGenerator- a generator for the HTML fragment that will contain the URL reference (nullnot permitted ifinfocontains URLs).- Throws:
java.io.IOException- if there are any I/O errors.
-
getImageMap
public static java.lang.String getImageMap(java.lang.String name, ChartRenderingInfo info)Creates an image map element that complies with the XHTML 1.0 specification.- Parameters:
name- the map name (nullnot permitted).info- the chart rendering info (nullnot permitted).- Returns:
- The map element.
-
getImageMap
public static java.lang.String getImageMap(java.lang.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 (nullnot permitted).info- the chart rendering info (nullnot permitted).toolTipTagFragmentGenerator- a generator for the HTML fragment that will contain the tooltip text (nullnot permitted ifinfocontains tooltip information).urlTagFragmentGenerator- a generator for the HTML fragment that will contain the URL reference (nullnot permitted ifinfocontains URLs).- Returns:
- The map tag.
-
htmlEscape
public static java.lang.String htmlEscape(java.lang.String input)
Returns a string that is equivalent to the input string, but with special characters converted to HTML escape sequences.- Parameters:
input- the string to escape (nullnot permitted).- Returns:
- A string with characters escaped.
-
javascriptEscape
public static java.lang.String javascriptEscape(java.lang.String input)
Returns a string that is equivalent to the input string, but with special characters converted to JavaScript escape sequences.- Parameters:
input- the string to escape (nullnot permitted).- Returns:
- A string with characters escaped.
-
-