Class WidgetModalMessageBox.Builder
- java.lang.Object
-
- com.hybris.cockpitng.common.messagebox.WidgetModalMessageBox.Builder
-
- Enclosing class:
- WidgetModalMessageBox
public static class WidgetModalMessageBox.Builder extends java.lang.ObjectBuilder forWidgetModalMessageBox
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WidgetModalMessageBoxbuild()Builds message boxWidgetModalMessageBox.BuilderwithCancel(java.lang.String cancelLabel)Defines cancel button label.WidgetModalMessageBox.BuilderwithCancel(java.lang.String cancelLabel, Executable onCancel)Defines cancel button label and on click callback.WidgetModalMessageBox.BuilderwithConfirm(java.lang.String confirmLabel, Executable onConfirm)Defines confirm button label and on click callback.WidgetModalMessageBox.BuilderwithContent(org.zkoss.zk.ui.Component content)Defines content displayed in the the message box.WidgetModalMessageBox.BuilderwithFooter(java.lang.String footerText)Defines footer text.WidgetModalMessageBox.BuilderwithFooter(java.lang.String footerText, java.lang.String sclass)Defines footer text with specific sclass.WidgetModalMessageBox.BuilderwithHeader(java.lang.String headerText)Defines header text in content.WidgetModalMessageBox.BuilderwithHeader(java.lang.String headerText, java.lang.String sclass)Defines header text with specific sclass.WidgetModalMessageBox.BuilderwithId(java.lang.String identifier)Defines message box id which should be unique for different kind of message.WidgetModalMessageBox.BuilderwithMessage(java.lang.String messageText)Defines message text.WidgetModalMessageBox.BuilderwithMessage(java.lang.String messageText, java.lang.String sclass)Defines message text with specific sclass.WidgetModalMessageBox.BuilderwithSclass(java.lang.String sclass)Defines sclass applied on entire msg box.WidgetModalMessageBox.BuilderwithTitle(java.lang.String title)Defines title of of widget.WidgetModalMessageBox.BuilderwithWarningTitle()Defines warning title as title of msg boxwithTitle(String).
-
-
-
Method Detail
-
build
public WidgetModalMessageBox build()
Builds message box- Returns:
- message box configured according to used settings.
-
withTitle
public WidgetModalMessageBox.Builder withTitle(java.lang.String title)
Defines title of of widget.- Parameters:
title- title to display- Returns:
- this
-
withCancel
public WidgetModalMessageBox.Builder withCancel(java.lang.String cancelLabel)
Defines cancel button label.- Parameters:
cancelLabel- label to be displayed on the button. If not defined then default label will be used.- Returns:
- this.
-
withCancel
public WidgetModalMessageBox.Builder withCancel(java.lang.String cancelLabel, Executable onCancel)
Defines cancel button label and on click callback.- Parameters:
cancelLabel- label to be displayed on the button. If not defined then default label will be used.onCancel- executable which will be executed on cancel click.- Returns:
- this
-
withConfirm
public WidgetModalMessageBox.Builder withConfirm(java.lang.String confirmLabel, Executable onConfirm)
Defines confirm button label and on click callback.- Parameters:
confirmLabel- label to be displayed on the button. If not defined then default label will be used.onConfirm- executable which will be executed on confirm click.- Returns:
- this
-
withContent
public WidgetModalMessageBox.Builder withContent(org.zkoss.zk.ui.Component content)
Defines content displayed in the the message box. If defined thenwithHeader(String),withFooter(String)(String)},withMessage(String)will be skipped.- Parameters:
content- content to be rendered on the msg box.- Returns:
- this.
-
withHeader
public WidgetModalMessageBox.Builder withHeader(java.lang.String headerText)
Defines header text in content.- Parameters:
headerText- header text.- Returns:
- this.
-
withHeader
public WidgetModalMessageBox.Builder withHeader(java.lang.String headerText, java.lang.String sclass)
Defines header text with specific sclass.- Parameters:
headerText- header text.sclass- sclass to be set on header.- Returns:
- this.
-
withMessage
public WidgetModalMessageBox.Builder withMessage(java.lang.String messageText)
Defines message text.- Parameters:
messageText- message text.- Returns:
- this.
-
withMessage
public WidgetModalMessageBox.Builder withMessage(java.lang.String messageText, java.lang.String sclass)
Defines message text with specific sclass.- Parameters:
messageText- message text.sclass- sclass to be set on message.- Returns:
- this.
-
withFooter
public WidgetModalMessageBox.Builder withFooter(java.lang.String footerText)
Defines footer text.- Parameters:
footerText- message text.- Returns:
- this.
-
withFooter
public WidgetModalMessageBox.Builder withFooter(java.lang.String footerText, java.lang.String sclass)
Defines footer text with specific sclass.- Parameters:
footerText- message text.sclass- sclass to be set on footer.- Returns:
- this.
-
withSclass
public WidgetModalMessageBox.Builder withSclass(java.lang.String sclass)
Defines sclass applied on entire msg box.- Parameters:
sclass- sclass to be applied.- Returns:
- this.
-
withWarningTitle
public WidgetModalMessageBox.Builder withWarningTitle()
Defines warning title as title of msg boxwithTitle(String).- Returns:
- this.
-
withId
public WidgetModalMessageBox.Builder withId(java.lang.String identifier)
Defines message box id which should be unique for different kind of message. There can be displayed only one type of message box with the same id in given id space.- Parameters:
identifier- identifier to be set.- Returns:
- this.
-
-