|
GTGE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.golden.gamedev.funbox.ErrorNotificationDialog
public class ErrorNotificationDialog
ErrorNotificationDialog class is a dialog UI to show the player
the game exception and tell the player to send it to the game author.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected BaseGraphics |
bsGraphics
The graphics engine used by the game. |
protected String |
emailAddress
The email address which the player should report the exception to. |
protected Throwable |
error
The error exception of the game. |
protected JTextArea |
textArea
The text area UI where the game exception is printed out. |
protected String |
title
The game title. |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ErrorNotificationDialog(Throwable error,
BaseGraphics bsGraphics,
String title,
String emailAddress)
Builds up an error notification dialog for the player. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Action listener for exit and copy to clipboard button. |
void |
closeDialog()
Closes this error notification dialog. |
protected void |
initGUI()
The initialization of the error notification GUI. |
protected void |
printStackTrace()
Prints exception stack trace along with the system information to the text area. |
void |
run()
Thread implementation that actually create the dialog
UI used whenever the game is in applet environment. |
void |
windowActivated(WindowEvent e)
Do nothing. |
void |
windowClosed(WindowEvent e)
Do nothing. |
void |
windowClosing(WindowEvent e)
Closes this error notification dialog by calling closeDialog()
when the window close button is pressed. |
void |
windowDeactivated(WindowEvent e)
Do nothing. |
void |
windowDeiconified(WindowEvent e)
Do nothing. |
void |
windowIconified(WindowEvent e)
Do nothing. |
void |
windowOpened(WindowEvent e)
Do nothing. |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Throwable error
This is the exception that will be notified to the player.
protected BaseGraphics bsGraphics
protected String title
protected String emailAddress
protected JTextArea textArea
| Constructor Detail |
|---|
public ErrorNotificationDialog(Throwable error,
BaseGraphics bsGraphics,
String title,
String emailAddress)
error - the game exceptionbsGraphics - the graphics engine of the gametitle - the game titleemailAddress - the email address which the player should be
reporting the exception to| Method Detail |
|---|
public void run()
create the dialog
UI used whenever the game is in applet environment. In applet, the dialog UI is created under a daemon thread to avoid the dialog creation interrupting the applet process.
run in interface RunnableinitGUI()protected void printStackTrace()
Override this method to add more information about the exception.
textAreaprotected void initGUI()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void closeDialog()
This method will call System.exit(0); if the graphics engine
is not instance of Applet class.
public void windowClosing(WindowEvent e)
closeDialog()
when the window close button is pressed.
windowClosing in interface WindowListenercloseDialog()public void windowOpened(WindowEvent e)
windowOpened in interface WindowListenerpublic void windowClosed(WindowEvent e)
windowClosed in interface WindowListenerpublic void windowIconified(WindowEvent e)
windowIconified in interface WindowListenerpublic void windowDeiconified(WindowEvent e)
windowDeiconified in interface WindowListenerpublic void windowActivated(WindowEvent e)
windowActivated in interface WindowListenerpublic void windowDeactivated(WindowEvent e)
windowDeactivated in interface WindowListener
|
GTGE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||