org.jivesoftware.spark.component
Class MessageDialog

java.lang.Object
  extended by org.jivesoftware.spark.component.MessageDialog

public final class MessageDialog
extends java.lang.Object

MessageDialog class is used to easily display the most commonly used dialogs.


Method Summary
static java.lang.String getCustomStackTrace(java.lang.String heading, java.lang.Throwable aThrowable)
          Defines a custom format for the stack trace as String.
static java.lang.String getStackTrace(java.lang.Throwable aThrowable)
          Returns the String representation of a StackTrace.
static void showAlert(java.lang.String message, java.lang.String header, javax.swing.Icon icon)
          Display an alert dialog.
static javax.swing.JDialog showComponent(java.lang.String title, java.lang.String description, javax.swing.Icon icon, javax.swing.JComponent comp, java.awt.Component parent, int width, int height, boolean modal)
          Display a dialog with a specified component.
static void showErrorDialog(java.lang.Throwable throwable)
          Display a dialog with an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

showErrorDialog

public static void showErrorDialog(java.lang.Throwable throwable)
Display a dialog with an exception.

Parameters:
throwable - the throwable object to display.

showAlert

public static void showAlert(java.lang.String message,
                             java.lang.String header,
                             javax.swing.Icon icon)
Display an alert dialog.

Parameters:
message - the message to display.
header - the header/title of the dialog.

showComponent

public static javax.swing.JDialog showComponent(java.lang.String title,
                                                java.lang.String description,
                                                javax.swing.Icon icon,
                                                javax.swing.JComponent comp,
                                                java.awt.Component parent,
                                                int width,
                                                int height,
                                                boolean modal)
Display a dialog with a specified component.

Parameters:
title - the title of the dialog.
description - the description to display.
icon - the icon.
comp - the component to display.
parent - the parent of this dialog.
width - the width of this dialog.
height - the height of this dialog.
modal - true if it is modal.
Returns:
the JDialog created.

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable aThrowable)
Returns the String representation of a StackTrace.

Parameters:
aThrowable - the throwable object.
Returns:
the string.

getCustomStackTrace

public static java.lang.String getCustomStackTrace(java.lang.String heading,
                                                   java.lang.Throwable aThrowable)
Defines a custom format for the stack trace as String.

Parameters:
heading - the title of the stack trace.
aThrowable - the throwable object.
Returns:
the string.