Class ImageMap


  • public class ImageMap
    extends java.lang.Object
    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 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 new ImageMap object from the given string representation.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • fromString

        public static ImageMap fromString​(java.lang.String mapDefinition)
                                   throws java.lang.IllegalArgumentException
        Creates a new ImageMap object from the given string representation.
        Parameters:
        mapDefinition - string representation (as created by the CqImageMap 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 and scaled 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