com.isti.util.gui
Class UpdateHandler

java.lang.Object
  extended bycom.isti.util.gui.UpdateHandler
All Implemented Interfaces:
java.awt.event.ActionListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, java.util.EventListener, java.awt.event.FocusListener, UpdateListener

public class UpdateHandler
extends java.lang.Object
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, java.awt.event.FocusListener, UpdateListener

Class UpdateListener defines an update listener.


Constructor Summary
UpdateHandler(java.awt.Component component, UpdateListener updateListener)
          Creates an update listener.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Invoked when an action occurs.
 void changedUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that an attribute or set of attributes changed.
 void focusGained(java.awt.event.FocusEvent e)
          Invoked when a component gains the keyboard focus.
 void focusLost(java.awt.event.FocusEvent e)
          Invoked when a component loses the keyboard focus.
 void insertUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that there was an insert into the document.
 void processUpdate(java.awt.Component component, java.lang.Object e)
          Process an update.
 void removeUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that a portion of the document has been removed.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Invoked when the target of the listener has changed its state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateHandler

public UpdateHandler(java.awt.Component component,
                     UpdateListener updateListener)
Creates an update listener.

Parameters:
component - the component.
updateListener - the update listener.
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the action event.

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Invoked when the target of the listener has changed its state.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
e - the change event.

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
Gives notification that there was an insert into the document. The range given by the DocumentEvent bounds the freshly inserted region.

Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
Parameters:
e - the document event.

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Invoked when a component gains the keyboard focus.

Specified by:
focusGained in interface java.awt.event.FocusListener
Parameters:
e - the focus event.

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface java.awt.event.FocusListener
Parameters:
e - the focus event.

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Gives notification that a portion of the document has been removed. The range is given in terms of what the view last saw (that is, before updating sticky positions).

Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
Parameters:
e - the document event

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Gives notification that an attribute or set of attributes changed.

Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
Parameters:
e - the document event

processUpdate

public void processUpdate(java.awt.Component component,
                          java.lang.Object e)
Process an update.

Specified by:
processUpdate in interface UpdateListener
Parameters:
component - the component.
e - the event or null if none.