|
|||||||||
| Home >> All >> com >> jgoodies >> validation >> tutorial >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.jgoodies.validation.tutorial.util
Class ExampleComponentFactory

java.lang.ObjectBasicComponentFactory
com.jgoodies.validation.tutorial.util.ExampleComponentFactory
- public final class ExampleComponentFactory
- extends BasicComponentFactory
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 metods from that class.
- Version:
- $Revision: 1.5 $
| Constructor Summary | |
private |
ExampleComponentFactory()
|
| Method Summary | |
static javax.swing.JFormattedTextField |
createDateField(ValueModel valueModel)
Creates and returns a formatted text field that is bound to the Date value of the given ValueModel. |
static javax.swing.JFormattedTextField |
createDateField(ValueModel valueModel,
boolean enableShortcuts)
Creates and returns a formatted text field that is bound to the Date value of the given ValueModel. |
static javax.swing.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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
ExampleComponentFactory
private ExampleComponentFactory()
| Method Detail |
createDateField
public static javax.swing.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
SHORTDateFormat with strict checking is used to edit (parse) a date; the DateFormatter's default DateFormat is used to display (format) a date. In both casesnullDates 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.
createDateField
public static javax.swing.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
SHORTDateFormat with strict checking is used to edit (parse) a date; the DateFormatter's default DateFormat is used to display (format) a date. In both casesnullDates 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
enableShortcutsis set totrue, yesterday, today, and tomorrow are displayed as these Strings, not as formatted Dates.
createDateField
public static javax.swing.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
SHORTDateFormat with strict checking is used to edit (parse) a date; the DateFormatter's default DateFormat is used to display (format) a date. In both casesnullDates 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
enableShortcutsis set totrue, yesterday, today, and tomorrow are displayed as these Strings, not as formatted Dates.
|
|||||||||
| Home >> All >> com >> jgoodies >> validation >> tutorial >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
BasicComponentFactory