Class WidgetModalMessageBox.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • 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
      • 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.
      • 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.