public abstract class SyntaxHighlighter
extends javax.swing.text.DocumentFilter
Modifier and Type | Class and Description |
---|---|
static interface |
SyntaxHighlighter.SyntaxElement |
static class |
SyntaxHighlighter.SyntaxElementList |
Modifier and Type | Field and Description |
---|---|
static javax.swing.text.AttributeSet |
blueAttributeSet |
static javax.swing.text.AttributeSet |
darkGreenAttributeSet |
static javax.swing.text.AttributeSet |
grayAttributeSet |
static javax.swing.text.AttributeSet |
greenAttributeSet |
static java.lang.String |
GROUP |
static javax.swing.text.AttributeSet |
orangeAttributeSet |
static javax.swing.text.AttributeSet |
redAttributeSet |
static javax.swing.text.AttributeSet |
whiteAttributeSet |
Constructor and Description |
---|
SyntaxHighlighter(javax.swing.text.JTextComponent kawapad) |
Modifier and Type | Method and Description |
---|---|
static javax.swing.text.AttributeSet |
createAttributeSet(java.awt.Color foreground) |
static javax.swing.text.AttributeSet |
createAttributeSet(java.awt.Color foreground,
java.awt.Color background) |
static SyntaxHighlighter.SyntaxElement |
createSyntaxElement(java.lang.Object name,
java.util.regex.Pattern pattern,
javax.swing.text.AttributeSet attributeSet) |
protected abstract java.util.Collection<SyntaxHighlighter.SyntaxElement> |
createSyntaxElementList() |
static java.awt.Color |
getBackgroundColor(javax.swing.text.AttributeSet attr) |
static java.awt.Color |
getColorFromAttributeSet(javax.swing.text.AttributeSet attr) |
abstract javax.swing.text.AttributeSet |
getDefaultAttributeSet() |
static java.awt.Color |
getForegroundColor(javax.swing.text.AttributeSet attr) |
SyntaxHighlighter.SyntaxElementList |
getSyntaxElementList() |
void |
insertString(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
java.lang.String text,
javax.swing.text.AttributeSet attributeSet) |
void |
remove(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
int length) |
void |
replace(javax.swing.text.DocumentFilter.FilterBypass fb,
int offset,
int length,
java.lang.String text,
javax.swing.text.AttributeSet attributeSet) |
void |
resetSyntaxElementList() |
public static final javax.swing.text.AttributeSet darkGreenAttributeSet
public static final javax.swing.text.AttributeSet greenAttributeSet
public static final javax.swing.text.AttributeSet blueAttributeSet
public static final javax.swing.text.AttributeSet redAttributeSet
public static final javax.swing.text.AttributeSet grayAttributeSet
public static final javax.swing.text.AttributeSet orangeAttributeSet
public static final javax.swing.text.AttributeSet whiteAttributeSet
public static final java.lang.String GROUP
public SyntaxHighlighter(javax.swing.text.JTextComponent kawapad)
public static javax.swing.text.AttributeSet createAttributeSet(java.awt.Color foreground)
public static javax.swing.text.AttributeSet createAttributeSet(java.awt.Color foreground, java.awt.Color background)
public static java.awt.Color getColorFromAttributeSet(javax.swing.text.AttributeSet attr)
public static java.awt.Color getForegroundColor(javax.swing.text.AttributeSet attr)
public static java.awt.Color getBackgroundColor(javax.swing.text.AttributeSet attr)
public static SyntaxHighlighter.SyntaxElement createSyntaxElement(java.lang.Object name, java.util.regex.Pattern pattern, javax.swing.text.AttributeSet attributeSet)
protected abstract java.util.Collection<SyntaxHighlighter.SyntaxElement> createSyntaxElementList()
public void resetSyntaxElementList()
public SyntaxHighlighter.SyntaxElementList getSyntaxElementList()
public abstract javax.swing.text.AttributeSet getDefaultAttributeSet()
public void insertString(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, java.lang.String text, javax.swing.text.AttributeSet attributeSet) throws javax.swing.text.BadLocationException
insertString
in class javax.swing.text.DocumentFilter
javax.swing.text.BadLocationException
public void remove(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length) throws javax.swing.text.BadLocationException
remove
in class javax.swing.text.DocumentFilter
javax.swing.text.BadLocationException
public void replace(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length, java.lang.String text, javax.swing.text.AttributeSet attributeSet) throws javax.swing.text.BadLocationException
replace
in class javax.swing.text.DocumentFilter
javax.swing.text.BadLocationException