org.jdesktop.swing.binding
Class FormBinding

java.lang.Object
  extended byorg.jdesktop.swing.binding.AbstractBinding
      extended byorg.jdesktop.swing.binding.FormBinding
All Implemented Interfaces:
Binding

public class FormBinding
extends AbstractBinding

Class which binds a JForm component to a data model field which is type DataModel in order to support nested data models.


Field Summary
protected  JForm form
           
 
Fields inherited from class org.jdesktop.swing.binding.AbstractBinding
cachedValue, dataModel, errorList, metaData, modified, pulling, validState
 
Fields inherited from interface org.jdesktop.swing.binding.Binding
AUTO_VALIDATE, AUTO_VALIDATE_NONE, AUTO_VALIDATE_STRICT, INVALID, UNVALIDATED, VALID
 
Constructor Summary
FormBinding(JForm form, DataModel dataModel, String fieldName)
           
 
Method Summary
 JComponent getComponent()
           
protected  Object getComponentValue()
           
 boolean isModified()
           
 boolean isValid()
           
 boolean pull()
          Pulls the value of this binding's data model element into its UI component.
 boolean push()
          Pushes the current value contained in this binding's UI component to this binding's data model element.
protected  void setComponent(JComponent component)
           
protected  void setComponentValue(Object value)
           
 
Methods inherited from class org.jdesktop.swing.binding.AbstractBinding
addError, addPropertyChangeListener, clearValidationErrors, convertFromModelType, convertToModelType, executeValidators, getDataModel, getFieldName, getPropertyChangeListeners, getValidationErrors, getValidationPolicy, getValidState, removePropertyChangeListener, setModified, setValidationPolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

form

protected JForm form
Constructor Detail

FormBinding

public FormBinding(JForm form,
                   DataModel dataModel,
                   String fieldName)
Method Detail

pull

public boolean pull()
Description copied from interface: Binding
Pulls the value of this binding's data model element into its UI component.

Specified by:
pull in interface Binding
Overrides:
pull in class AbstractBinding

isModified

public boolean isModified()
Specified by:
isModified in interface Binding
Overrides:
isModified in class AbstractBinding

isValid

public boolean isValid()
Specified by:
isValid in interface Binding
Overrides:
isValid in class AbstractBinding

getComponent

public JComponent getComponent()
Specified by:
getComponent in interface Binding
Specified by:
getComponent in class AbstractBinding

setComponent

protected void setComponent(JComponent component)
Specified by:
setComponent in class AbstractBinding

getComponentValue

protected Object getComponentValue()
Specified by:
getComponentValue in class AbstractBinding

setComponentValue

protected void setComponentValue(Object value)
Specified by:
setComponentValue in class AbstractBinding

push

public boolean push()
Description copied from interface: Binding
Pushes the current value contained in this binding's UI component to this binding's data model element. Only valid values should be pushed to the model.

Specified by:
push in interface Binding
Overrides:
push in class AbstractBinding


Copyright 2004 by Sun Microsystems, Inc. All Rights Reserved.