jsyntaxpane.components
Class PairsMarker
java.lang.Object
jsyntaxpane.components.PairsMarker
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.CaretListener, SyntaxComponent
public class PairsMarker
- extends java.lang.Object
- implements javax.swing.event.CaretListener, SyntaxComponent, java.beans.PropertyChangeListener
This class highlights any pairs of the given language. Pairs are defined
with the Token.pairValue.
- Author:
- Ayman Al-Sairafi
Method Summary |
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 |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
removeMarkers()
Remove all the highlights from the editor pane. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_COLOR
public static final java.lang.String PROPERTY_COLOR
- See Also:
- Constant Field Values
PairsMarker
public PairsMarker()
caretUpdate
public void caretUpdate(javax.swing.event.CaretEvent e)
- Specified by:
caretUpdate
in interface javax.swing.event.CaretListener
removeMarkers
public void removeMarkers()
- Remove all the highlights from the editor pane. This should be called
when the editorkit is removed.
config
public void config(Configuration config)
- Description copied from interface:
SyntaxComponent
- Configure the component using the given properties. The keys
needed for configuration will be prefixed by the given prefix
- Specified by:
config
in interface SyntaxComponent
- Parameters:
config
- configuration data
install
public void install(javax.swing.JEditorPane editor)
- Description copied from interface:
SyntaxComponent
- Called to install the component on an editor
- Specified by:
install
in interface SyntaxComponent
deinstall
public void deinstall(javax.swing.JEditorPane editor)
- Description copied from interface:
SyntaxComponent
- Called when the component is to be removed from the editor
- Specified by:
deinstall
in interface SyntaxComponent
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChange
in interface java.beans.PropertyChangeListener