|
||||||||||
| 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
edu.rice.cs.drjava.ui.DrJavaErrorWindow
public class DrJavaErrorWindow
Displays uncaught exceptions and logged conditions. This window is not automatically updated when new errors occur. In the case of errors, we want to minimize the effects on the GUI. If we want to see an updated dialog, we can click on the "DrJava Errors" button again.
| 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, Dialog.ModalExclusionType, Dialog.ModalityType |
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private JPanel |
_bottomPanel
compresses the buttonPanel into the east |
private JPanel |
_buttonPanel
contains the butons |
private Action |
_copyAction
Copy currently selected error to clip board. |
private JButton |
_copyButton
the button that copies the stack trace to the clipboard |
private Action |
_dismissAction
Dismiss all errors and close the window. |
private JButton |
_dismissButton
the button that clears all errors and closes the window |
private Throwable |
_error
the currently selected error |
private int |
_errorCount
the number of errors that had occurred |
private int |
_errorIndex
the currently selected error index |
private JEditorPane |
_errorInfo
information about the error |
private JLabel |
_indexLabel
label with index |
private Action |
_nextAction
Go to the next error. |
private JButton |
_nextButton
the button that moves to the next error |
private Action |
_okAction
|
private JButton |
_okButton
the button that closes this window |
private static boolean |
_parentChanged
true if parent changed since last singleton() call |
private static JFrame |
_parentFrame
the parent frame |
private Action |
_prevAction
|
private JButton |
_prevButton
the button that moves to the previous error |
private static DrJavaErrorWindow |
_singletonInstance
The singleton instance of this dialog. |
private JTextArea |
_stackTrace
contains the stack trace |
private JScrollPane |
_stackTraceScroll
scroll pane for _stackTrace |
protected WindowAdapter |
_windowListener
|
protected Runnable1<WindowEvent> |
CANCEL
Lambda that calls _cancel. |
private static String |
ERRORS_FOOTER_HTML
|
private static String |
HEADER_HTML
Canned message for the user. |
private static String |
NO_ERRORS_HTML
|
static String |
SF_ADD_BUG_URL
Sourceforge add bug URL |
static String |
SF_LINK_NAME
Sourceforge URL |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| 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 | |
|---|---|
private |
DrJavaErrorWindow()
Creates a window to graphically display the errors that have occurred in the code of DrJava. |
| Method Summary | |
|---|---|
static JFrame |
getFrame()
Gets the parent frame. |
static String |
getSystemAndDrJavaInfo()
Return a string with the system properties, the DrJava configuration file contents, and information about memory. |
private void |
init()
Initialize the dialog. |
private static String |
replaceString(String text,
String orig,
String repl)
Replaces all occurrences of orig in text with repl. |
static void |
setFrame(JFrame f)
Sets the parent frame. |
void |
setVisible(boolean vis)
Validates before changing visibility. |
static DrJavaErrorWindow |
singleton()
Returns the singleton instance. |
private void |
updateErrorInfo()
Update the buttons and text area after next or previous. |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String SF_ADD_BUG_URL
public static final String SF_LINK_NAME
private volatile JEditorPane _errorInfo
private final JTextArea _stackTrace
private final JLabel _indexLabel
private final JScrollPane _stackTraceScroll
private final JPanel _bottomPanel
private final JPanel _buttonPanel
private final JButton _copyButton
private final JButton _okButton
private final JButton _nextButton
private final JButton _prevButton
private final JButton _dismissButton
private volatile int _errorCount
private volatile Throwable _error
private volatile int _errorIndex
private static volatile JFrame _parentFrame
private static volatile boolean _parentChanged
private static volatile DrJavaErrorWindow _singletonInstance
protected WindowAdapter _windowListener
protected final Runnable1<WindowEvent> CANCEL
private final Action _okAction
private final Action _prevAction
private final Action _nextAction
private Action _dismissAction
private Action _copyAction
private static final String HEADER_HTML
private static final String ERRORS_FOOTER_HTML
private static final String NO_ERRORS_HTML
| Constructor Detail |
|---|
private DrJavaErrorWindow()
| Method Detail |
|---|
public static void setFrame(JFrame f)
public static JFrame getFrame()
public static DrJavaErrorWindow singleton()
public void setVisible(boolean vis)
setVisible in class Dialogvis - true if frame should be shown, false if it should be hidden.private void init()
private void updateErrorInfo()
public static String getSystemAndDrJavaInfo()
private static String replaceString(String text,
String orig,
String repl)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||