| com.jgoodies.validation.tutorial.util.ExampleComponentFactory
ExampleComponentFactory | final public class ExampleComponentFactory extends BasicComponentFactory (Code) | | Consists only of static methods that vend formatted text fields used
to edit dates that are bound to an underlying ValueModel.
Extends the Binding library's BasicComponentFactory to inherit
all factory methods from that class.
author: Karsten Lentzsch version: $Revision: 1.10 $ See Also: com.jgoodies.binding.adapter.BasicComponentFactory See Also: com.jgoodies.binding.adapter.Bindings |
Method Summary | |
public static JFormattedTextField | createDateField(ValueModel valueModel) Creates and returns a formatted text field that is bound
to the Date value of the given ValueModel .
The JFormattedTextField is configured with an AbstractFormatter
that uses two different DateFormats to edit and display the Date.
A SHORT DateFormat with strict checking is used to edit
(parse) a date; the DateFormatter's default DateFormat is used to
display (format) a date. | public static JFormattedTextField | createDateField(ValueModel valueModel, boolean enableShortcuts) Creates and returns a formatted text field that is bound
to the Date value of the given ValueModel .
The JFormattedTextField is configured with an AbstractFormatter
that uses two different DateFormats to edit and display the Date.
A SHORT DateFormat with strict checking is used to edit
(parse) a date; the DateFormatter's default DateFormat is used to
display (format) a date. | public static JFormattedTextField | createDateField(ValueModel valueModel, boolean enableShortcuts, boolean commitsOnValidEdit) Creates and returns a formatted text field that is bound
to the Date value of the given ValueModel .
The JFormattedTextField is configured with an AbstractFormatter
that uses two different DateFormats to edit and display the Date.
A SHORT DateFormat with strict checking is used to edit
(parse) a date; the DateFormatter's default DateFormat is used to
display (format) a date. |
createDateField | public static JFormattedTextField createDateField(ValueModel valueModel)(Code) | | Creates and returns a formatted text field that is bound
to the Date value of the given ValueModel .
The JFormattedTextField is configured with an AbstractFormatter
that uses two different DateFormats to edit and display the Date.
A SHORT DateFormat with strict checking is used to edit
(parse) a date; the DateFormatter's default DateFormat is used to
display (format) a date. In both cases null Dates are
mapped to the empty String.
In addition to formatted Dates, the parser accepts positive and
negative integers and interprets them as Dates relative to today.
For example -1 is yesterday, 1 is tomorrow, and 7 is "in a week".
Yesterday, today, and tomorrow are displayed as these Strings,
not as formatted Dates.
Parameters: valueModel - the model that holds the value to be edited a formatted text field for Date instances that is bound throws: NullPointerException - if the model is null |
createDateField | public static JFormattedTextField createDateField(ValueModel valueModel, boolean enableShortcuts)(Code) | | Creates and returns a formatted text field that is bound
to the Date value of the given ValueModel .
The JFormattedTextField is configured with an AbstractFormatter
that uses two different DateFormats to edit and display the Date.
A SHORT DateFormat with strict checking is used to edit
(parse) a date; the DateFormatter's default DateFormat is used to
display (format) a date. In both cases null Dates are
mapped to the empty String.
In addition to formatted Dates, the parser accepts positive and
negative integers and interprets them as Dates relative to today.
For example -1 is yesterday, 1 is tomorrow, and 7 is "in a week".
If enableShortcuts is set to true ,
yesterday, today, and tomorrow are displayed as these Strings,
not as formatted Dates.
Parameters: valueModel - the model that holds the value to be edited Parameters: enableShortcuts - true to display yesterday, today, and tomorrowwith natural language strings a formatted text field for Date instances that is bound throws: NullPointerException - if the model is null |
createDateField | public static JFormattedTextField createDateField(ValueModel valueModel, boolean enableShortcuts, boolean commitsOnValidEdit)(Code) | | Creates and returns a formatted text field that is bound
to the Date value of the given ValueModel .
The JFormattedTextField is configured with an AbstractFormatter
that uses two different DateFormats to edit and display the Date.
A SHORT DateFormat with strict checking is used to edit
(parse) a date; the DateFormatter's default DateFormat is used to
display (format) a date. In both cases null Dates are
mapped to the empty String.
In addition to formatted Dates, the parser accepts positive and
negative integers and interprets them as Dates relative to today.
For example -1 is yesterday, 1 is tomorrow, and 7 is "in a week".
If enableShortcuts is set to true ,
yesterday, today, and tomorrow are displayed as these Strings,
not as formatted Dates.
Parameters: valueModel - the model that holds the value to be edited Parameters: enableShortcuts - true to display yesterday, today, and tomorrowwith natural language strings Parameters: commitsOnValidEdit - true to commit on valid edit,false to commit on focus lost a formatted text field for Date instances that is bound throws: NullPointerException - if the model is null |
|
|