Package 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.
-
-
Constructor Summary
Constructors Constructor Description CaretMonitor(javax.swing.text.JTextComponent text, javax.swing.JLabel label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
caretUpdate(javax.swing.event.CaretEvent evt)
protected void
finalize()
java.lang.String
getNoSelectionFormat()
java.lang.String
getSelectionFormat()
void
setNoSelectionFormat(java.lang.String noSelectionFormat)
void
setSelectionFormat(java.lang.String selectionFormat)
protected void
updateLabel(int pos)
-
-
-
Method Detail
-
caretUpdate
public void caretUpdate(javax.swing.event.CaretEvent evt)
- Specified by:
caretUpdate
in interfacejavax.swing.event.CaretListener
-
updateLabel
protected void updateLabel(int pos)
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.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)
-
-