|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDatePM
The IDatePM
is the interface of PresentationModel
components
that contain a Date
value.
The date format used for formatting and pasring can be set by calling
setFormat(DateFormat)
. The default text format is Locale
dependent.
Method Summary | |
---|---|
java.util.Date |
getDate()
Returns the value of this PM as a Date . |
java.text.DateFormat |
getFormat()
Returns the date format used for parsing and converting between the text and date value. |
void |
setDate(java.util.Date date)
Sets the value of this PM to the given Date . |
void |
setFormat(java.text.DateFormat newFormat)
Sets the date format used for parsing and converting between the text and date value. |
Methods inherited from interface org.beanfabrics.model.ITextPM |
---|
getOptions, getText, isModified, preset, reformat, reset, setOptions, setText |
Methods inherited from interface org.beanfabrics.model.IValuePM |
---|
getDescription, getTitle, isEditable, isEmpty, isMandatory, setDescription, setEditable, setMandatory, setTitle |
Methods inherited from interface org.beanfabrics.Bean |
---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from interface org.beanfabrics.validation.Validatable |
---|
getValidationState, getValidator, isValid, revalidate |
Methods inherited from interface org.beanfabrics.support.Supportable |
---|
getSupportMap |
Methods inherited from interface org.beanfabrics.context.ContextOwner |
---|
getContext |
Methods inherited from interface org.beanfabrics.HasComparable |
---|
getComparable |
Method Detail |
---|
java.text.DateFormat getFormat()
void setFormat(java.text.DateFormat newFormat)
For example, to set a format with date and time component do:
DateFormat format = DateFormat.getDateTimeInstance(); format.setLenient(false); pm.setFormat(format);
Implementors must try to reformat the content to match the new format.
newFormat
- the new formatjava.util.Date getDate() throws ConversionException
Date
.
ConversionException
- if the text value of this PM cannot be
converted to a Date
using the defined formatvoid setDate(java.util.Date date)
Date
.
date
- the date value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |