Class MessageDialog

    • Constructor Detail

      • MessageDialog

        public MessageDialog​(Dialog owner,
                             String message,
                             int messageType,
                             int options)
        Create dialog. Options and type are the same as in JOptionPane.
        Parameters:
        owner - owner
        message - message
        messageType - type
        options - options
        See Also:
        JOptionPane
      • MessageDialog

        public MessageDialog​(Dialog owner,
                             String message,
                             int messageType,
                             int options,
                             JComponent component)
        Create dialog. Options and type are the same as in JOptionPane.
        Parameters:
        owner - owner
        message - message
        messageType - type
        options - options
        component - additional component that will be displayed below the message text
        See Also:
        JOptionPane
      • MessageDialog

        public MessageDialog​(Frame owner,
                             String message,
                             int messageType,
                             int options,
                             JComponent component)
        Create dialog. Options and type are the same as in JOptionPane.
        Parameters:
        owner - owner
        message - message
        messageType - type
        options - options
        component - additional component that will be displayed below the message text
        See Also:
        JOptionPane
      • MessageDialog

        public MessageDialog​(Frame owner,
                             String message,
                             int messageType,
                             int options)
        Create dialog. Options and type are the same as in JOptionPane.
        Parameters:
        owner - owner
        message - message
        messageType - type
        options - options
        See Also:
        JOptionPane
    • Method Detail

      • toErrorString

        public static String toErrorString​(Throwable t)
        Create an error string based on the given throwable.
        Parameters:
        t - throwable.
        Returns:
        error string
      • showErrorMessage

        public static void showErrorMessage​(BeaTunes application,
                                            String detail)
        Shows an error message.
        Parameters:
        application - application
        detail - details about the error
      • setIcon

        public void setIcon​(Icon icon)
        Overrides the regular icon.
        Parameters:
        icon - icon
      • packAndPosition

        public void packAndPosition()
      • getOKButton

        public JButton getOKButton()
      • getCancelButton

        public JButton getCancelButton()
      • getNoButton

        public JButton getNoButton()
      • getTitle

        public static String getTitle​(int messageType)
        Get title.
        Parameters:
        messageType - type
        Returns:
        standard title
      • getMessageLabel

        public JEditorPane getMessageLabel()
      • setFont

        public void setFont​(Font font)
        Set the font. Makes sure that the stylesheet is regenerated.
        Overrides:
        setFont in class Container
        Parameters:
        font - font
      • setDefaultButton

        public void setDefaultButton​(int button)
      • onOK

        protected void onOK()
      • onCancel

        protected void onCancel()
      • onNo

        protected void onNo()
      • setComponent

        public void setComponent​(JComponent component)
        Sets the additional component to be shown below the main message.
        Parameters:
        component - component
      • showDialog

        public int showDialog()
        Shows the dialog.
        Returns:
        result
      • setVisible

        public void setVisible​(boolean visible)
        Overrides:
        setVisible in class Dialog
      • getResult

        public int getResult()
      • $$$getRootComponent$$$

        public JComponent $$$getRootComponent$$$()