java.beans.PropertyChangeListener
, java.util.EventListener
, javax.swing.event.CaretListener
, SyntaxComponent
public class TokenMarker extends java.lang.Object implements SyntaxComponent, javax.swing.event.CaretListener, java.beans.PropertyChangeListener
SyntaxComponent.Status
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DEFAULT_TOKENTYPES |
|
static java.lang.String |
PROPERTY_COLOR |
|
static java.lang.String |
PROPERTY_TOKENTYPES |
Constructor | Description |
---|---|
TokenMarker() |
Constructs a new Token highlighter
|
Modifier and Type | Method | Description |
---|---|---|
void |
caretUpdate(javax.swing.event.CaretEvent e) |
|
void |
config(Configuration config) |
Configure the component using the given properties.
|
void |
deinstall(javax.swing.JEditorPane editor) |
Called when the component is to be removed from the editor
|
void |
install(javax.swing.JEditorPane editor) |
Called to install the component on an editor
|
void |
markTokenAt(int pos) |
|
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
|
void |
removeMarkers() |
removes all markers from the pane.
|
public static final java.lang.String DEFAULT_TOKENTYPES
public static final java.lang.String PROPERTY_COLOR
public static final java.lang.String PROPERTY_TOKENTYPES
public void caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate
in interface javax.swing.event.CaretListener
public void markTokenAt(int pos)
public void removeMarkers()
public void config(Configuration config)
SyntaxComponent
config
in interface SyntaxComponent
config
- configuration datapublic void install(javax.swing.JEditorPane editor)
SyntaxComponent
install
in interface SyntaxComponent
public void deinstall(javax.swing.JEditorPane editor)
SyntaxComponent
deinstall
in interface SyntaxComponent
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener