abstract class DocUnderliner
extends java.lang.Object
implements javax.swing.event.DocumentListener
Constructor and Description |
---|
DocUnderliner(javax.swing.text.Highlighter docHighlighter) |
Modifier and Type | Method and Description |
---|---|
void |
changedUpdate(javax.swing.event.DocumentEvent e) |
void |
format(Word word)
Formats the word with the appropriate underlining (or lack thereof).
|
(package private) abstract int |
getCaretPosition()
Provides the index of the character the cursor is in front of.
|
javax.swing.event.CaretListener |
getEndChecker()
Provides a listener that prompts the last word to be checked when the
cursor moves away from it.
|
(package private) abstract boolean |
getFormatting(java.lang.String word)
Queries to see if a word should be underlined.
|
void |
insertUpdate(javax.swing.event.DocumentEvent event) |
static void |
main(java.lang.String[] args) |
(package private) abstract void |
promptRepaint()
Prompts the text field to repaint.
|
void |
removeUpdate(javax.swing.event.DocumentEvent event) |
void |
reset(java.lang.String message)
Clears underlining and re-evaluates message's contents
|
void |
setEnabled(boolean enable,
java.lang.String message) |
abstract boolean getFormatting(java.lang.String word)
word
- word to be checkedabstract int getCaretPosition()
abstract void promptRepaint()
public static void main(java.lang.String[] args)
public void insertUpdate(javax.swing.event.DocumentEvent event)
insertUpdate
in interface javax.swing.event.DocumentListener
public void removeUpdate(javax.swing.event.DocumentEvent event)
removeUpdate
in interface javax.swing.event.DocumentListener
public void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate
in interface javax.swing.event.DocumentListener
public javax.swing.event.CaretListener getEndChecker()
public void format(Word word)
word
- word to be formattedpublic void setEnabled(boolean enable, java.lang.String message)
public void reset(java.lang.String message)
message
- textual contents of document
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.