|
||||||||||
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.text.JTextComponent
javax.swing.JEditorPane
edu.rice.cs.drjava.ui.ErrorPanel.ErrorListPane
public abstract class ErrorPanel.ErrorListPane
Pane to show compiler errors. Similar to a listbox (clicking selects an item) but items can each wrap, etc.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JEditorPane |
---|
JEditorPane.AccessibleJEditorPane, JEditorPane.AccessibleJEditorPaneHTML, JEditorPane.JEditorPaneAccessibleHypertextSupport |
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
---|
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding |
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 | |
---|---|
protected Position[] |
_errorListPositions
The start position of each error in the list. |
protected HashMap<Position,DJError> |
_errorTable
Table mapping Positions in the error list to CompilerErrors. |
protected Keymap |
_keymap
The custom keymap for the error list pane. |
protected MouseAdapter |
defaultMouseListener
|
Fields inherited from class javax.swing.JEditorPane |
---|
HONOR_DISPLAY_PROPERTIES, W3C_LENGTH_UNITS |
Fields inherited from class javax.swing.text.JTextComponent |
---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
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 | |
---|---|
ErrorPanel.ErrorListPane()
Constructs the CompilerErrorListPane. |
Method Summary | |
---|---|
protected DJError |
_errorAtPoint(Point p)
Returns DJError associated with the given visual coordinates. |
protected String |
_getErrorText()
Returns the string to identify an error. |
protected String |
_getErrorTitle()
Gets the message to title the block containing only errors. |
protected String |
_getNumErrorsMessage(String failureName,
String failureMeaning)
Gets the message indicating the number of errors and warnings. |
protected String |
_getWarningText()
Returns the string to identify a warning. |
protected String |
_getWarningTitle()
Gets the message to title the block containing only warnings. |
protected void |
_insertErrors(SwingDocument doc)
Inserts all of the errors into the given document. |
protected void |
_insertErrorText(DJError error,
SwingDocument doc)
Prints a message for the given error |
protected boolean |
_isEmptySelection()
Returns true if the text selection interval is empty. |
protected void |
_removeListHighlight()
When the selection of the current error changes, remove the highlight in the error pane. |
protected abstract void |
_updateNoErrors(boolean done)
|
protected void |
_updateScrollButtons()
|
protected abstract void |
_updateWithErrors()
|
protected void |
_updateWithErrors(String failureName,
String failureMeaning,
SwingDocument doc)
Used to show that the last compile was unsuccessful. |
void |
addActionForKeyStroke(KeyStroke stroke,
Action action)
Assigns the given keystroke to the given action in this pane. |
int |
getSelectedIndex()
Get the index of the current error in the error array. |
SwingDocument |
getSwingDocument()
Gets the SwingDocument associated with this ErrorListPane. |
boolean |
hasNextError()
Returns true if there is an error after the selected error. |
boolean |
hasPrevError()
Returns true if there is an error before the selected error. |
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
We lost ownership of what we put in the clipboard. |
void |
nextError()
Switches to the next error. |
void |
prevError()
Switches to the previous error. |
void |
selectItem(DJError error)
Selects the given error inside the error list pane. |
void |
selectNothing()
Don't select any errors in the error pane. |
boolean |
shouldShowHighlightsInSource()
Returns true if the errors should be highlighted in the source |
protected void |
updateListPane(boolean done)
Update the pane which holds the list of errors for the viewer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Keymap _keymap
protected Position[] _errorListPositions
protected final HashMap<Position,DJError> _errorTable
protected MouseAdapter defaultMouseListener
Constructor Detail |
---|
public ErrorPanel.ErrorListPane()
Method Detail |
---|
public SwingDocument getSwingDocument()
public void addActionForKeyStroke(KeyStroke stroke, Action action)
stroke
- keystroke that triggers the actionaction
- Action to performpublic void lostOwnership(Clipboard clipboard, Transferable contents)
lostOwnership
in interface ClipboardOwner
public boolean shouldShowHighlightsInSource()
public int getSelectedIndex()
protected DJError _errorAtPoint(Point p)
protected boolean _isEmptySelection()
protected void updateListPane(boolean done)
protected abstract void _updateNoErrors(boolean done) throws BadLocationException
BadLocationException
protected abstract void _updateWithErrors() throws BadLocationException
BadLocationException
protected String _getNumErrorsMessage(String failureName, String failureMeaning)
protected String _getErrorTitle()
protected String _getWarningTitle()
protected void _updateWithErrors(String failureName, String failureMeaning, SwingDocument doc) throws BadLocationException
BadLocationException
public boolean hasNextError()
public boolean hasPrevError()
public void nextError()
public void prevError()
protected void _insertErrors(SwingDocument doc) throws BadLocationException
doc
- the document into which to insert the errors
BadLocationException
protected void _insertErrorText(DJError error, SwingDocument doc) throws BadLocationException
error
- the error to printdoc
- the document in the error pane
BadLocationException
protected String _getWarningText()
protected String _getErrorText()
protected void _removeListHighlight()
public void selectNothing()
public void selectItem(DJError error)
protected void _updateScrollButtons()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |