public final class JTableBinding.ColumnBinding extends AbstractColumnBinding
ColumnBinding
represents a binding between a property of the elements
in the JTableBinding's
source List
, and a column in the table. Each
ColumnBinding
added to a JTableBinding
represents a column
to be displayed by the JTable
. A value for any given row in a column
is aquired by fetching the value of the associated ColumnBinding's
source property for the element in the source List
representing that row.
A Converter
may be specified on a ColumnBinding
, as may be
a Validator
. Validation occurs at the time a cell value is to be
committed back to the source List
.
BindingListeners
registered on
a ColumnBinding
are notified of successful sync
or
syncFailure
. These notifications are also sent to the
JTableBinding's
BindingListeners
.
ColumnBindings
are managed by their JTableBinding
. They are not
to be explicitly bound, unbound, added to a BindingGroup
, or accessed
in a way that is not allowed for a managed binding.
Binding.SyncFailure, Binding.SyncFailureType, Binding.ValueResult<V>
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getColumnClass()
Returns the column class to be used by
JTable to determine
the renderer and editor for the column represented by this
ColumnBinding . |
java.lang.String |
getColumnName()
Returns the name for the column represented by this
ColumnBinding . |
boolean |
isEditable()
Returns whether or not the cells of the column should be editable.
|
JTableBinding.ColumnBinding |
setColumnClass(java.lang.Class<?> columnClass)
Sets the column class to be used by
JTable to determine
the renderer and editor for the column represented by this
ColumnBinding . |
JTableBinding.ColumnBinding |
setColumnName(java.lang.String name)
Sets a name for the column represented by this
ColumnBinding . |
JTableBinding.ColumnBinding |
setEditable(boolean editable)
Sets whether or not the cells of the column should be editable.
|
bindImpl, getColumn, setColumn, unbindImpl
addBindingListener, addPropertyChangeListener, addPropertyChangeListener, bind, bindUnmanaged, firePropertyChange, getBindingListeners, getConverter, getName, getPropertyChangeListeners, getPropertyChangeListeners, getSourceNullValue, getSourceObject, getSourceProperty, getSourceUnreadableValue, getSourceValueForTarget, getTargetNullValue, getTargetObject, getTargetProperty, getTargetValueForSource, getValidator, isBound, isManaged, isSourceUnreadableValueSet, notifySynced, notifySyncFailed, paramString, refresh, refreshAndNotify, refreshAndNotifyUnmanaged, refreshUnmanaged, removeBindingListener, removePropertyChangeListener, removePropertyChangeListener, save, saveAndNotify, saveAndNotifyUnmanaged, saveUnmanaged, setConverter, setManaged, setSourceNullValue, setSourceObject, setSourceObjectUnmanaged, setSourceProperty, setSourceUnreadableValue, setTargetNullValue, setTargetObject, setTargetObjectUnmanaged, setTargetProperty, setValidator, sourceChangedImpl, targetChangedImpl, throwIfBound, throwIfManaged, throwIfUnbound, toString, unbind, unbindUnmanaged, unsetSourceUnreadableValue
public JTableBinding.ColumnBinding setColumnName(java.lang.String name)
ColumnBinding
.
This is used to initialize the table's column header name. If
null
is specified, the toString()
value of the
ColumnBinding's
source property is used.name
- the nameColumnBinding
itself, to allow for method chainingTableModel.getColumnName(int)
public JTableBinding.ColumnBinding setColumnClass(java.lang.Class<?> columnClass)
JTable
to determine
the renderer and editor for the column represented by this
ColumnBinding
.columnClass
- the column classColumnBinding
itself, to allow for method chainingTableModel.getColumnClass(int)
public java.lang.Class<?> getColumnClass()
JTable
to determine
the renderer and editor for the column represented by this
ColumnBinding
.setColumnClass(java.lang.Class<?>)
,
TableModel.getColumnClass(int)
public java.lang.String getColumnName()
ColumnBinding
.
This is used to initialize the table's column header name. If no name
has been specified, or if it has been set to null
, the
toString()
value of the ColumnBinding's
source property is returned.setColumnName(java.lang.String)
,
TableModel.getColumnName(int)
public JTableBinding.ColumnBinding setEditable(boolean editable)
true
.
See this paragraph in the class level
documentation on editability.editable
- whether or not the cells of the column should be editableColumnBinding
itself, to allow for method chainingpublic boolean isEditable()
true
.
See this paragraph in the class level
documentation on editability.