|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.util.swing.HighlightManager.HighlightInfo
public 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. Also keeps a tag to its actual highlight in the component's highlighter for easy removal.
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 |
int |
hashCode()
Overrides hashCode() for consistency with override of equals(...) |
boolean |
matchesRegion(HighlightManager.HighlightInfo h)
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 |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
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 int hashCode()
hashCode
in class Object
public void remove()
public Object getHighlightTag()
public Highlighter.HighlightPainter getPainter()
public int getStartOffset()
public int getEndOffset()
public boolean matchesRegion(HighlightManager.HighlightInfo h)
h
- a HighlightInfo object given the start and end offsets
public void refresh(Highlighter.HighlightPainter p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |