Package org.zkoss.stateless.sul

## Interface ILineitem<I extends IAnyGroup>

- All Superinterfaces:
    `IAnyGroup<ILineitem<I>>`, `IChildable<ILineitem<I>,​I>`, `IComponent<ILineitem<I>>`, `IHtmlBasedComponent<ILineitem<I>>`, `IXulElement<ILineitem<I>>`

      public interface ILineitem<I extends IAnyGroup>
      extends IXulElement<ILineitem<I>>, IChildable<ILineitem<I>,​I>, IAnyGroup<ILineitem<I>>

  Immutable `Lineitem` component

  Lineitem is the child of Linelayout, it can contain up to 2 components inside.

  Author:
    katherine
  See Also:
    `Lineitem`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `ILineitem.Builder<I extends IAnyGroup>` | Builds instances of type `ILineitem`.
    `static class` | `ILineitem.Updater` | Builds an updater of type `ILineitem` for `UiAgent.smartUpdate(Locator, SmartUpdater)`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static ILineitem<IAnyGroup>` | `DEFAULT` | Constant for default attributes of this immutable component.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getBackSpace()` | Returns the spacing with the next lineitem.
    `java.lang.String` | `getFrontSpace()` | Returns the spacing with the previous lineitem.
    `java.lang.String` | `getPointIconSclass()` | Returns the iconSclass name of this point.
    `Image` | `getPointImageContent()` | Returns the content set by `withPointImageContent(org.zkoss.image.Image)`.
    `java.lang.String` | `getPointImageSrc()` | Returns the source URI of the point image.
    `java.lang.String` | `getPointStyle()` | Returns the CSS style for the point.
    `default java.lang.String` | `getWidgetClass()` | Returns the client widget class.
    `default boolean` | `isOpposite()` | Returns whether the first child is displayed in the first area(left/top).
    `default boolean` | `isPointVisible()` | Returns whether the point is visible.
    `static <I extends IAnyGroup> ILineitem<I>` | `of​(I... children)` | Returns the instance with the given any group children (only up to two children).
    `static <I extends IAnyGroup> ILineitem<I>` | `of​(java.lang.Iterable<? extends I> children)` | Returns the instance with the given any group children (only up to two children).
    `static <I extends IAnyGroup> ILineitem<I>` | `ofId​(java.lang.String id)` | Returns the instance with the given id.
    `static <I extends IAnyGroup> ILineitem<I>` | `ofPointIconSclass​(java.lang.String pointIconSclass)` | Returns the instance with the given pointIconSclass.
    `static <I extends IAnyGroup> ILineitem<I>` | `ofPointImageSrc​(java.lang.String src)` | Returns the instance with the given pointImageSrc.
    `ILineitem<I>` | `withBackSpace​(java.lang.String backSpace)` | Returns a copy of `this` immutable component with the specified `backSpace`.
    `ILineitem<I>` | `withFrontSpace​(java.lang.String frontSpace)` | Returns a copy of `this` immutable component with the specified `frontSpace`.
    `ILineitem<I>` | `withOpposite​(boolean opposite)` | Returns a copy of `this` immutable component with the specified `opposite`.
    `ILineitem<I>` | `withPointIconSclass​(java.lang.String pointIconSclass)` | Returns a copy of `this` immutable component with the specified `pointIconSclass`.
    `default ILineitem<I>` | `withPointImageContent​(java.awt.image.RenderedImage image)` | Returns a copy of `this` immutable component with the specified `image`.
    `ILineitem<I>` | `withPointImageContent​(Image pointImageContent)` | Returns a copy of `this` immutable component with the specified `pointImageContent`.
    `ILineitem<I>` | `withPointImageSrc​(java.lang.String pointImageSrc)` | Returns a copy of `this` immutable component with the specified `pointImageSrc`.
    `ILineitem<I>` | `withPointStyle​(java.lang.String pointStyle)` | Returns a copy of `this` immutable component with the specified `pointStyle`.
    `ILineitem<I>` | `withPointVisible​(boolean pointVisible)` | Returns a copy of `this` immutable component with the specified `pointVisible`.

    - ### Methods inherited from interface org.zkoss.stateless.sul.IChildable

      `getChildren, withChildren, withChildren`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IComponent

      `getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent

      `getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IXulElement

      `getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip`

- - ### Field Detail

    - #### DEFAULT

          static final ILineitem<IAnyGroup> DEFAULT

      Constant for default attributes of this immutable component.

  - ### Method Detail

    - #### getWidgetClass

          default java.lang.String getWidgetClass()

      Returns the client widget class.

      Default: `"zkmax.layout.Lineitem"`

      Specified by:
        `getWidgetClass` in interface `IComponent<I extends IAnyGroup>`

    - #### getPointStyle

          @Nullable
          java.lang.String getPointStyle()

      Returns the CSS style for the point.

      Default: `null`

    - #### withPointStyle

          ILineitem<I> withPointStyle​(@Nullable
                                      java.lang.String pointStyle)

      Returns a copy of `this` immutable component with the specified `pointStyle`.

      Sets the pointStyle.

      Parameters:
        `pointStyle` - Sets the pointStyle.

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### getPointIconSclass

          @Nullable
          java.lang.String getPointIconSclass()

      Returns the iconSclass name of this point.

    - #### withPointIconSclass

          ILineitem<I> withPointIconSclass​(@Nullable
                                           java.lang.String pointIconSclass)

      Returns a copy of `this` immutable component with the specified `pointIconSclass`.

      Sets the pointIconSclass name of the point.

      Parameters:
        `pointIconSclass` - Sets the pointStyle.

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### getFrontSpace

          @Nullable
          java.lang.String getFrontSpace()

      Returns the spacing with the previous lineitem.

    - #### withFrontSpace

          ILineitem<I> withFrontSpace​(@Nullable
                                      java.lang.String frontSpace)

      Returns a copy of `this` immutable component with the specified `frontSpace`.

      Sets the spacing with the previous lineitem.

      Parameters:
        `frontSpace` - the spacing with the previous lineitem. (such as "5px" or "5em"). If null or empty (""), the default spacing is used (i.e., controlled by CSS alone).

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### getBackSpace

          @Nullable
          java.lang.String getBackSpace()

      Returns the spacing with the next lineitem.

    - #### withBackSpace

          ILineitem<I> withBackSpace​(@Nullable
                                     java.lang.String backSpace)

      Returns a copy of `this` immutable component with the specified `backSpace`.

      Sets the spacing with the next lineitem.

      Parameters:
        `backSpace` - the spacing with the next lineitem. (such as "5px" or "5em"). If null or empty (""), the default spacing is used (i.e., controlled by CSS alone).

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### isPointVisible

          default boolean isPointVisible()

      Returns whether the point is visible.

      Default: `true`.

    - #### withPointVisible

          ILineitem<I> withPointVisible​(boolean pointVisible)

      Returns a copy of `this` immutable component with the specified `pointVisible`.

      Sets whether the point is visible.

      Parameters:
        `pointVisible` - Whether the point is visible.

        Default: `true`.

      Returns:
        A modified copy of the `this` object

    - #### isOpposite

          default boolean isOpposite()

      Returns whether the first child is displayed in the first area(left/top).

      Default: false.

    - #### withOpposite

          ILineitem<I> withOpposite​(boolean opposite)

      Returns a copy of `this` immutable component with the specified `opposite`.

      Sets whether the first child is displayed in the first area(left/top).

      Parameters:
        `opposite` - Whether the first child is displayed in the first area(left/top).

        Default: `true`.

      Returns:
        A modified copy of the `this` object

    - #### getPointImageSrc

          @Nullable
          java.lang.String getPointImageSrc()

      Returns the source URI of the point image.

      Default: `null`.

    - #### withPointImageSrc

          ILineitem<I> withPointImageSrc​(@Nullable
                                         java.lang.String pointImageSrc)

      Returns a copy of `this` immutable component with the specified `pointImageSrc`.

      Sets the source URI of the point image.

      Note: the `withPointImageContent(org.zkoss.image.Image)` is higher priority if both methods are specified.

      Parameters:
        `pointImageSrc` - The source URI of the point image.

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### getPointImageContent

          @Nullable
          Image getPointImageContent()

      Returns the content set by `withPointImageContent(org.zkoss.image.Image)`.

      Note: it won't fetch what is set through by `withPointImageSrc(String)`. It simply returns what is passed to `withPointImageContent(org.zkoss.image.Image)`.

    - #### withPointImageContent

          ILineitem<I> withPointImageContent​(@Nullable
                                             Image pointImageContent)

      Returns a copy of `this` immutable component with the specified `pointImageContent`.

      Sets the content directly.

      Default: `null`.

      Calling this method implies `withPointImageSrc` is useless. In other words, The `withPointImageContent(org.zkoss.image.Image)` priority is higher than calling the `withPointImageSrc(String)`, if any.

      Parameters:
        `pointImageContent` - The image to display.
      Returns:
        A modified copy of `this` object
      See Also:
        `withPointImageSrc(String)`

    - #### withPointImageContent

          default ILineitem<I> withPointImageContent​(@Nullable
                                                     java.awt.image.RenderedImage image)

      Returns a copy of `this` immutable component with the specified `image`.

      Sets the content directly with the rendered image. It actually encodes the rendered image to an PNG image (`Image`) with `Images.encode(java.lang.String, java.awt.image.RenderedImage, float, boolean)`, and then invoke `withPointImageContent(org.zkoss.image.Image)`}.

      If you want more control such as different format, quality, and naming, you can use `Images` directly.

      Parameters:
        `image` - The image to display.
      Returns:
        A modified copy of `this` object

    - #### of

          static <I extends IAnyGroup> ILineitem<I> of​(java.lang.Iterable<? extends I> children)

      Returns the instance with the given any group children (only up to two children).
      Parameters:
        `children` - The children belong to any group
      See Also:
        `IAnyGroup`

    - #### of

          static <I extends IAnyGroup> ILineitem<I> of​(I... children)

      Returns the instance with the given any group children (only up to two children).
      Parameters:
        `children` - The children belong to any group
      See Also:
        `IAnyGroup`

    - #### ofPointIconSclass

          static <I extends IAnyGroup> ILineitem<I> ofPointIconSclass​(java.lang.String pointIconSclass)

      Returns the instance with the given pointIconSclass.
      Parameters:
        `pointIconSclass` - The sclass name of the point icon.

    - #### ofPointImageSrc

          static <I extends IAnyGroup> ILineitem<I> ofPointImageSrc​(java.lang.String src)

      Returns the instance with the given pointImageSrc.
      Parameters:
        `src` - The source URI of the point background image.

    - #### ofId

          static <I extends IAnyGroup> ILineitem<I> ofId​(java.lang.String id)

      Returns the instance with the given id.
      Parameters:
        `id` - The id to identify this component