|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.util.swing.HighlightManager
public class HighlightManager
This class has synchronized public methods because it is accessed outside of the event thread.
| Nested Class Summary | |
|---|---|
class |
HighlightManager.HighlightInfo
The public inner class defining a "smart" highlight, which can return the value of its start and end offsets for comparison with other highlights. |
| Constructor Summary | |
|---|---|
HighlightManager(JTextComponent jtc)
Constructor |
|
| Method Summary | |
|---|---|
HighlightManager.HighlightInfo |
addHighlight(int startOffset,
int endOffset,
Highlighter.HighlightPainter p)
Adds a highlight using the supplied painter to the vector element(Stack) that exactly corresponds to the specified bounds. |
void |
removeHighlight(HighlightManager.HighlightInfo newLite)
Removes a given highlight (HighlightInfo) from the highlighter |
void |
removeHighlight(int startOffset,
int endOffset,
Highlighter.HighlightPainter p)
Removes a highlight with the specified start/end offsets and the given painter. |
int |
size()
Size of highlight stack; used only for unit testing |
String |
toString()
Overrides to toString() to support unit testing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HighlightManager(JTextComponent jtc)
jtc - the component whose document will have positions created therein.| Method Detail |
|---|
public String toString()
toString in class Objectpublic int size()
public HighlightManager.HighlightInfo addHighlight(int startOffset,
int endOffset,
Highlighter.HighlightPainter p)
startOffset - the offset at which the highlight is to begin.endOffset - the offset at which the highlight is to end.p - the Highlighter.HighlightPainter for painting
public void removeHighlight(int startOffset,
int endOffset,
Highlighter.HighlightPainter p)
startOffset - the offset at which the desired highlight should start.endOffset - the offset at which the desired highlight shoud end.p - the Highlighter.HighlightPainter for paintingpublic void removeHighlight(HighlightManager.HighlightInfo newLite)
newLite - the HighlightInfo object corresponding to the highlight needed to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||