org.jdesktop.binding.swingx
Class TextBinding

java.lang.Object
  extended by org.jdesktop.binding.swingx.AbstractBinding
      extended by org.jdesktop.binding.swingx.TextBinding
All Implemented Interfaces:
Binding

public class TextBinding
extends AbstractBinding

Class which binds a component that supports editing text values (JTextField, JTextArea, JEditorPane) to a data model field.

JW: hmm, what's the use case? I would prefer to better not do it now, can cope with that later if necessary. [Although this binding is most commonly used for Swing's text components, it may be used with any component that defines a javax.swing.text.Document to represent its contents.]

Version:
1.0
Author:
Amy Fowler

Field Summary
 
Fields inherited from class org.jdesktop.binding.swingx.AbstractBinding
cachedValue, dataModel, errorList, fieldName, metaData, modified, pulling, pushing, validState
 
Fields inherited from interface org.jdesktop.binding.swingx.Binding
AUTO_VALIDATE, AUTO_VALIDATE_NONE, AUTO_VALIDATE_STRICT, INVALID, UNVALIDATED, VALID
 
Constructor Summary
TextBinding(javax.swing.JComponent component, javax.swing.text.Document document, DataModel dataModel, java.lang.String fieldName, int validationPolicy)
           
TextBinding(javax.swing.text.JTextComponent textComponent, DataModel model, java.lang.String fieldName)
           
TextBinding(javax.swing.text.JTextComponent textComponent, DataModel model, java.lang.String fieldName, int validationPolicy)
           
 
Method Summary
protected  void configureEditability()
           
 javax.swing.JComponent getComponent()
           
protected  java.lang.Object getComponentValue()
           
protected  void installMetaDataListener()
          here: does nothing
protected  void setComponent(javax.swing.JComponent component)
          set component and configures metaData dependent logic/constraint state.
protected  void setComponentValue(java.lang.Object value)
           
 
Methods inherited from class org.jdesktop.binding.swingx.AbstractBinding
addError, addPropertyChangeListener, checkNull, checkRequired, clearValidationErrors, convertFromModelType, convertToModelType, executeValidators, firePropertyChange, getDataModel, getFieldName, getPropertyChangeListeners, getValidationErrors, getValidationPolicy, getValidState, installDataModel, installDataModelListener, installInputVerifier, isEmpty, isModified, isValid, pull, push, removePropertyChangeListener, setModified, setValidationPolicy, setValidState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextBinding

public TextBinding(javax.swing.text.JTextComponent textComponent,
                   DataModel model,
                   java.lang.String fieldName)

TextBinding

public TextBinding(javax.swing.text.JTextComponent textComponent,
                   DataModel model,
                   java.lang.String fieldName,
                   int validationPolicy)

TextBinding

public TextBinding(javax.swing.JComponent component,
                   javax.swing.text.Document document,
                   DataModel dataModel,
                   java.lang.String fieldName,
                   int validationPolicy)
Method Detail

getComponent

public javax.swing.JComponent getComponent()

setComponent

protected void setComponent(javax.swing.JComponent component)
Description copied from class: AbstractBinding
set component and configures metaData dependent logic/constraint state.

Specified by:
setComponent in class AbstractBinding

configureEditability

protected void configureEditability()

installMetaDataListener

protected void installMetaDataListener()
Description copied from class: AbstractBinding
here: does nothing

Overrides:
installMetaDataListener in class AbstractBinding

getComponentValue

protected java.lang.Object getComponentValue()
Specified by:
getComponentValue in class AbstractBinding

setComponentValue

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


Copyright © 2005 Sun Microsystems All Rights Reserved.