Package com.day.cq.wcm.foundation
Class ImageMap
java.lang.Object
com.day.cq.wcm.foundation.ImageMap
This class is used for parsing image map definitions as generated by the
CqImageMap component and make them available through an API to
CQ components.
The class is designed for single-threaded use.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassInner class that represents an area of the map. -
Method Summary
-
Method Details
-
fromString
Creates a newImageMapobject from the given string representation.- Parameters:
mapDefinition- string representation (as created by theCqImageMapcomponent)- Returns:
- a suitable representation of the component
- Throws:
IllegalArgumentException- if the given string representation is invalid
-
draw
Returns the HTML code required for the image map.Parameters
originalSizeandscaledcan be used to create a scaled map that is suitable for a scaled image.- Parameters:
id- id of the image map- Returns:
- HTML code representing the image map
-