com.alee.utils.swing
Class DocumentChangeListener

java.lang.Object
  extended by com.alee.utils.swing.DocumentChangeListener
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.DocumentListener
Direct Known Subclasses:
IntDocumentChangeListener, StringDocumentChangeListener

public abstract class DocumentChangeListener
extends java.lang.Object
implements javax.swing.event.DocumentListener

Special document listener that only notifies about occured changes.

Author:
Mikle Garin

Constructor Summary
DocumentChangeListener()
           
 
Method Summary
 void changedUpdate(javax.swing.event.DocumentEvent e)
          
abstract  void documentChanged(javax.swing.event.DocumentEvent e)
          Informs that document has changed in some way.
protected  java.lang.String getText(javax.swing.event.DocumentEvent e)
          Returns text contained in the event's document.
 void insertUpdate(javax.swing.event.DocumentEvent e)
          
 void removeUpdate(javax.swing.event.DocumentEvent e)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentChangeListener

public DocumentChangeListener()
Method Detail

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)

Specified by:
insertUpdate in interface javax.swing.event.DocumentListener

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)

Specified by:
removeUpdate in interface javax.swing.event.DocumentListener

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)

Specified by:
changedUpdate in interface javax.swing.event.DocumentListener

documentChanged

public abstract void documentChanged(javax.swing.event.DocumentEvent e)
Informs that document has changed in some way.

Parameters:
e - document event

getText

protected java.lang.String getText(javax.swing.event.DocumentEvent e)
Returns text contained in the event's document.

Returns:
text contained in the event's document