org.jdesktop.swing.binding
Class SpinnerBinding

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

public class SpinnerBinding
extends AbstractBinding

Class which binds a component that supports setting a value within a sequence of values (JSpinner) to a field in a data model. Although this binding is most commonly used for spinners, it may be used with any component that defines a SpinnerModel to represent its current value.


Field Summary
 
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
SpinnerBinding(JComponent component, SpinnerModel spinnerModel, DataModel dataModel, String fieldName, int validationPolicy)
           
SpinnerBinding(JSpinner spinner, DataModel dataModel, String fieldName)
           
SpinnerBinding(JSpinner spinner, DataModel dataModel, String fieldName, int validationPolicy)
           
 
Method Summary
 JComponent getComponent()
           
protected  Object getComponentValue()
           
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, isModified, isValid, pull, push, removePropertyChangeListener, setModified, setValidationPolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpinnerBinding

public SpinnerBinding(JSpinner spinner,
                      DataModel dataModel,
                      String fieldName)

SpinnerBinding

public SpinnerBinding(JSpinner spinner,
                      DataModel dataModel,
                      String fieldName,
                      int validationPolicy)

SpinnerBinding

public SpinnerBinding(JComponent component,
                      SpinnerModel spinnerModel,
                      DataModel dataModel,
                      String fieldName,
                      int validationPolicy)
Method Detail

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


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