Package jsyntaxpane.components
Class TokenMarker
java.lang.Object
jsyntaxpane.components.TokenMarker
- All Implemented Interfaces:
PropertyChangeListener,EventListener,CaretListener,SyntaxComponent
public class TokenMarker
extends Object
implements SyntaxComponent, CaretListener, PropertyChangeListener
This class highlights Tokens within a document whenever the caret is moved
to a TokenType provided in the config file.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jsyntaxpane.components.SyntaxComponent
SyntaxComponent.Status -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidconfig(Configuration config) Configure the component using the given properties.voiddeinstall(JEditorPane editor) Called when the component is to be removed from the editorvoidinstall(JEditorPane editor) Called to install the component on an editorvoidmarkTokenAt(int pos) voidvoidremoves all markers from the pane.
-
Field Details
-
DEFAULT_TOKENTYPES
- See Also:
-
PROPERTY_COLOR
- See Also:
-
PROPERTY_TOKENTYPES
- See Also:
-
-
Constructor Details
-
TokenMarker
public TokenMarker()Constructs a new Token highlighter
-
-
Method Details
-
caretUpdate
- Specified by:
caretUpdatein interfaceCaretListener
-
markTokenAt
public void markTokenAt(int pos) -
removeMarkers
public void removeMarkers()removes all markers from the pane. -
config
Description copied from interface:SyntaxComponentConfigure the component using the given properties. The keys needed for configuration will be prefixed by the given prefix- Specified by:
configin interfaceSyntaxComponent- Parameters:
config- configuration data
-
install
Description copied from interface:SyntaxComponentCalled to install the component on an editor- Specified by:
installin interfaceSyntaxComponent
-
deinstall
Description copied from interface:SyntaxComponentCalled when the component is to be removed from the editor- Specified by:
deinstallin interfaceSyntaxComponent
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-