Package editor
Class EditorHostTextPane.GosuHighlighter
- java.lang.Object
-
- javax.swing.text.LayeredHighlighter
-
- editor.EditorHostTextPane.GosuHighlighter
-
- All Implemented Interfaces:
javax.swing.text.Highlighter
- Enclosing class:
- EditorHostTextPane
private class EditorHostTextPane.GosuHighlighter extends javax.swing.text.LayeredHighlighterOverride the default highlighter to render line breakpoints. Adding normal highlight painters for these is otherwise rather clumsy e.g., have to move them when text changes, recreate them after closing and reopening views, etc.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.text.LayeredHighlighter_highlighter
-
Constructor Summary
Constructors Modifier Constructor Description privateGosuHighlighter(javax.swing.text.LayeredHighlighter h)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectaddHighlight(int p0, int p1, javax.swing.text.Highlighter.HighlightPainter p)voidchangeHighlight(java.lang.Object tag, int p0, int p1)voiddeinstall(javax.swing.text.JTextComponent c)javax.swing.text.Highlighter.Highlight[]getHighlights()voidinstall(javax.swing.text.JTextComponent c)voidpaint(java.awt.Graphics g)voidpaintLayeredHighlights(java.awt.Graphics g, int p0, int p1, java.awt.Shape viewBounds, javax.swing.text.JTextComponent editor, javax.swing.text.View view)voidremoveAllHighlights()voidremoveHighlight(java.lang.Object tag)
-
-
-
Method Detail
-
install
public void install(javax.swing.text.JTextComponent c)
-
deinstall
public void deinstall(javax.swing.text.JTextComponent c)
-
paint
public void paint(java.awt.Graphics g)
-
paintLayeredHighlights
public void paintLayeredHighlights(java.awt.Graphics g, int p0, int p1, java.awt.Shape viewBounds, javax.swing.text.JTextComponent editor, javax.swing.text.View view)- Specified by:
paintLayeredHighlightsin classjavax.swing.text.LayeredHighlighter
-
addHighlight
public java.lang.Object addHighlight(int p0, int p1, javax.swing.text.Highlighter.HighlightPainter p) throws javax.swing.text.BadLocationException- Throws:
javax.swing.text.BadLocationException
-
removeHighlight
public void removeHighlight(java.lang.Object tag)
-
removeAllHighlights
public void removeAllHighlights()
-
changeHighlight
public void changeHighlight(java.lang.Object tag, int p0, int p1) throws javax.swing.text.BadLocationException- Throws:
javax.swing.text.BadLocationException
-
getHighlights
public javax.swing.text.Highlighter.Highlight[] getHighlights()
-
-