| java.lang.Object edu.rice.cs.util.swing.HighlightManager
HighlightManager | public class HighlightManager (Code) | | This class has synchronized public methods because it is accessed outside of the event thread.
|
Inner Class :public class HighlightInfo | |
HighlightManager | public HighlightManager(JTextComponent jtc)(Code) | | Constructor
Parameters: jtc - the component whose document will have positions created therein. |
addHighlight | public synchronized HighlightInfo addHighlight(int startOffset, int endOffset, Highlighter.HighlightPainter p)(Code) | | Adds a highlight using the supplied painter to the vector element(Stack) that exactly corresponds to the
specified bounds. The most recently added highlights over a given range appear on top of the older highlights.
All highlights in a given range(Stack) must be unique, that is, each must use a different painter--redundant
highlights are shifted to the top of the stack, but not added twice.
Parameters: startOffset - the offset at which the highlight is to begin. Parameters: endOffset - the offset at which the highlight is to end. Parameters: p - the Highlighter.HighlightPainter for painting HighlightInfo the HighlightInfo object, for keeping a tag of a given highlight |
removeHighlight | public synchronized void removeHighlight(int startOffset, int endOffset, Highlighter.HighlightPainter p)(Code) | | Convenience method for removing a highlight with the specified start/end offsets and the given
painter.
Parameters: startOffset - the offset at which the desired highlight should start. Parameters: endOffset - the offset at which the desired highlight shoud end. Parameters: p - the Highlighter.HighlightPainter for painting |
removeHighlight | public void removeHighlight(HighlightInfo newLite)(Code) | | Removes a given highlight (HighlightInfo) from the highlighter
Parameters: newLite - the HighlightInfo object corresponding to the highlight needed to be removed |
size | public int size()(Code) | | Size of highlight stack; used only for unit testing
|
toString | public String toString()(Code) | | Overrides to toString() to support unit testing
|
|
|