Package com.day.cq.wcm.foundation
Class ImageMap
- java.lang.Object
-
- com.day.cq.wcm.foundation.ImageMap
-
public class ImageMap extends java.lang.ObjectThis class is used for parsing image map definitions as generated by theCqImageMapcomponent and make them available through an API to CQ components.The class is designed for single-threaded use.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classImageMap.ImageAreaInner class that represents an area of the map.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdraw(java.lang.String id)Returns the HTML code required for the image map.static ImageMapfromString(java.lang.String mapDefinition)Creates a newImageMapobject from the given string representation.
-
-
-
Method Detail
-
fromString
public static ImageMap fromString(java.lang.String mapDefinition) throws java.lang.IllegalArgumentException
Creates a newImageMapobject from the given string representation.- Parameters:
mapDefinition- string representation (as created by theCqImageMapcomponent)- Returns:
- a suitable representation of the component
- Throws:
java.lang.IllegalArgumentException- if the given string representation is invalid
-
draw
public java.lang.String draw(java.lang.String id)
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
-
-