jcreek.cke.browser
Class Visualizer.ActionChangedListener

java.lang.Object
  extended byjcreek.cke.browser.Visualizer.ActionChangedListener
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener
Enclosing class:
Visualizer

protected class Visualizer.ActionChangedListener
extends java.lang.Object
implements java.beans.PropertyChangeListener

Watches for changes in actions and deals with them by changing the corresponding menu items or toolbar buttons.


Constructor Summary
Visualizer.ActionChangedListener(javax.swing.JButton b)
          Constructor for our action change listener.
Visualizer.ActionChangedListener(javax.swing.JMenuItem mi)
          Constructor for our action change listener.
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent e)
          Handles changes in the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Visualizer.ActionChangedListener

public Visualizer.ActionChangedListener(javax.swing.JMenuItem mi)
Constructor for our action change listener.

Parameters:
mi - menu item we are to associate with

Visualizer.ActionChangedListener

public Visualizer.ActionChangedListener(javax.swing.JButton b)
Constructor for our action change listener.

Parameters:
b - button we are to associate with
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Handles changes in the action. If the action name changed we change our menu name. If the action changed it's enabled state, we change our component's state.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
e - property change event


Created at IDI, NTNU by the Artificial Intelligence and Learning group