1 7 package javax.swing.text; 8 9 import java.awt.Color ; 10 import java.awt.Graphics ; 11 import java.awt.Shape ; 12 13 20 public interface Highlighter { 21 22 30 public void install(JTextComponent c); 31 32 39 public void deinstall(JTextComponent c); 40 41 46 public void paint(Graphics g); 47 48 58 public Object addHighlight(int p0, int p1, HighlightPainter p) throws BadLocationException ; 59 60 65 public void removeHighlight(Object tag); 66 67 70 public void removeAllHighlights(); 71 72 83 public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException ; 84 85 90 public Highlight[] getHighlights(); 91 92 95 public interface HighlightPainter { 96 97 106 public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c); 107 108 } 109 110 public interface Highlight { 111 112 117 public int getStartOffset(); 118 119 124 public int getEndOffset(); 125 126 131 public HighlightPainter getPainter(); 132 133 } 134 135 }; 136 137 | Popular Tags |