|
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.DefaultDateModel
com.standbysoft.component.date.swing.binding.DateEditComponentAdapter
public class DateEditComponentAdapter
Converts ValueModels to the DateModel interface.
Useful to bind JDateEditComponents
to a ValueModel.
Example:
ValueModel model = new PropertyAdapter(book, "published", date); JDateField publishedDateField = new JDateField(); publishedDateField.setDateModel(new DateEditComponentAdapter(model, publishedDateField.getdateModel())); publishedDateField.commitEdit();
| Field Summary |
|---|
| Fields inherited from class com.standbysoft.component.date.DefaultDateModel |
|---|
FIELDS |
| Constructor Summary | |
|---|---|
DateEditComponentAdapter(com.jgoodies.binding.value.ValueModel subject,
DateModel dateModel)
Constructs a DateEditComponentAdapter on the given subject for
the specified choice. |
|
| Method Summary | |
|---|---|
static void |
bind(JDateEditComponent dateEditComponent,
com.jgoodies.binding.value.ValueModel model)
Binds a date edit component to a specified value model. |
java.util.Date |
getDate()
Returns the date wrapped by this model. |
int |
getMaximumAllowed(int field,
java.util.Date date)
Returns the highest acceptable value for a certain field. |
int |
getMinimumAllowed(int field,
java.util.Date date)
Always returns 0. |
void |
setDate(java.util.Date date)
Specifies a new date to be represented by this model that can later be modified field by field. |
| Methods inherited from class com.standbysoft.component.date.DefaultDateModel |
|---|
addDateListener, clear, fireDateChanged, fireDateFieldChanged, fireDateFieldCleared, get, getAutoCenturyYear, getTimeZone, isAutoCentury, isDateValid, isSet, isUsed, removeDateListener, set, setAutoCentury, setAutoCenturyYear, setTimeZone, setUsed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateEditComponentAdapter(com.jgoodies.binding.value.ValueModel subject,
DateModel dateModel)
DateEditComponentAdapter on the given subject for
the specified choice.
subject - the subject that holds the valuedateModel - the date model of the date edit component that is bounded
java.lang.NullPointerException - if the subject is null| Method Detail |
|---|
public void setDate(java.util.Date date)
DateModelnull date will clear all the
basic fields like Calendar.YEAR, Calendar.MONTH,
Calendar.DATE, Calendar.HOUR, Calendar.MINUTE,
Calendar.SECOND and Calendar.MILLISECOND.
setDate in interface DateModelsetDate in class DefaultDateModeldate - date wrapped by the modelDateModel.clear(int)public java.util.Date getDate()
DateModelnull date is returned.
getDate in interface DateModelgetDate in class DefaultDateModelDefaultDateModel.isDateValid()
public int getMaximumAllowed(int field,
java.util.Date date)
DateModel
getMaximumAllowed in interface DateModelgetMaximumAllowed in class DefaultDateModelfield - field that is testeddate - context object that can offer additional information about the
other date fields
59
for the minute fieldDateModel.set(int, int)
public int getMinimumAllowed(int field,
java.util.Date date)
DefaultDateModel0. The minimum accepted value for this default
implementation is aloways 0.
getMinimumAllowed in interface DateModelgetMinimumAllowed in class DefaultDateModelfield - field that is testeddate - context object that can offer additional information about the
other date fields
0
for the minute fieldDateModel.set(int, int)
public static void bind(JDateEditComponent dateEditComponent,
com.jgoodies.binding.value.ValueModel model)
dateEditComponent - component that is binded to a value modelmodel - value model where the component is binded
|
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.