|
JDatePicker v4.3.25 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.standbysoft.component.date.swing.dbswing.DBDateEditComponentDataBinder
public class DBDateEditComponentDataBinder
Maps the state of a JDateEditComponent DateSelectionModel
to a value in a DataSet date type Column.
JdbDateField automatically uses a DBDateEditComponentDataBinder,
and therefore it becomes a data-aware component.
There are two ways to hook up a JDateEditComponent to a
DBDateEditComponentDataBinder. The easier way is to set the
jDateEditComponent property to a JDateEditComponent
or a subclass of JDateEditComponent.
The second way is to make any component using a DateSelectionModel
data-aware by setting DBDateEditComponentDataBinder's dateSelectionModel
property to the component's model. Note that when you use this approach, you
are responsible for opening the DataSet before using it.
You must also set the DBDateEditComponentDataBinder's dataSet and
columnName properties to specify the DataSet
and Column from which the date edit component value (its current position)
is read and to which the date value is written.
If you set the jDateEditComponent property, DBDateEditComponentDataBinder
binds the background, foreground, and font properties
from those defined on Column columnName, if one exists. This
does not happen if these properties are set explicitly on
DBDateEditComponentDataBinder itself.
Example:
JDateField jDateField = new JDateField();
DBDateEditComponentDataBinder dBDateEditDataBinder = new DBDateEditComponentDataBinder();
// attach the date field to DBDateEditComponentDataBinder
dBDateEditDataBinder.setJDateEditComponent(jDateField);
// set the target DataSet and Column
dBDateEditDataBinder.setDataSet(dataSet);
dBDateEditDataBinder.setColumnName("Delivery")
JdbDateField,
Serialized Form| Field Summary |
|---|
| Fields inherited from interface com.borland.dbswing.DBDataBinder |
|---|
CLEAR_VALUE, DEFAULT, DISABLE_COMPONENT |
| Constructor Summary | |
|---|---|
DBDateEditComponentDataBinder()
Creates a default data binder. |
|
DBDateEditComponentDataBinder(JDateEditComponent dateEditComponent)
Creates a data binder and specifies the date edit component it makes data aware. |
|
| Method Summary | |
|---|---|
void |
accessChange(com.borland.dx.dataset.AccessEvent event)
|
void |
dataChanged(com.borland.dx.dataset.DataChangeEvent event)
|
void |
dateSelectionChanged(DateSelectionEvent evt)
Notifies that the selection of some dates has changed. |
void |
disabledDatesChanged(DateSelectionEvent evt)
Notifies that the set of dates that cannot be selected has changed. |
void |
disabledDateSelectionAttempted(DateSelectionEvent evt)
Notifies the attempt of selecting a disabled date (one that cannot be selected). |
void |
emptySelectionAllowedChanged(DateSelectionEvent evt)
Notifies that the permission of empty selection has changed. |
java.lang.String |
getColumnName()
Returns the column name of the DataSet from which values
are read and to which values are written. |
com.borland.dx.dataset.DataSet |
getDataSet()
Returns the DataSet from which values are read and to
which values are written. |
DateSelectionModel |
getDateSelectionModel()
Returns the model of the component that this binder makes data-aware. |
JDateEditComponent |
getJDateEditComponent()
Returns the date edit component to which this object binds to make it data-aware. |
void |
navigated(com.borland.dx.dataset.NavigationEvent event)
|
void |
postRow(com.borland.dx.dataset.DataChangeEvent event)
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
|
void |
selectionModeChanged(DateSelectionEvent evt)
Notifies that the selection mode has changed. |
void |
setColumnName(java.lang.String columnName)
Specifies the column name of the DataSet from which values are
read and to which values are written. |
void |
setDataSet(com.borland.dx.dataset.DataSet dataSet)
Sets the DataSet from which values are read and to which
values are written. |
void |
setDateSelectionModel(DateSelectionModel dateSelectionModel)
Specifies the date selection model of the component that this binder makes data-aware. |
void |
setJDateEditComponent(JDateEditComponent dateEditComponent)
Sets the date edit component to which this object binds to make it data-aware. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBDateEditComponentDataBinder()
public DBDateEditComponentDataBinder(JDateEditComponent dateEditComponent)
dateEditComponent - date edit component it makes data aware.| Method Detail |
|---|
public void setJDateEditComponent(JDateEditComponent dateEditComponent)
dateEditComponent - date edit component that this binder makes data-awaregetJDateEditComponent()public JDateEditComponent getJDateEditComponent()
setJDateEditComponent(JDateEditComponent)public void setDateSelectionModel(DateSelectionModel dateSelectionModel)
dateSelectionModel - model of the component that this object makes data-awaregetDateSelectionModel()public DateSelectionModel getDateSelectionModel()
setDateSelectionModel(DateSelectionModel)public void setDataSet(com.borland.dx.dataset.DataSet dataSet)
DataSet from which values are read and to which
values are written.
setDataSet in interface com.borland.dx.dataset.DataSetAwaredataSet - data set from which values are read and to which values are writtengetDataSet(),
setColumnName(String)public com.borland.dx.dataset.DataSet getDataSet()
DataSet from which values are read and to
which values are written.
getDataSet in interface com.borland.dx.dataset.DataSetAwaresetDataSet(DataSet),
getColumnName()public void setColumnName(java.lang.String columnName)
DataSet from which values are
read and to which values are written.
setColumnName in interface com.borland.dx.dataset.ColumnAwarecolumnName - DataSet column name from which values are
read and to which values are writtengetColumnName(),
setDataSet(DataSet)public java.lang.String getColumnName()
DataSet from which values
are read and to which values are written.
getColumnName in interface com.borland.dx.dataset.ColumnAwaresetColumnName(String),
getDataSet()public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpublic void dateSelectionChanged(DateSelectionEvent evt)
DateSelectionListener
dateSelectionChanged in interface DateSelectionListenerevt - event that describes the new selectionpublic void disabledDateSelectionAttempted(DateSelectionEvent evt)
DateSelectionListener
disabledDateSelectionAttempted in interface DateSelectionListenerevt - event that describes this actionpublic void disabledDatesChanged(DateSelectionEvent evt)
DateSelectionListener
disabledDatesChanged in interface DateSelectionListenerevt - event that describes this actionpublic void selectionModeChanged(DateSelectionEvent evt)
DateSelectionListener
selectionModeChanged in interface DateSelectionListenerevt - event that describes this actionpublic void emptySelectionAllowedChanged(DateSelectionEvent evt)
DateSelectionListener
emptySelectionAllowedChanged in interface DateSelectionListenerevt - event that describes this actionpublic void navigated(com.borland.dx.dataset.NavigationEvent event)
navigated in interface com.borland.dx.dataset.NavigationListenerpublic void dataChanged(com.borland.dx.dataset.DataChangeEvent event)
dataChanged in interface com.borland.dx.dataset.DataChangeListener
public void postRow(com.borland.dx.dataset.DataChangeEvent event)
throws java.lang.Exception
postRow in interface com.borland.dx.dataset.DataChangeListenerjava.lang.Exceptionpublic void accessChange(com.borland.dx.dataset.AccessEvent event)
accessChange in interface com.borland.dx.dataset.AccessListener
|
JDatePicker v4.3.25 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Visit www.jdatepicker.com for further information or send us your suggestions.
Copyright © 2003-2010 Elmro Ltd. All Rights Reserved.