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.CaretListenerThis 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 voidcaretUpdate(javax.swing.event.CaretEvent evt)protected voidfinalize()java.lang.StringgetNoSelectionFormat()java.lang.StringgetSelectionFormat()voidsetNoSelectionFormat(java.lang.String noSelectionFormat)voidsetSelectionFormat(java.lang.String selectionFormat)protected voidupdateLabel(int pos)
-
-
-
Method Detail
-
caretUpdate
public void caretUpdate(javax.swing.event.CaretEvent evt)
- Specified by:
caretUpdatein interfacejavax.swing.event.CaretListener
-
updateLabel
protected void updateLabel(int pos)
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein 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)
-
-