Interface ICoachmark<I extends IAnyGroup>

All Superinterfaces:
IAnyGroup<ICoachmark<I>>, IChildable<ICoachmark<I>,I>, IComponent<ICoachmark<I>>, IHtmlBasedComponent<ICoachmark<I>>, IXulElement<ICoachmark<I>>

public interface ICoachmark<I extends IAnyGroup> extends IXulElement<ICoachmark<I>>, IAnyGroup<ICoachmark<I>>, IChildable<ICoachmark<I>,I>
Immutable Coachmark component

A coachmark component.

A coachmark is used to attract users' attention to the target component.

The coachmarks are suitable for guiding user operations, they should be as relevant as possible to the context.

Support @Action

Name Action Type
onOpen ActionData: OpenData
Denotes that the user has opened or closed a component.
onTargetClick ActionData: MouseData
Represents an event caused by a user's click on a highlighted target component.
Author:
katherine
See Also:
  • Coachmark
  • Field Details

    • DEFAULT

      static final ICoachmark<IAnyGroup> DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zkmax.nav.Coachmark"

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

      @Nullable String getTarget()
      Returns the target id of this coachmark.

      Default: null

    • withTarget

      ICoachmark<I> withTarget(@Nullable String target)
      Returns a copy of this immutable component with the specified target.

      Sets the target component id of this coachmark

      Parameters:
      target - The target component id of this coachmark

      Default: null.

      Returns:
      A modified copy of the this object
    • withTarget

      default ICoachmark withTarget(IComponent target)
      Returns a copy of this immutable component with the specified target.

      Sets the target component of this coachmark

      Parameters:
      target - The target component of this coachmark

      Default: null.

      Returns:
      A modified copy of the this object
    • getPosition

      default String getPosition()
      Returns the position of this coachmark.

      Default: "after_center".

    • withPosition

      ICoachmark<I> withPosition(String position)
      Returns a copy of this immutable component with the specified position.

      Sets the position of this coachmark.

      Valid values for the position attribute are:

      • before_start
        the coachmark appears above the target, aligned to the left.
      • before_center
        the coachmark appears above the target, aligned to the center.
      • before_end
        the coachmark appears above the target, aligned to the right.
      • after_start
        the coachmark appears below the target, aligned to the left.
      • after_center
        the coachmark appears below the target, aligned to the center.
      • after_end
        the coachmark appears below the target, aligned to the right.
      • start_before
        the coachmark appears to the left of the target, aligned to the top.
      • start_center
        the coachmark appears to the left of the target, aligned to the middle.
      • start_after
        the coachmark appears to the left of the target, aligned to the bottom.
      • end_before
        the coachmark appears to the right of the target, aligned to the top.
      • end_center
        the coachmark appears to the right of the target, aligned to the middle.
      • end_after
        the coachmark appears to the right of the target, aligned to the bottom.

      Parameters:
      position - The position of this coachmark.

      Default: "after_center".

      Returns:
      A modified copy of the this object
    • withPosition

      default ICoachmark<I> withPosition(ICoachmark.Position position)
      Returns a copy of this immutable component with the specified position.

      Sets the position of this coachmark.

      Valid values for the position attribute are:

      • before_start
        the coachmark appears above the target, aligned to the left.
      • before_center
        the coachmark appears above the target, aligned to the center.
      • before_end
        the coachmark appears above the target, aligned to the right.
      • after_start
        the coachmark appears below the target, aligned to the left.
      • after_center
        the coachmark appears below the target, aligned to the center.
      • after_end
        the coachmark appears below the target, aligned to the right.
      • start_before
        the coachmark appears to the left of the target, aligned to the top.
      • start_center
        the coachmark appears to the left of the target, aligned to the middle.
      • start_after
        the coachmark appears to the left of the target, aligned to the bottom.
      • end_before
        the coachmark appears to the right of the target, aligned to the top.
      • end_center
        the coachmark appears to the right of the target, aligned to the middle.
      • end_after
        the coachmark appears to the right of the target, aligned to the bottom.

      Parameters:
      position - The position of this coachmark.

      Default: "after_center".

      Returns:
      A modified copy of the this object
    • getId

      default String getId()
      Description copied from interface: IComponent
      Returns the ID.

      Default: "" (an empty string; it means no ID at all).
      Note: Unlike ZK Component, there is no ID Space in Stateless Component, so the ID should be unique within a Desktop Scope, aka a browser page.

      Specified by:
      getId in interface IComponent<I extends IAnyGroup>
    • of

      static <I extends IAnyGroup> ICoachmark<I> of(String targetId, Iterable<? extends I> children)
      Returns the instance with the given targetId and any group children.
      Parameters:
      targetId - The target ID
      children - The children belong to any group
      See Also:
    • of

      static <I extends IAnyGroup> ICoachmark<I> of(String targetId, I... children)
      Returns the instance with the given targetId and any group children.
      Parameters:
      targetId - The target ID
      children - The children belong to any group
      See Also:
    • ofId

      static <I extends IAnyGroup> ICoachmark<I> ofId(String id)
      Returns the instance with the given id.
      Parameters:
      id - The id to identify this component