|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rice.cs.util.swing.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. Also keeps a tag to its actual highlight in the component's highlighter for easy removal.
Field Summary | |
private Position |
_endPos
|
private Object |
_highlightTag
|
private Highlighter.HighlightPainter |
_p
|
private Position |
_startPos
|
Constructor Summary | |
HighlightManager.HighlightInfo(int from,
int to,
Highlighter.HighlightPainter p)
Constructor takes the bounds and the painter for a highlighter |
Method Summary | |
boolean |
equals(Object o)
Tests equivalency of one HighlightInfo object with this HighlightInfo object. |
int |
getEndOffset()
Accessor for the ending offset of this highlight |
Object |
getHighlightTag()
Accessor for the highlight tag |
Highlighter.HighlightPainter |
getPainter()
Accessor for the painter |
int |
getStartOffset()
Accessor for the starting offset of this highlight |
boolean |
matchesRegion(int from,
int to)
Tests to see if the given offsets correspond to the offsets specified within this highlight. |
void |
refresh(Highlighter.HighlightPainter p)
Refreshes this HighlightInfo object, obtaining a new Highlighter |
void |
remove()
|
void |
setHighlightTag(Object highlightTag)
Set the highlight tag for later access to the highlight as it is stored in the components highlighter. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Object _highlightTag
private Position _startPos
private Position _endPos
private Highlighter.HighlightPainter _p
Constructor Detail |
public HighlightManager.HighlightInfo(int from, int to, Highlighter.HighlightPainter p)
from
- the offset at which the new highlight will start.to
- the offset at which the new highlight will end.p
- the Highlighter.HighlightPainter for paintingMethod Detail |
public void setHighlightTag(Object highlightTag)
highlightTag
- the Object for keeping track of a stored highlightpublic boolean equals(Object o)
equals
in class Object
o
- the other HighlightInfo object to compare to this one.public void remove()
public Object getHighlightTag()
public Highlighter.HighlightPainter getPainter()
public int getStartOffset()
public int getEndOffset()
public boolean matchesRegion(int from, int to)
from
- the start offsetto
- the end offsetpublic void refresh(Highlighter.HighlightPainter p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |