|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.LayeredHighlighter
javax.swing.text.DefaultHighlighter
javax.swing.plaf.basic.BasicTextUI.BasicHighlighter
org.fife.ui.rtextarea.RTextAreaHighlighter
public class RTextAreaHighlighter
The highlighter implementation used by RTextAreas. It knows to
always paint "mark all" highlights below selection highlights.
Most of this code is copied from javax.swing.text.DefaultHighlighter; unfortunately, we cannot re-use much of it since it is package private.
| Nested Class Summary | |
|---|---|
static interface |
RTextAreaHighlighter.HighlightInfo
Information about a highlight being painted by this highlighter. |
protected static class |
RTextAreaHighlighter.HighlightInfoImpl
A straightforward implementation of HighlightInfo. |
static interface |
RTextAreaHighlighter.LayeredHighlightInfo
Information about a layered highlight being painted by this highlighter. |
protected static class |
RTextAreaHighlighter.LayeredHighlightInfoImpl
A straightforward implementation of HighlightInfo for
painting layered highlights. |
| Nested classes/interfaces inherited from class javax.swing.text.DefaultHighlighter |
|---|
DefaultHighlighter.DefaultHighlightPainter |
| Nested classes/interfaces inherited from class javax.swing.text.LayeredHighlighter |
|---|
LayeredHighlighter.LayerPainter |
| Nested classes/interfaces inherited from interface javax.swing.text.Highlighter |
|---|
Highlighter.Highlight, Highlighter.HighlightPainter |
| Field Summary | |
|---|---|
protected RTextArea |
textArea
The text component we are the highlighter for. |
| Fields inherited from class javax.swing.text.DefaultHighlighter |
|---|
DefaultPainter |
| Constructor Summary | |
|---|---|
RTextAreaHighlighter()
Constructor. |
|
| Method Summary | |
|---|---|
void |
deinstall(JTextComponent c)
|
int |
getMarkAllHighlightCount()
Returns the number of "mark all" highlights currently shown in the editor. |
List<DocumentRange> |
getMarkAllHighlightRanges()
Returns a list of "mark all" highlights in the text area. |
void |
install(JTextComponent c)
|
void |
paintLayeredHighlights(Graphics g,
int lineStart,
int lineEnd,
Shape viewBounds,
JTextComponent editor,
View view)
When leaf Views (such as LabelView) are rendering they should call into this method. |
protected void |
paintList(Graphics g,
List<? extends RTextAreaHighlighter.HighlightInfo> highlights)
Paints a list of highlights. |
protected void |
paintListLayered(Graphics g,
int lineStart,
int lineEnd,
Shape viewBounds,
JTextComponent editor,
View view,
List<? extends RTextAreaHighlighter.HighlightInfo> highlights)
|
protected void |
repaintListHighlight(RTextAreaHighlighter.HighlightInfo info)
|
| Methods inherited from class javax.swing.text.DefaultHighlighter |
|---|
addHighlight, changeHighlight, getDrawsLayeredHighlights, getHighlights, paint, removeAllHighlights, removeHighlight, setDrawsLayeredHighlights |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RTextArea textArea
| Constructor Detail |
|---|
public RTextAreaHighlighter()
| Method Detail |
|---|
public void deinstall(JTextComponent c)
deinstall in interface Highlighterdeinstall in class DefaultHighlighterpublic int getMarkAllHighlightCount()
public List<DocumentRange> getMarkAllHighlightRanges()
public void install(JTextComponent c)
install in interface Highlighterinstall in class DefaultHighlighter
protected void paintList(Graphics g,
List<? extends RTextAreaHighlighter.HighlightInfo> highlights)
g - The graphics context.highlights - The list of highlights to paint.
public void paintLayeredHighlights(Graphics g,
int lineStart,
int lineEnd,
Shape viewBounds,
JTextComponent editor,
View view)
paintLayeredHighlights in class DefaultHighlighterg - Graphics used to drawlineStart - starting offset of viewlineEnd - ending offset of viewviewBounds - Bounds of Vieweditor - JTextComponentview - View instance being rendered
protected void paintListLayered(Graphics g,
int lineStart,
int lineEnd,
Shape viewBounds,
JTextComponent editor,
View view,
List<? extends RTextAreaHighlighter.HighlightInfo> highlights)
protected void repaintListHighlight(RTextAreaHighlighter.HighlightInfo info)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||