Class Coachmark

All Implemented Interfaces:
Serializable, 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:
  • Constructor Details

    • Coachmark

      public Coachmark()
  • Method Details

    • getTarget

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

      public void setTarget(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 String getPosition()
      Returns the position of this coachmark.

      Default: after_center.

      Returns:
      String
    • setPosition

      public void setPosition(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 String getNext()
      Returns next coachmark id of this coachmark.
      Returns:
      String
    • setNext

      public void setNext(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.
    • getNextCoachmark

      public Coachmark getNextCoachmark()
      Returns next coachmark of this coachmark.
      Returns:
      Coachmark
      See Also:
    • 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.
    • renderProperties

      protected void renderProperties(ContentRenderer renderer) throws IOException
      Description copied from class: HtmlBasedComponent
      Renders the content of this component, excluding the enclosing tags and children.

      See also ZK Client-side Reference: Property Rendering

      Overrides:
      renderProperties in class XulElement
      Throws:
      IOException
    • service

      public void service(AuRequest request, boolean everError)
      Description copied from class: HtmlBasedComponent
      Processes an AU request.

      Default: it handles onClick, onDoubleClick, onRightClick onMove, onSize, onZIndex.

      Specified by:
      service in interface ComponentCtrl
      Overrides:
      service in class HtmlBasedComponent
      everError - whether any error ever occurred before processing this request.
      See Also: