|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.rice.cs.drjava.ui.TabbedPanel
edu.rice.cs.drjava.ui.ErrorPanel
edu.rice.cs.drjava.ui.JUnitPanel
public class JUnitPanel
The panel that displays all the testing errors.
| Nested Class Summary | |
|---|---|
class |
JUnitPanel.JUnitErrorListPane
A pane to show JUnit errors. |
(package private) static class |
JUnitPanel.JUnitProgressBar
A progress bar showing the status of JUnit tests. |
| Nested classes/interfaces inherited from class edu.rice.cs.drjava.ui.ErrorPanel |
|---|
ErrorPanel.ErrorDocument, ErrorPanel.ErrorListPane, ErrorPanel.PreviewErrorFrame |
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| 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 JUnitError |
_error
The currently selected error. |
private JLabel |
_errorLabel
|
protected JUnitPanel.JUnitErrorListPane |
_errorListPane
|
private JLabel |
_fileLabel
|
private MainFrame |
_mainFrame
|
private JUnitPanel.JUnitProgressBar |
_progressBar
|
private Action |
_showStackTraceAction
|
private JButton |
_showStackTraceButton
|
private Window |
_stackFrame
|
private JTextArea |
_stackTextArea
|
private int |
_testCount
|
private JLabel |
_testLabel
|
private boolean |
_testsSuccessful
|
private static String |
JUNIT_FINISHED_MSG
|
private static String |
NO_TESTS_MSG
|
private static SimpleAttributeSet |
OUT_OF_SYNC_ATTRIBUTES
|
private static String |
START_JUNIT_MSG
|
private static SimpleAttributeSet |
TEST_FAIL_ATTRIBUTES
|
private static String |
TEST_OUT_OF_SYNC
|
private static SimpleAttributeSet |
TEST_PASS_ATTRIBUTES
|
| Fields inherited from class edu.rice.cs.drjava.ui.ErrorPanel |
|---|
_listHighlightPainter, _model, _numErrors, _popupMenu, _popupMenuListener, _showHighlightsCheckBox, BOLD_ATTRIBUTES, customPanel, NORMAL_ATTRIBUTES |
| Fields inherited from class edu.rice.cs.drjava.ui.TabbedPanel |
|---|
_closeButton, _closePanel, _displayed, _frame, _mainPanel, dropTarget |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JUnitPanel(SingleDisplayModel model,
MainFrame frame)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
_close()
Closes this panel and resets the corresponding model. |
private void |
_displayStackTrace(JUnitError e)
|
private static SimpleAttributeSet |
_getOutOfSyncAttributes()
|
private static SimpleAttributeSet |
_getTestFailAttributes()
|
private static SimpleAttributeSet |
_getTestPassAttributes()
|
protected void |
_updateStyles(AttributeSet newSet)
Updates all document styles with the attributes contained in newSet. |
JUnitPanel.JUnitErrorListPane |
getErrorListPane()
Returns the JUnitErrorListPane that this panel manages. |
protected JUnitErrorModel |
getErrorModel()
This function returns the correct error model |
void |
progressReset(int numTests)
Resets the progress bar to start counting the given number of tests. |
void |
progressStep(boolean successful)
Steps the progress bar forward by one test. |
void |
reset()
Reset the errors to the current error information. |
void |
setJUnitInProgress()
called when work begins |
void |
testStarted(String className,
String testName)
|
| Methods inherited from class edu.rice.cs.drjava.ui.ErrorPanel |
|---|
_getBoldAttributes, _getNormalAttributes, addPopupMenu, getModel, getPopupMenu, setErrorListPane, setListFont |
| Methods inherited from class edu.rice.cs.drjava.ui.TabbedPanel |
|---|
addCloseListener, dragEnter, dragExit, dragOver, drop, dropActionChanged, getMainPanel, getName, isDisplayed, requestFocusInWindow, setDisplayed, setVisible |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final String START_JUNIT_MSG
private static final String JUNIT_FINISHED_MSG
private static final String NO_TESTS_MSG
private static final SimpleAttributeSet OUT_OF_SYNC_ATTRIBUTES
private static final SimpleAttributeSet TEST_PASS_ATTRIBUTES
private static final SimpleAttributeSet TEST_FAIL_ATTRIBUTES
private static final String TEST_OUT_OF_SYNC
protected JUnitPanel.JUnitErrorListPane _errorListPane
private final MainFrame _mainFrame
private int _testCount
private boolean _testsSuccessful
private volatile JUnitPanel.JUnitProgressBar _progressBar
private Action _showStackTraceAction
private volatile JButton _showStackTraceButton
private volatile JUnitError _error
private volatile Window _stackFrame
private volatile JTextArea _stackTextArea
private final JLabel _errorLabel
private final JLabel _testLabel
private final JLabel _fileLabel
| Constructor Detail |
|---|
public JUnitPanel(SingleDisplayModel model,
MainFrame frame)
model - SingleDisplayModel in which we are runningframe - MainFrame in which we are displayed| Method Detail |
|---|
private static final SimpleAttributeSet _getOutOfSyncAttributes()
private static final SimpleAttributeSet _getTestPassAttributes()
private static final SimpleAttributeSet _getTestFailAttributes()
public JUnitPanel.JUnitErrorListPane getErrorListPane()
getErrorListPane in class ErrorPanelprotected JUnitErrorModel getErrorModel()
ErrorPanel
getErrorModel in class ErrorPanelprotected void _updateStyles(AttributeSet newSet)
_updateStyles in class ErrorPanelnewSet - Style containing new attributes to use.public void setJUnitInProgress()
protected void _close()
_close in class TabbedPanelpublic void reset()
public void progressReset(int numTests)
public void progressStep(boolean successful)
successful - Whether the last test was successful or not.
public void testStarted(String className,
String testName)
private void _displayStackTrace(JUnitError e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||