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>
ImmutableCoachmarkcomponentA 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classICoachmark.Builder<I extends IAnyGroup>Builds instances of typeICoachmark.static classICoachmark.PositionSpecify a popup's position when attaching to a component.static classICoachmark.UpdaterBuilds an updater of typeICoachmarkforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Field Summary
Fields Modifier and Type Field Description static ICoachmark<IAnyGroup>DEFAULTConstant for default attributes of this immutable component.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetId()Returns the ID.default java.lang.StringgetPosition()Returns the position of this coachmark.java.lang.StringgetTarget()Returns the target id of this coachmark.default java.lang.StringgetWidgetClass()Returns the client widget class.static <I extends IAnyGroup>
ICoachmark<I>of(java.lang.String targetId, I... children)Returns the instance with the given targetId and any group children.static <I extends IAnyGroup>
ICoachmark<I>of(java.lang.String targetId, java.lang.Iterable<? extends I> children)Returns the instance with the given targetId and any group children.static <I extends IAnyGroup>
ICoachmark<I>ofId(java.lang.String id)Returns the instance with the given id.ICoachmark<I>withPosition(java.lang.String position)Returns a copy ofthisimmutable component with the specifiedposition.default ICoachmark<I>withPosition(ICoachmark.Position position)Returns a copy ofthisimmutable component with the specifiedposition.ICoachmark<I>withTarget(java.lang.String target)Returns a copy ofthisimmutable component with the specifiedtarget.default ICoachmarkwithTarget(IComponent target)Returns a copy ofthisimmutable component with the specifiedtarget.-
Methods inherited from interface org.zkoss.stateless.sul.IChildable
getChildren, withChildren, withChildren
-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, 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 ICoachmark<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.nav.Coachmark"- Specified by:
getWidgetClassin interfaceIComponent<I extends IAnyGroup>
-
getTarget
@Nullable java.lang.String getTarget()
Returns the target id of this coachmark.Default:
null
-
withTarget
ICoachmark<I> withTarget(@Nullable java.lang.String target)
Returns a copy ofthisimmutable component with the specifiedtarget.Sets the target component id of this coachmark
- Parameters:
target- The target component id of this coachmarkDefault:
null.- Returns:
- A modified copy of the
thisobject
-
withTarget
default ICoachmark withTarget(IComponent target)
Returns a copy ofthisimmutable component with the specifiedtarget.Sets the target component of this coachmark
- Parameters:
target- The target component of this coachmarkDefault:
null.- Returns:
- A modified copy of the
thisobject
-
getPosition
default java.lang.String getPosition()
Returns the position of this coachmark.Default:
"after_center".
-
withPosition
ICoachmark<I> withPosition(java.lang.String position)
Returns a copy ofthisimmutable component with the specifiedposition.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
thisobject
- before_start
-
withPosition
default ICoachmark<I> withPosition(ICoachmark.Position position)
Returns a copy ofthisimmutable component with the specifiedposition.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
thisobject
- before_start
-
getId
default java.lang.String getId()
Description copied from interface:IComponentReturns 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 theIDshould be unique within a Desktop Scope, aka a browser page.- Specified by:
getIdin interfaceIComponent<I extends IAnyGroup>
-
of
static <I extends IAnyGroup> ICoachmark<I> of(java.lang.String targetId, java.lang.Iterable<? extends I> children)
Returns the instance with the given targetId and any group children.- Parameters:
targetId- The target IDchildren- The children belong to any group- See Also:
IAnyGroup
-
of
static <I extends IAnyGroup> ICoachmark<I> of(java.lang.String targetId, I... children)
Returns the instance with the given targetId and any group children.- Parameters:
targetId- The target IDchildren- The children belong to any group- See Also:
IAnyGroup
-
ofId
static <I extends IAnyGroup> ICoachmark<I> ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
-