Class Dialog

  • All Implemented Interfaces:
    org.jboss.elemento.IsElement
    Direct Known Subclasses:
    BlockingDialog

    public class Dialog
    extends Object
    implements org.jboss.elemento.IsElement
    A modal dialog with optional secondary and primary buttons. Only one dialog can be open at a time. The buttons can be placed on the left or the right side. Each button has a callback. The callback is either a Callback which always closes the dialog or a Dialog.ResultCallback with a boolean return value. A value of true indicates that the dialog should be closed whereas false keeps the dialog open. You can add as many buttons as you like, but only one of them should be the primary button.

    There are convenience methods to add primary and secondary buttons which come with pre-defined placements. If you want to define the placement by yourself use negative numbers to place the buttons on the left side and positive numbers for the right side. On each side the buttons are ordered according to the placement.

    • Method Detail

      • isOpen

        public static boolean isOpen()
      • element

        public elemental2.dom.HTMLElement element()
        Specified by:
        element in interface org.jboss.elemento.IsElement
      • show

        public void show()
      • setTitle

        public void setTitle​(String title)
      • getButton

        public elemental2.dom.HTMLButtonElement getButton​(int position)