org.jminor.common.model.valuemap
Class ValueChangeListener<K,V>

java.lang.Object
  extended by org.jminor.common.model.valuemap.ValueChangeListener<K,V>
All Implemented Interfaces:
ActionListener, EventListener

public abstract class ValueChangeListener<K,V>
extends Object
implements ActionListener

Used when listening to ValueChangeEvents


Constructor Summary
ValueChangeListener()
           
 
Method Summary
 void actionPerformed(ActionEvent e)
          Calls valueChanged() assuming the given event is a ValueChangeEvent
protected abstract  void valueChanged(ValueChangeEvent<K,V> event)
          Called when a value changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueChangeListener

public ValueChangeListener()
Method Detail

actionPerformed

public final void actionPerformed(ActionEvent e)
Calls valueChanged() assuming the given event is a ValueChangeEvent

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the event
Throws:
IllegalArgumentException - in case the received event is not a ValueChangeEvent instance

valueChanged

protected abstract void valueChanged(ValueChangeEvent<K,V> event)
Called when a value changes.

Parameters:
event - the event describing the value change