org.jdesktop.binding.swingx
Class DirectTableBinding
java.lang.Object
org.jdesktop.binding.swingx.AbstractBinding
org.jdesktop.binding.swingx.DirectTableBinding
- All Implemented Interfaces:
- Binding
public class DirectTableBinding
- extends AbstractBinding
This "Binding" happens to the given DataModel as a whole (as
opposed to a single field of the model).
JW: added mapping of row indices. (TBD: unit testing of mapping).
- Author:
- Richard Bair
Method Summary |
protected javax.swing.table.TableModel |
createAdapter(TabularDataModel tabularDataModel,
java.lang.String[] fieldNames)
|
protected javax.swing.JComponent |
getBoundComponent()
|
javax.swing.JComponent |
getComponent()
|
protected java.lang.Object |
getComponentValue()
|
protected void |
installDataModel(DataModel dataModel,
java.lang.String fieldName)
override super because we don't have MetaData. |
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 |
setBoundComponent(javax.swing.JComponent component)
|
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, installDataModelListener, installInputVerifier, installMetaDataListener, isEmpty, isModified, removePropertyChangeListener, setModified, setValidationPolicy, setValidState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectTableBinding
public DirectTableBinding(javax.swing.JTable component,
TabularDataModel dataModel)
- Parameters:
component
- dataModel
-
DirectTableBinding
public DirectTableBinding(javax.swing.JTable component,
TabularDataModel dataModel,
java.lang.String[] fieldNames)
DirectTableBinding
public DirectTableBinding(javax.swing.JTable component,
TabularDataModel dataModel,
java.lang.String[] fieldNames,
SelectionModel selectionModel)
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
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
createAdapter
protected javax.swing.table.TableModel createAdapter(TabularDataModel tabularDataModel,
java.lang.String[] fieldNames)
getBoundComponent
protected javax.swing.JComponent getBoundComponent()
setBoundComponent
protected void setBoundComponent(javax.swing.JComponent component)
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
installDataModel
protected void installDataModel(DataModel dataModel,
java.lang.String fieldName)
- override super because we don't have MetaData.
- Overrides:
installDataModel
in class AbstractBinding
getComponent
public javax.swing.JComponent getComponent()
setComponent
public 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
Copyright © 2005 Sun Microsystems All Rights Reserved.