cage.utility
Class OnActionClicker

java.lang.Object
  extended by cage.utility.OnActionClicker
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class OnActionClicker
extends java.lang.Object
implements java.awt.event.ActionListener

Implementation of an ActionListener that forwards the click to another button depending on the selection state of the source button.


Constructor Summary
OnActionClicker(javax.swing.AbstractButton bf, javax.swing.AbstractButton target)
          Constructs a OnActionClicker object with the true button set to null.
OnActionClicker(javax.swing.AbstractButton bt, javax.swing.AbstractButton bf, javax.swing.AbstractButton target)
          Constructs a OnActionClicker object.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnActionClicker

public OnActionClicker(javax.swing.AbstractButton bt,
                       javax.swing.AbstractButton bf,
                       javax.swing.AbstractButton target)
Constructs a OnActionClicker object.

This method throws an IllegalArgumentException if bf or target is null. A null bt string is legal.

Parameters:
bt - The button to be clicked if target is selected.
bf - The button to be clicked if target is deselected.
target - The button to which this listener will listen.
Throws:
java.lang.IllegalArgumentException - if bf or target is null

OnActionClicker

public OnActionClicker(javax.swing.AbstractButton bf,
                       javax.swing.AbstractButton target)
Constructs a OnActionClicker object with the true button set to null.

This method throws an IllegalArgumentException if bf or target is null.

Parameters:
bf - The button to be clicked if target is deselected.
target - The button to which this listener will listen.
Throws:
java.lang.IllegalArgumentException - if bf or target is null
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener