Class Coachmark

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Component, Scope, ComponentCtrl

    public class Coachmark
    extends XulElement
    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.

    Only support browsers that support CSS keyframes. (IE10+, Edge, Chrome, Firefox, Safari)

    Since:
    9.0.0
    Author:
    leon
    See Also:
    Serialized Form
    • Constructor Detail

      • Coachmark

        public Coachmark()
    • Method Detail

      • getTarget

        public java.lang.String getTarget()
        Returns the target id of this coachmark.
        Returns:
        String
      • setTarget

        public void setTarget​(java.lang.String id)
        Sets the target component id of this coachmark.
        Parameters:
        id - the target component id
      • setTarget

        public void setTarget​(Component comp)
        Sets the target component of this coachmark.
        Parameters:
        comp - the target component
      • getPosition

        public java.lang.String getPosition()
        Returns the position of this coachmark.

        Default: after_center.

        Returns:
        String
      • setPosition

        public void setPosition​(java.lang.String 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.
        Throws:
        WrongValueException - if value is not valid.
      • getNext

        public java.lang.String getNext()
        Returns next coachmark id of this coachmark.
        Returns:
        String
      • setNext

        public void setNext​(java.lang.String coachmarkId)
        Sets next coachmark id.
        Parameters:
        coachmarkId - the next coachmark id.
      • setNext

        public void setNext​(Coachmark coachmark)
        Sets next coachmark.
        Parameters:
        coachmark - the next coachmark.
      • open

        public void open()
        Opens the coachmark.
      • close

        public void close()
        Closes the coachmark.
      • next

        public void next()
        Close this coachmark and Open the next which is set.
      • next

        public void next​(Coachmark coachmark)
        Close this coachmark and Open the one you passed.(ignore the next coachmark already set)
        Parameters:
        coachmark - the coachmark to open next.