Interface IConfirmpopup
-
- All Superinterfaces:
IAnyGroup<IConfirmpopup>,IComponent<IConfirmpopup>,IHtmlBasedComponent<IConfirmpopup>,IPopupBase<IConfirmpopup>,IXulElement<IConfirmpopup>
public interface IConfirmpopup extends IPopupBase<IConfirmpopup>, IAnyGroup<IConfirmpopup>
ImmutableConfirmpopupcomponent.An inline confirmation popup, anchored to a trigger component. It fires
onOKwhen the user confirms andonCancelwhen they cancel or dismiss; both ride the generic action API —withAction/withActionswithActionType.onOK/ActionType.onCancel.- Since:
- 11.0.0
- Author:
- peaker
- See Also:
Confirmpopup
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIConfirmpopup.BuilderBuilds instances of typeIConfirmpopup.static classIConfirmpopup.UpdaterBuilds an updater of typeIConfirmpopupforUiAgent.smartUpdate(Locator, SmartUpdater).-
Nested classes/interfaces inherited from interface org.zkoss.stateless.sul.IPopupBase
IPopupBase.OpenOptionBuilder, IPopupBase.Position
-
-
Field Summary
Fields Modifier and Type Field Description static IConfirmpopupDEFAULTConstant 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.StringgetDefaultFocus()Returns which button gets keyboard focus when the popup opens, or null when it was reset to the default.default java.lang.StringgetIconSclass()Returns the icon CSS class shown beside the message.default java.lang.StringgetMessage()Returns the confirmation message shown in the popup body.default java.lang.StringgetPlacement()Returns the placement of this popup relative to the trigger element, or null when it was reset to the default.default java.lang.StringgetSeverity()Returns the severity, which drives the icon/color styling of the popup, or null when it was reset to the default.default java.lang.StringgetTitle()Returns the optional title row shown above the message body.default java.lang.StringgetWidgetClass()Returns the client widget class.static IConfirmpopupof(java.lang.String message)Returns the instance with the given message.static IConfirmpopupofId(java.lang.String id)Returns the instance with the given id.IConfirmpopupwithDefaultFocus(java.lang.String defaultFocus)Returns a copy ofthisimmutable component with the specifieddefaultFocus.IConfirmpopupwithIconSclass(java.lang.String iconSclass)Returns a copy ofthisimmutable component with the specifiediconSclass.IConfirmpopupwithMessage(java.lang.String message)Returns a copy ofthisimmutable component with the specifiedmessage.IConfirmpopupwithPlacement(java.lang.String placement)Returns a copy ofthisimmutable component with the specifiedplacement.IConfirmpopupwithSeverity(java.lang.String severity)Returns a copy ofthisimmutable component with the specifiedseverity.IConfirmpopupwithTitle(java.lang.String title)Returns a copy ofthisimmutable component with the specifiedtitle.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, 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, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IPopupBase
getOpen, isVisible, withOpen
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final IConfirmpopup DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.wgt.Confirmpopup"- Specified by:
getWidgetClassin interfaceIComponent<IConfirmpopup>
-
getTitle
@Nullable default java.lang.String getTitle()
Returns the optional title row shown above the message body.Default:
null(no title row).
-
withTitle
IConfirmpopup withTitle(@Nullable java.lang.String title)
Returns a copy ofthisimmutable component with the specifiedtitle.Sets the optional title row shown above the message body.
- Parameters:
title- the title text;nullor an empty string renders no title row.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getMessage
@Nullable default java.lang.String getMessage()
Returns the confirmation message shown in the popup body.Default:
null(no message).
-
withMessage
IConfirmpopup withMessage(@Nullable java.lang.String message)
Returns a copy ofthisimmutable component with the specifiedmessage.Sets the confirmation message shown in the popup body.
- Parameters:
message- the message text;nullor an empty string renders no message.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getIconSclass
@Nullable default java.lang.String getIconSclass()
Returns the icon CSS class shown beside the message.Default:
"z-icon-exclamation-triangle". An empty string means the icon is explicitly suppressed (no icon node is rendered).
-
withIconSclass
IConfirmpopup withIconSclass(@Nullable java.lang.String iconSclass)
Returns a copy ofthisimmutable component with the specifiediconSclass.Sets the icon CSS class shown beside the message.
- Parameters:
iconSclass- the icon's CSS class; an empty string suppresses the icon entirely.Default:
"z-icon-exclamation-triangle".- Returns:
- A modified copy of the
thisobject
-
getSeverity
@Nullable default java.lang.String getSeverity()
Returns the severity, which drives the icon/color styling of the popup, or null when it was reset to the default.Default:
"warning".
-
withSeverity
IConfirmpopup withSeverity(@Nullable java.lang.String severity)
Returns a copy ofthisimmutable component with the specifiedseverity.Sets the severity, which drives the icon/color styling of the popup.
- Parameters:
severity-"info","success","warning","error"or"neutral".Default:
"warning".- Returns:
- A modified copy of the
thisobject
-
getPlacement
@Nullable default java.lang.String getPlacement()
Returns the placement of this popup relative to the trigger element, or null when it was reset to the default.Default:
"top". The arrow points from this popup toward the trigger.
-
withPlacement
IConfirmpopup withPlacement(@Nullable java.lang.String placement)
Returns a copy ofthisimmutable component with the specifiedplacement.Sets the placement of this popup relative to the trigger element.
- Parameters:
placement-"top","bottom","left"or"right".Default:
"top".- Returns:
- A modified copy of the
thisobject
-
getDefaultFocus
@Nullable default java.lang.String getDefaultFocus()
Returns which button gets keyboard focus when the popup opens, or null when it was reset to the default.Default:
"ok". For destructive operations (severity="error"), prefer"cancel"so an accidental Enter keypress does not commit the action.
-
withDefaultFocus
IConfirmpopup withDefaultFocus(@Nullable java.lang.String defaultFocus)
Returns a copy ofthisimmutable component with the specifieddefaultFocus.Sets which button gets keyboard focus when the popup opens.
- Parameters:
defaultFocus- either"ok"or"cancel".Default:
"ok".- Returns:
- A modified copy of the
thisobject
-
of
static IConfirmpopup of(java.lang.String message)
Returns the instance with the given message.- Parameters:
message- The confirmation message shown in the popup body
-
ofId
static IConfirmpopup ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
-