Class MessageboxDlg

All Implemented Interfaces:
Serializable, Cloneable, Component, Scope, IdSpace, ComponentCtrl, Framable

public class MessageboxDlg extends Window
Used with Messagebox to implement a message box.
Author:
tomyeh
See Also:
  • Constructor Details

    • MessageboxDlg

      public MessageboxDlg()
  • Method Details

    • onOK

      public void onOK() throws Exception
      Throws:
      Exception
    • onCancel

      public void onCancel() throws Exception
      Throws:
      Exception
    • setButtons

      public void setButtons(Messagebox.Button[] buttons, String[] btnLabels)
      Sets what buttons are allowed. Each button created here carries the template's button.sclass plus z-messagebox-button-<kind>, the lower-cased Messagebox.Button name, e.g. z-messagebox-button-cancel (since 11.0.0).
    • setEventListener

      public void setEventListener(EventListener<Messagebox.ClickEvent> listener)
      Sets the event listener.
      Parameters:
      listener - the event listener. If null, no invocation at all.
      Since:
      3.0.4
    • setFocus

      public void setFocus(Messagebox.Button button)
      Sets the focus.
      Parameters:
      button - the button to gain the focus. If 0, the default one (i.e., the first one) is assumed.
      Since:
      3.0.0
    • endModal

      public void endModal(Messagebox.Button button) throws Exception
      Called only internally.
      Throws:
      Exception
    • getResult

      public Messagebox.Button getResult()
      Returns the result which is the button being pressed.
    • onClose

      public void onClose()
      Description copied from class: Window
      Process the onClose event sent when the close button is pressed.

      Default: detach itself.

      Overrides:
      onClose in class Window