javax.swing.text
Class StyledEditorKit.AttributeTracker

java.lang.Object
  extended byjavax.swing.text.StyledEditorKit.AttributeTracker
All Implemented Interfaces:
CaretListener, EventListener, java.beans.PropertyChangeListener, Serializable
Enclosing class:
StyledEditorKit

class StyledEditorKit.AttributeTracker
extends Object
implements CaretListener, java.beans.PropertyChangeListener, Serializable

Tracks caret movement and keeps the input attributes set to reflect the current set of attribute definitions at the caret position.

This implements PropertyChangeListener to update the input attributes when the Document changes, as if the Document changes the attributes will almost certainly change.


Constructor Summary
(package private) StyledEditorKit.AttributeTracker()
           
 
Method Summary
 void caretUpdate(CaretEvent e)
          Called when the caret position is updated.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
(package private)  void updateInputAttributes(int dot, int mark, JTextComponent c)
          Updates the attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyledEditorKit.AttributeTracker

StyledEditorKit.AttributeTracker()
Method Detail

updateInputAttributes

void updateInputAttributes(int dot,
                           int mark,
                           JTextComponent c)
Updates the attributes. dot and mark mark give the positions of the selection in c.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

caretUpdate

public void caretUpdate(CaretEvent e)
Description copied from interface: CaretListener
Called when the caret position is updated.

Specified by:
caretUpdate in interface CaretListener
Parameters:
e - the caret event