org.codehaus.groovy.binding
Class MutualPropertyBinding

java.lang.Object
  extended by org.codehaus.groovy.binding.AbstractFullBinding
      extended by org.codehaus.groovy.binding.MutualPropertyBinding
All Implemented Interfaces:
PropertyChangeListener, EventListener, BindingUpdatable, FullBinding

public class MutualPropertyBinding
extends AbstractFullBinding
implements PropertyChangeListener

Since:
Groovy 1.6
Version:
$Revision: 10897 $
Author:
Danno Ferrin

Field Summary
 
Fields inherited from class org.codehaus.groovy.binding.AbstractFullBinding
converter, reverseConverter, sourceBinding, targetBinding, validator
 
Method Summary
 void bind()
          Causes automatic updating of bound values to be turned on.
static String bindProperty(Object bean, String propertyName, PropertyChangeListener that)
           
 void propertyChange(PropertyChangeEvent event)
           
 void rebind()
          Causes the current bindings to be reset.
 void setSourceBinding(SourceBinding sourceBinding)
           
 void setTargetBinding(TargetBinding targetBinding)
           
 void unbind()
          Causes automatic updating of bound values to be turned off.
static void unbindProperty(Object bean, String propertyName, PropertyChangeListener that)
           
 
Methods inherited from class org.codehaus.groovy.binding.AbstractFullBinding
getConverter, getReverseConverter, getSourceBinding, getTargetBinding, getValidator, reverseUpdate, setConverter, setReverseConverter, setValidator, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent event)
Specified by:
propertyChange in interface PropertyChangeListener

setSourceBinding

public void setSourceBinding(SourceBinding sourceBinding)
Specified by:
setSourceBinding in interface FullBinding
Overrides:
setSourceBinding in class AbstractFullBinding

setTargetBinding

public void setTargetBinding(TargetBinding targetBinding)
Specified by:
setTargetBinding in interface FullBinding
Overrides:
setTargetBinding in class AbstractFullBinding

bindProperty

public static String bindProperty(Object bean,
                                  String propertyName,
                                  PropertyChangeListener that)

unbindProperty

public static void unbindProperty(Object bean,
                                  String propertyName,
                                  PropertyChangeListener that)

bind

public void bind()
Description copied from interface: BindingUpdatable
Causes automatic updating of bound values to be turned on. This is idempotent between calls to unbind and rebind; i.e. multiple calls to bind will have only the effect of the first call.

Specified by:
bind in interface BindingUpdatable

unbind

public void unbind()
Description copied from interface: BindingUpdatable
Causes automatic updating of bound values to be turned off. This is idempotent between calls to bind and rebind; i.e. multiple calls to unbind will have only the effect of the first call.

Specified by:
unbind in interface BindingUpdatable

rebind

public void rebind()
Description copied from interface: BindingUpdatable
Causes the current bindings to be reset. If the binding is not bound, it is a no-op. If the binding is bound, it will be turned off, then turned on against current values.

Specified by:
rebind in interface BindingUpdatable

Copyright © 2003-2009 The Codehaus. All rights reserved.