org.jdesktop.swing.binding
Class LabelBinding
java.lang.Object
org.jdesktop.swing.binding.AbstractBinding
org.jdesktop.swing.binding.LabelBinding
- All Implemented Interfaces:
- Binding
- public class LabelBinding
- extends AbstractBinding
Class which binds an uneditable component (JLabel) to a data model field
of arbitrary type. If the field is type Image, then the image will be
displayed as an icon in the component. For all other types, the data model
value will be converted and displayed as a String.
| Methods inherited from class org.jdesktop.swing.binding.AbstractBinding |
addError, addPropertyChangeListener, clearValidationErrors, convertFromModelType, convertToModelType, executeValidators, getDataModel, getFieldName, getPropertyChangeListeners, getValidationErrors, getValidationPolicy, getValidState, pull, removePropertyChangeListener, setModified, setValidationPolicy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LabelBinding
public LabelBinding(JLabel label,
DataModel model,
String fieldName)
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
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
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.