jsyntaxpane.actions
Class CaretMonitor
java.lang.Object
jsyntaxpane.actions.CaretMonitor
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.CaretListener
public class CaretMonitor
- extends java.lang.Object
- implements javax.swing.event.CaretListener
This class can be used to display the caret location in friendly manner for
an EditorPane.
- Author:
- Ayman Al-Sairafi
Constructor Summary |
CaretMonitor(javax.swing.text.JTextComponent text,
javax.swing.JLabel label)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CaretMonitor
public CaretMonitor(javax.swing.text.JTextComponent text,
javax.swing.JLabel label)
caretUpdate
public void caretUpdate(javax.swing.event.CaretEvent evt)
- Specified by:
caretUpdate
in interface javax.swing.event.CaretListener
updateLabel
protected void updateLabel(int pos)
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable
getNoSelectionFormat
public java.lang.String getNoSelectionFormat()
setNoSelectionFormat
public void setNoSelectionFormat(java.lang.String noSelectionFormat)
getSelectionFormat
public java.lang.String getSelectionFormat()
setSelectionFormat
public void setSelectionFormat(java.lang.String selectionFormat)