Class EnableListener

java.lang.Object
  |
  +--EnableListener
All Implemented Interfaces:
DocumentListener, EventListener

public class EnableListener
extends Object
implements DocumentListener

This class implements a document listener whose toggle enabled / disabled a list of button.

Author:
P. URSO

Constructor Summary
EnableListener(AbstractButton button)
          Constructs a new EnableListener with a first button.
 
Method Summary
 void changedUpdate(DocumentEvent e)
          Disables all buttons.
 void enables(boolean state)
          Enables or disables all buttons.
 void insertUpdate(DocumentEvent e)
          Disables all buttons.
 void removeUpdate(DocumentEvent e)
          Disables all buttons.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnableListener

public EnableListener(AbstractButton button)
Constructs a new EnableListener with a first button.
Parameters:
button - the first button to be switched.
Method Detail

enables

public void enables(boolean state)
Enables or disables all buttons.
Parameters:
state - true to enable all the buttons

insertUpdate

public void insertUpdate(DocumentEvent e)
Disables all buttons.
Specified by:
insertUpdate in interface DocumentListener

removeUpdate

public void removeUpdate(DocumentEvent e)
Disables all buttons.
Specified by:
removeUpdate in interface DocumentListener

changedUpdate

public void changedUpdate(DocumentEvent e)
Disables all buttons.
Specified by:
changedUpdate in interface DocumentListener