proyecto.utilidades
Class NumeroLinea.UpdateHandler

java.lang.Object
  extended by java.awt.event.ComponentAdapter
      extended by proyecto.utilidades.NumeroLinea.UpdateHandler
All Implemented Interfaces:
ComponentListener, PropertyChangeListener, EventListener, CaretListener, DocumentListener
Enclosing class:
NumeroLinea

 class NumeroLinea.UpdateHandler
extends ComponentAdapter
implements PropertyChangeListener, DocumentListener, CaretListener


Constructor Summary
NumeroLinea.UpdateHandler(JavaTextPane aText)
           
 
Method Summary
 void caretUpdate(CaretEvent e)
           
 void changedUpdate(DocumentEvent evt)
          Text attributes were changed.
 void componentResized(ComponentEvent evt)
          The text component was resized.
 void insertUpdate(DocumentEvent evt)
          Text was inserted into the document.
 void propertyChange(PropertyChangeEvent evt)
          A bound property was changed on the text component.
 void removeUpdate(DocumentEvent evt)
          Text was removed from the document.
 
Methods inherited from class java.awt.event.ComponentAdapter
componentHidden, componentMoved, componentShown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumeroLinea.UpdateHandler

public NumeroLinea.UpdateHandler(JavaTextPane aText)
Method Detail

componentResized

public void componentResized(ComponentEvent evt)
The text component was resized.

Specified by:
componentResized in interface ComponentListener
Overrides:
componentResized in class ComponentAdapter

propertyChange

public void propertyChange(PropertyChangeEvent evt)
A bound property was changed on the text component. Properties like the font, border, and tab size affect the layout of the whole document, so we invalidate all the line heights here.

Specified by:
propertyChange in interface PropertyChangeListener

insertUpdate

public void insertUpdate(DocumentEvent evt)
Text was inserted into the document.

Specified by:
insertUpdate in interface DocumentListener

removeUpdate

public void removeUpdate(DocumentEvent evt)
Text was removed from the document.

Specified by:
removeUpdate in interface DocumentListener

changedUpdate

public void changedUpdate(DocumentEvent evt)
Text attributes were changed. In a source-code editor based on StyledDocument, attribute changes should be applied automatically in response to inserts and removals. Since we're already listening for those, this method should be redundant, but YMMV.

Specified by:
changedUpdate in interface DocumentListener

caretUpdate

public void caretUpdate(CaretEvent e)
Specified by:
caretUpdate in interface CaretListener