|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.view.JSwatView | +--com.bluemarsh.jswat.view.BasicView
Class BasicView provides the basic support for displaying textual data in a scrollable, searchable area.
Field Summary | |
protected java.lang.Object |
highlightTag
The highlighter's tag that represents the current text highlight. |
protected static Category |
logCategory
Debug reporting category. |
protected javax.swing.text.JTextComponent |
textComponent
Text area for displaying the source. |
protected javax.swing.text.Highlighter.HighlightPainter |
textHighlightPainter
Highlighter used to highlight the current stepping line. |
protected java.lang.String |
viewContent
Text from the text component. |
protected java.lang.String |
viewTitle
The title of our view, used for reporting. |
Constructor Summary | |
BasicView(java.lang.String title)
Creates a BasicView object. |
Method Summary | |
boolean |
findString(java.lang.String str,
boolean ignoreCase)
Look for the given string in the source view's text area. |
protected void |
foundString(java.lang.String str,
int start)
Show that we found the string we were looking for. |
protected abstract int |
getLineEndOffset(int line)
Get the offset of the end of the given line. |
protected abstract int |
getLineOfOffset(int offset)
Find the line containing the given offset. |
protected abstract int |
getLineStartOffset(int line)
Get the offset of the start of the given line. |
protected void |
removeHighlight()
Removes the highlight from the text area, on the AWT event dispatching thread. |
void |
scrollToLine(int line)
Scrolls the source view to the given line, if possible. |
void |
setTextComponent(javax.swing.text.JTextComponent text)
Sets the text component for this view. |
protected void |
showHighlight(int line)
Highlight the given line in the text area, on the AWT event dispatching thread. |
Methods inherited from class com.bluemarsh.jswat.view.JSwatView |
getUI, refresh |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Category logCategory
protected java.lang.String viewTitle
protected javax.swing.text.JTextComponent textComponent
protected java.lang.String viewContent
protected javax.swing.text.Highlighter.HighlightPainter textHighlightPainter
protected java.lang.Object highlightTag
Constructor Detail |
public BasicView(java.lang.String title)
title
- title of the view, for reporting purposes.Method Detail |
public boolean findString(java.lang.String str, boolean ignoreCase)
str
- string to look for.ignoreCase
- true to ignore case.protected void foundString(java.lang.String str, int start)
str
- string we were looking for.start
- start offset of matched string.protected abstract int getLineEndOffset(int line) throws javax.swing.text.BadLocationException
line
- zero-based line for which to find the end.javax.swing.text.BadLocationException
- Thrown if line is invalid.protected abstract int getLineOfOffset(int offset) throws javax.swing.text.BadLocationException
offset
- offset within document >= 0.javax.swing.text.BadLocationException
- Thrown if offset is invalid.protected abstract int getLineStartOffset(int line) throws javax.swing.text.BadLocationException
line
- zero-based line for which to find the start.javax.swing.text.BadLocationException
- Thrown if line is invalid.protected void removeHighlight()
public void scrollToLine(int line)
line
- line to scroll to (1-based).public void setTextComponent(javax.swing.text.JTextComponent text)
text
- text component used to display data.protected void showHighlight(int line)
line
- line in text area to be highlighted.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |