javax.swing.text
Class DefaultHighlighter

java.lang.Object
  extended by javax.swing.text.LayeredHighlighter
      extended by javax.swing.text.DefaultHighlighter
All Implemented Interfaces:
Highlighter
Direct Known Subclasses:
BasicTextUI.BasicHighlighter

public class DefaultHighlighter
extends LayeredHighlighter

The default highlight for Swing text components. It highlights text by filling the background with a rectangle.


Nested Class Summary
static class 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
static LayeredHighlighter.LayerPainter DefaultPainter
           
 
Constructor Summary
DefaultHighlighter()
           
 
Method Summary
 Object addHighlight(int p0, int p1, Highlighter.HighlightPainter painter)
           
 void changeHighlight(Object tag, int n0, int n1)
           
 void deinstall(JTextComponent c)
           
 boolean getDrawsLayeredHighlights()
           
 Highlighter.Highlight[] getHighlights()
           
 void install(JTextComponent c)
           
 void paint(Graphics g)
           
 void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
           
 void removeAllHighlights()
           
 void removeHighlight(Object tag)
           
 void setDrawsLayeredHighlights(boolean newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DefaultPainter

public static final LayeredHighlighter.LayerPainter DefaultPainter
Constructor Detail

DefaultHighlighter

public DefaultHighlighter()
Method Detail

getDrawsLayeredHighlights

public boolean getDrawsLayeredHighlights()

setDrawsLayeredHighlights

public void setDrawsLayeredHighlights(boolean newValue)

install

public void install(JTextComponent c)

deinstall

public void deinstall(JTextComponent c)

addHighlight

public Object addHighlight(int p0,
                           int p1,
                           Highlighter.HighlightPainter painter)
                    throws BadLocationException
Throws:
BadLocationException

removeHighlight

public void removeHighlight(Object tag)

removeAllHighlights

public void removeAllHighlights()

getHighlights

public Highlighter.Highlight[] getHighlights()

changeHighlight

public void changeHighlight(Object tag,
                            int n0,
                            int n1)
                     throws BadLocationException
Throws:
BadLocationException

paintLayeredHighlights

public void paintLayeredHighlights(Graphics g,
                                   int p0,
                                   int p1,
                                   Shape viewBounds,
                                   JTextComponent editor,
                                   View view)
Specified by:
paintLayeredHighlights in class LayeredHighlighter

paint

public void paint(Graphics g)