org.jdesktop.binding.swingx
Class LabelMetaBinding

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

public class LabelMetaBinding
extends AbstractBinding

Class which binds an uneditable component (JLabel) to the metaData label property of a dataModel's field, adding a colon.

Author:
Amy Fowler, Jeanette Winzenburg

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
LabelMetaBinding(javax.swing.JLabel label, DataModel model, java.lang.String fieldName)
           
 
Method Summary
protected  java.lang.String createColonedText(java.lang.Object value)
           
protected  java.lang.String getColon()
           
 javax.swing.JComponent getComponent()
           
protected  java.lang.Object getComponentValue()
           
protected  javax.swing.Icon getRequiredIcon()
           
protected  void installDataModelListener()
           
protected  void installMetaDataListener()
          here: does nothing
 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(javax.swing.JComponent component)
          set component and configures metaData dependent logic/constraint state.
protected  void setComponentValue(java.lang.Object value)
           
protected  void updateRequiredFeedBack(boolean required)
           
 
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, installInputVerifier, isEmpty, removePropertyChangeListener, setModified, setValidationPolicy, setValidState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelMetaBinding

public LabelMetaBinding(javax.swing.JLabel label,
                        DataModel model,
                        java.lang.String fieldName)
Method Detail

isModified

public boolean isModified()
Specified by:
isModified in interface Binding
Overrides:
isModified in class AbstractBinding
Returns:
boolean indicating whether or not the value contained in this binding's UI component has been modified since the value was last pushed or pulled

isValid

public boolean isValid()
Specified by:
isValid in interface Binding
Overrides:
isValid in class AbstractBinding
Returns:
boolean indicating whether or not the value contained in this binding's UI component is valid

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
Returns:
boolean indicating whether or not the value was pushed to the data model

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
Returns:
boolean indicating whether or not the value was pulled from the data model

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

installDataModelListener

protected void installDataModelListener()
Overrides:
installDataModelListener in class AbstractBinding

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

updateRequiredFeedBack

protected void updateRequiredFeedBack(boolean required)

getRequiredIcon

protected javax.swing.Icon getRequiredIcon()

createColonedText

protected java.lang.String createColonedText(java.lang.Object value)

getColon

protected java.lang.String getColon()


Copyright © 2005 Sun Microsystems All Rights Reserved.