private class SourceView.TextPaneMouseAdapter
extends java.awt.event.MouseAdapter
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
filename
The filename of the file whose content is displayed in the JTextPane.
|
(package private) IOUtil.LineInformation[] |
li
The precalculated start indices of the lines.
|
(package private) javax.swing.text.Highlighter.HighlightPainter |
painter
The Painter used for painting the highlights (except for the most recent one).
|
(package private) javax.swing.JTextPane |
textPane
The JTextPane containing the source code.
|
| Constructor and Description |
|---|
TextPaneMouseAdapter(javax.swing.JTextPane textPane,
IOUtil.LineInformation[] li,
javax.swing.text.Highlighter.HighlightPainter painter,
java.lang.String filename) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
isHighlighted(int pos)
Checks if the given position is within a highlight.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
final IOUtil.LineInformation[] li
final javax.swing.text.Highlighter.HighlightPainter painter
final javax.swing.JTextPane textPane
final java.lang.String filename
public TextPaneMouseAdapter(javax.swing.JTextPane textPane,
IOUtil.LineInformation[] li,
javax.swing.text.Highlighter.HighlightPainter painter,
java.lang.String filename)
private boolean isHighlighted(int pos)
pos - the position to checkpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class java.awt.event.MouseAdapter