venice
Class Util

java.lang.Object
  |
  +--venice.Util

public class Util
extends java.lang.Object

Utility class containing error handling dialog functions and functions for showing about and license dialogs.

Author:
Hannu Laurila

Field Summary
private static java.lang.String stAboutHTML
           
 
Constructor Summary
private Util()
          private constructor prevents instantiation
 
Method Summary
static void handleError(java.awt.Component myParent, java.lang.String myShortErr, java.lang.String myLongErr)
          shows an error message dialog with first a short error description in a text label and then a long error description in a text area.
static void handleException(java.awt.Component myParent, java.lang.Exception myEx)
          Creates an error message dialog to inform user about exception.
static void handleException(java.lang.Exception inEx)
          Creates an error message dialog to inform user about exception.
static void invokeCommandLater(Command inCmd)
          Causes command to be executed later using SWING Event thread.
static void main(java.lang.String[] args)
          test method for testing about and license dialog.
static void showAboutDialog(javax.swing.JFrame inParent)
           
static void showLicenseDialog(javax.swing.JFrame inParent)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

stAboutHTML

private static final java.lang.String stAboutHTML
Constructor Detail

Util

private Util()
private constructor prevents instantiation
Method Detail

handleError

public static void handleError(java.awt.Component myParent,
                               java.lang.String myShortErr,
                               java.lang.String myLongErr)
shows an error message dialog with first a short error description in a text label and then a long error description in a text area.
Parameters:
myParent - parent component for which to make the dialog modal. May be null.
myShortErr - short error description
myLongErr - longer error description (a dump). May be null.

handleException

public static void handleException(java.awt.Component myParent,
                                   java.lang.Exception myEx)
Creates an error message dialog to inform user about exception.
Parameters:
myParent - parent component for which to make the dialog modal.
myEx - exception to inform user about.

handleException

public static void handleException(java.lang.Exception inEx)
Creates an error message dialog to inform user about exception.

showAboutDialog

public static void showAboutDialog(javax.swing.JFrame inParent)

showLicenseDialog

public static void showLicenseDialog(javax.swing.JFrame inParent)

invokeCommandLater

public static void invokeCommandLater(Command inCmd)
Causes command to be executed later using SWING Event thread. Swing and Jazz are not thread safe so everything should be done in event dispatch thread to prevent concurrent access.

main

public static void main(java.lang.String[] args)
test method for testing about and license dialog.