jaxx.runtime.binding
Class DefaultJAXXBinding

java.lang.Object
  extended by jaxx.runtime.binding.DefaultJAXXBinding
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener, JAXXBinding
Direct Known Subclasses:
SimpleJAXXObjectBinding

public abstract class DefaultJAXXBinding
extends java.lang.Object
implements JAXXBinding

A PropertyChangeListener which processes a data binding when it receives a PropertyChangeEvent.


Field Summary
protected  boolean defaultBinding
          flag to know true : if the binding was init from a generated jaxx object, false otherwise.
protected  JAXXObject source
          The source of the binding.
 
Constructor Summary
DefaultJAXXBinding(JAXXObject source, java.lang.String id, boolean defaultBinding)
          Creates a new Data binding which will run the given data binding when it receives a PropertyChangeEvent.
 
Method Summary
 java.lang.String getId()
           
 JAXXObject getSource()
           
 boolean isDefaultBinding()
          This state is not used actually, but will be usefull later...
 void propertyChange(java.beans.PropertyChangeEvent e)
          Processes the data binding in response to a PropertyChangeEvent.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jaxx.runtime.JAXXBinding
applyDataBinding, processDataBinding, removeDataBinding
 

Field Detail

source

protected final JAXXObject source
The source of the binding.


defaultBinding

protected final boolean defaultBinding
flag to know true : if the binding was init from a generated jaxx object, false otherwise.

Constructor Detail

DefaultJAXXBinding

public DefaultJAXXBinding(JAXXObject source,
                          java.lang.String id,
                          boolean defaultBinding)
Creates a new Data binding which will run the given data binding when it receives a PropertyChangeEvent.

Parameters:
source - the JAXXObject source of the binding
id - the name of the data binding to run
defaultBinding - flag to knwon if binding is coming from a generated jaxx object (true).
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface JAXXBinding
Returns:
the unique id of a binding

getSource

public JAXXObject getSource()
Specified by:
getSource in interface JAXXBinding
Returns:
the JAXXObject which owns the binding

isDefaultBinding

public boolean isDefaultBinding()
Description copied from interface: JAXXBinding
This state is not used actually, but will be usefull later...

Specified by:
isDefaultBinding in interface JAXXBinding
Returns:
true if binding was registred as a default binding, false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Processes the data binding in response to a PropertyChangeEvent.

When the binding is wake up, delegate the process to the source object which can manage re-entrant code (can not process a re-entrant event).

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
e - the event which triggered the binding


Copyright © 2008-2009 CodeLutin. All Rights Reserved.