Interface IArea

  • All Superinterfaces:
    IComponent<IArea>

    public interface IArea
    extends IComponent<IArea>
    Immutable Area component

    An area of an IImagemap. Instead of the application processing the coordinates, developers can add the IArea components as children of a IImagemap component thus defining a target. The IImagemap component will translate the mouse pointer coordinates into a logical name e.g. The id of the area the user clicked. If the coordinates in one area component overlap with another, the first one takes precedence.

    Author:
    katherine
    See Also:
    Area
    • Field Detail

      • DEFAULT

        static final IArea DEFAULT
        Constant for default attributes of this immutable component.
    • Method Detail

      • getWidgetClass

        default java.lang.String getWidgetClass()
        Returns the client widget class.

        Default: "zul.wgt.Area"

        Specified by:
        getWidgetClass in interface IComponent<IArea>
        Returns:
      • getCoords

        @Nullable
        java.lang.String getCoords()
        Returns the coordination of this area.
      • withCoords

        IArea withCoords​(@Nullable
                         java.lang.String coords)
        Returns a copy of this immutable component with the specified coords.

        Sets the coords of this area. Its content depends on getShape():

        circle
        coords="x,y,r"
        polygon
        coords="x1,y1,x2,y2,x3,y3..."
        The polygon is automatically closed, so it is not necessary to repeat the first coordination.
        rectangle
        coords="x1,y1,x2,y2"

        Note: (0, 0) is the upper-left corner. If the coordinates in one IArea component overlap with another, the first one takes precedence.

        Returns:
        A modified copy of the this object
      • getShape

        @Nullable
        java.lang.String getShape()
        Returns the shape of this area.

        Default: null (means rectangle).

      • withShape

        IArea withShape​(@Nullable
                        java.lang.String shape)
        Returns a copy of this immutable component with the specified shape.

        Sets the shape of this IArea.

        Parameters:
        shape - "rectangle", "rect", "circle", "cric", "polygon", "poly" or null.
        Returns:
        A modified copy of the this object
      • getTooltiptext

        @Nullable
        java.lang.String getTooltiptext()
        Returns the text as the tooltip.

        Default: null.

      • withTooltiptext

        IArea withTooltiptext​(@Nullable
                              java.lang.String tooltiptext)
        Returns a copy of this immutable component with the specified tooltiptext.

        Sets the text as the tooltip.

        Parameters:
        tooltiptext - The text as the tooltip.
        Returns:
        A modified copy of the this object
      • getTabindex

        @Nullable
        java.lang.Integer getTabindex()
        Returns null if not set.
        Returns:
        the tab order of this component
      • withTabindex

        IArea withTabindex​(@Nullable
                           java.lang.Integer tabindex)
        Returns a copy of this immutable component with the specified tabindex.

        Sets the tab order of this component. Removes the tabindex attribute if it's set to null.

        Parameters:
        tabindex - The tab order of this component.
        Returns:
        A modified copy of the this object
      • of

        static IArea of​(java.lang.String coords)
        Returns the instance with the given coordinates.
        Parameters:
        coords - The coordinates of this area.
      • ofId

        static IArea ofId​(java.lang.String id)
        Returns the instance with the given id.
        Parameters:
        id - The id to identify this component