01: package net.xoetrope.builder.editor.syntaxhighlight;
02:
03: import java.awt.Graphics;
04: import java.awt.event.MouseEvent;
05:
06: /**
07: * Highlight interface.
08: */
09: public interface Highlight {
10: /**
11: * Called after the highlight painter has been added.
12: * @param textArea The text area
13: * @param next The painter this one should delegate to
14: */
15: void init(JEditTextArea textArea, Highlight next);
16:
17: /**
18: * This should paint the highlight and delgate to the
19: * next highlight painter.
20: * @param gfx The graphics context
21: * @param line The line number
22: * @param y The y co-ordinate of the line
23: */
24: void paintHighlight(Graphics gfx, int line, int y);
25:
26: /**
27: * Returns the tool tip to display at the specified
28: * location. If this highlighter doesn't know what to
29: * display, it should delegate to the next highlight
30: * painter.
31: * @param evt The mouse event
32: */
33: String getToolTipText(MouseEvent evt);
34: }
|