jsyntaxpane.actions
Class CaretMonitor

java.lang.Object
  extended by 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)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaretMonitor

public CaretMonitor(javax.swing.text.JTextComponent text,
                    javax.swing.JLabel label)
Method Detail

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)