Package com.day.cq.wcm.foundation
Class ImageMap
- java.lang.Object
-
- com.day.cq.wcm.foundation.ImageMap
-
public class ImageMap extends java.lang.Object
This class is used for parsing image map definitions as generated by theCqImageMap
component 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 class
ImageMap.ImageArea
Inner 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.String
draw(java.lang.String id)
Returns the HTML code required for the image map.static ImageMap
fromString(java.lang.String mapDefinition)
Creates a newImageMap
object from the given string representation.
-
-
-
Method Detail
-
fromString
public static ImageMap fromString(java.lang.String mapDefinition) throws java.lang.IllegalArgumentException
Creates a newImageMap
object from the given string representation.- Parameters:
mapDefinition
- string representation (as created by theCqImageMap
component)- 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
originalSize
andscaled
can 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
-
-