|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swing.binding.AbstractBinding
Abstract base class which implements a default mechanism for binding user-interface components to elements in a data model.
| Field Summary | |
protected Object |
cachedValue
|
protected DataModel |
dataModel
|
protected ArrayList |
errorList
|
protected MetaData |
metaData
|
protected boolean |
modified
|
protected boolean |
pulling
|
protected int |
validState
|
| Fields inherited from interface org.jdesktop.swing.binding.Binding |
AUTO_VALIDATE, AUTO_VALIDATE_NONE, AUTO_VALIDATE_STRICT, INVALID, UNVALIDATED, VALID |
| Constructor Summary | |
protected |
AbstractBinding(JComponent component,
DataModel dataModel,
String fieldName,
int validationPolicy)
|
| Method Summary | |
protected void |
addError(String error)
|
void |
addPropertyChangeListener(PropertyChangeListener pcl)
Adds the specified property change listener to this binding object. |
void |
clearValidationErrors()
|
protected String |
convertFromModelType(Object modelValue)
|
protected Object |
convertToModelType(Object componentValue)
|
protected boolean |
executeValidators(Object value)
|
abstract JComponent |
getComponent()
|
protected abstract Object |
getComponentValue()
|
DataModel |
getDataModel()
|
String |
getFieldName()
|
PropertyChangeListener[] |
getPropertyChangeListeners()
|
String[] |
getValidationErrors()
Returns validation error messages generated from the most recent element-level validation pass. |
int |
getValidationPolicy()
|
int |
getValidState()
|
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. |
void |
removePropertyChangeListener(PropertyChangeListener pcl)
Removes the specified property change listener from this binding object. |
protected abstract void |
setComponent(JComponent component)
|
protected abstract void |
setComponentValue(Object value)
|
protected void |
setModified(boolean modified)
|
void |
setValidationPolicy(int policy)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected DataModel dataModel
protected MetaData metaData
protected Object cachedValue
protected ArrayList errorList
protected boolean modified
protected int validState
protected boolean pulling
| Constructor Detail |
protected AbstractBinding(JComponent component,
DataModel dataModel,
String fieldName,
int validationPolicy)
| Method Detail |
public DataModel getDataModel()
getDataModel in interface Bindingpublic String getFieldName()
getFieldName in interface Bindingpublic void setValidationPolicy(int policy)
public int getValidationPolicy()
public boolean pull()
Binding
pull in interface Bindingpublic boolean isModified()
isModified in interface Bindingprotected void setModified(boolean modified)
public boolean isValid()
isValid in interface Bindingpublic int getValidState()
getValidState in interface Binding
protected Object convertToModelType(Object componentValue)
throws ConversionException
ConversionExceptionprotected String convertFromModelType(Object modelValue)
protected boolean executeValidators(Object value)
public String[] getValidationErrors()
Binding
getValidationErrors in interface Bindingpublic void clearValidationErrors()
public abstract JComponent getComponent()
getComponent in interface Bindingprotected abstract void setComponent(JComponent component)
protected abstract Object getComponentValue()
protected abstract void setComponentValue(Object value)
protected void addError(String error)
public boolean push()
Binding
push in interface Bindingpublic void addPropertyChangeListener(PropertyChangeListener pcl)
addPropertyChangeListener in interface Bindingpcl - PropertyChangeListener object to receive events when binding
properties changepublic void removePropertyChangeListener(PropertyChangeListener pcl)
removePropertyChangeListener in interface Bindingpcl - PropertyChangeListener object to receive events when binding
properties changepublic PropertyChangeListener[] getPropertyChangeListeners()
getPropertyChangeListeners in interface Binding
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||