javax.swing.text
Class StyledEditorKit.AttributeTracker
java.lang.Object
javax.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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StyledEditorKit.AttributeTracker
StyledEditorKit.AttributeTracker()
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