Nengo.ca

ca.nengo.config.ui
Class ConfigurationChangeListener

java.lang.Object
  extended by ca.nengo.config.ui.ConfigurationChangeListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

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

A listener for changes to Property values. TODO: is there a better option than EditorProxy? TODO: can we avoid references to this class from ca.nengo.config?


Nested Class Summary
static interface ConfigurationChangeListener.EditorProxy
          An editor component (from ConfigurationHandler.getEditor(...)) must implement EditorProxy in order to allow retrieval of a new value when editing is complete.
 
Constructor Summary
ConfigurationChangeListener(javax.swing.JTree tree, javax.swing.tree.TreePath path)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void cancelChanges()
           
 void commitChanges()
          Event for when changes are committed
 boolean isChangeCancelled()
           
 boolean isChangeCommited()
           
 void setProxy(ConfigurationChangeListener.EditorProxy proxy)
          Called by a ConfigurationHandler's editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationChangeListener

public ConfigurationChangeListener(javax.swing.JTree tree,
                                   javax.swing.tree.TreePath path)
Parameters:
tree - Parent tree object
path - Current path
Method Detail

isChangeCommited

public boolean isChangeCommited()
Returns:
Already committed?

isChangeCancelled

public boolean isChangeCancelled()
Returns:
Has change been cancelled?

setProxy

public void setProxy(ConfigurationChangeListener.EditorProxy proxy)
Called by a ConfigurationHandler's editor.

Parameters:
proxy - Provides access to an updated property value after it is changed by the user

actionPerformed

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

commitChanges

public void commitChanges()
Event for when changes are committed


cancelChanges

public void cancelChanges()

Nengo.ca