|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.shaker.dwu.DocWhatsUp
This static factory provides:
an implementation example...
Field Summary | |
(package private) static java.io.PrintWriter |
PRINTWRITER
stacktrace storage provider |
(package private) static Settings |
SETTINGS
A reference to the settings |
(package private) static java.io.CharArrayWriter |
STACKWR
stacktrace storage provider |
Constructor Summary | |
private |
DocWhatsUp()
Invisible constructor. |
Method Summary | |
static BugProfile |
createBugProfile(java.lang.Object message,
java.lang.String eClass)
Returns, based on a given message, a BugProfile that will be send to the "alt" address, if not specified otherwise. Returns null, if such a Profile has already been submitted. |
static BugProfile |
createBugProfile(java.lang.Object message,
java.lang.String eClass,
java.lang.String mailTo)
Returns, based on the given message, a BugProfile or null, if such a Profile has already been submitted. |
static javax.swing.JDialog |
getBBDialog(java.awt.Dialog parent)
Returns a standalone, modal and invisible dialog that contains a BlackBoard. |
static javax.swing.JDialog |
getBBDialog(java.awt.Frame parent)
Returns a standalone, modal and invisible dialog that contains a BlackBoard. |
static BlackBoard |
getBlackBoard(java.awt.Window parent)
Returns new BlackBoard panel. |
static javax.swing.ImageIcon |
getDWUIcon()
Returns the icon of DWU. |
static int |
getQueueCount()
Returns the number of currently stored Profiles in the queue. |
(package private) static BugProfile[] |
getQueuedBugs()
Returns all queued BugProfiles as an array. |
static void |
main(java.lang.String[] args)
THIS MAIN METHOD IS FOR TESTING PURPOSES ONLY! Example: |
private static void |
printErrorMessageAndQuit()
Prints a console info message and exits with code 1. |
static void |
setLocale(java.util.Locale locale)
Sets a new locale if you don`t want DWU to use the system locale. Please provide the appropriate language ressource file dwu.jar!/data/i10n_LOCALENAME.properties or DWU falls back to english. |
static void |
showErrDialog(BugProfile profile,
java.awt.Frame parent,
java.lang.String problem,
java.lang.String hint)
Returns a BugProfile driven error dialog. |
static void |
showMsgDialog(java.awt.Frame parent,
java.lang.String problem,
java.lang.String hint)
Returns a message dialog. |
static java.lang.String |
submitBugQueue()
Submits the whole BugProfile queue immediately without promting. This method needs a working mail configuration (please use a custom configuration, not the delivered one!) |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final java.io.CharArrayWriter STACKWR
static final java.io.PrintWriter PRINTWRITER
static final Settings SETTINGS
Constructor Detail |
private DocWhatsUp()
Method Detail |
public static final void showMsgDialog(java.awt.Frame parent, java.lang.String problem, java.lang.String hint)
parent
- the parental Frameproblem
- problem description; shouldn`t be emptyhint
- optional error hint/solution (can be empty)public static final void showErrDialog(BugProfile profile, java.awt.Frame parent, java.lang.String problem, java.lang.String hint)
profile
- the BugProfileparent
- the parental Frameproblem
- problem descriptionhint
- optional error solution (can be empty)public static final BlackBoard getBlackBoard(java.awt.Window parent)
parent
- the parental window object (a dialog, frame ...)public static final javax.swing.JDialog getBBDialog(java.awt.Frame parent)
parent
- parental framepublic static final javax.swing.JDialog getBBDialog(java.awt.Dialog parent)
parent
- parental dialogpublic static final java.lang.String submitBugQueue()
public static final BugProfile createBugProfile(java.lang.Object message, java.lang.String eClass, java.lang.String mailTo)
message
- a thrown exception or an object, that returns a
description/message on toString()eClass
- error class string (your error code)mailTo
- the address where this profile has to be send topublic static final BugProfile createBugProfile(java.lang.Object message, java.lang.String eClass)
message
- a thrown exception or an object, that returns a
description/message by toString()eClass
- error class string (your error code)static BugProfile[] getQueuedBugs()
public static int getQueueCount()
public static javax.swing.ImageIcon getDWUIcon()
public static void setLocale(java.util.Locale locale)
locale
- the corresponding localepublic static void main(java.lang.String[] args)
try { foo (); //malicious method, that throws an exception } catch (Exception e) { // Create a BugProfile based on the exception object and a error // category BugProfile bugProfile = DocWhatsUp.createBugProfile(e, "foo-error"); // The BugProfile gets visualised by the ErrorDoc // (Alternativly you can send it (and all queued Profiles too) // immediately and quietly with submitBugQueue ();!) DocWhatsUp.getErrDialog(bugProfile, parentalFrame, errorMessageForTheUser, hintMessageForTheUser);
args
- the argument arrayprivate static final void printErrorMessageAndQuit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |