Class com.symantec.itools.swing.DateMaskFormatter
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.symantec.itools.swing.DateMaskFormatter

Object
   |
   +----com.symantec.itools.swing.DateMaskFormatter

public class DateMaskFormatter
extends Object
implements Serializable
DateMaskFormatter is like a factory class which can be used to get the date formatter based on the current locale, type and formatting style. It delegates all the work to DateFormat factory methods.

Version:
1.0
Author:
Vasudev J. Rao
See Also:
DateFormat, JMaskedTextField

Constructor Index

 o com.symantec.itools.swing.DateMaskFormatter()

Method Index

 o getDateInstance(int)
Get an instance of date formatter for the given style.
 o getDateTimeInstance(int)
Get an instance of timestamp formatter for the given style.
 o getInstance(int, int)
Get an instance of date formatter for the given type and style.
 o getTimeInstance(int)
Get an instance of time formatter for the given style.

Constructors

 o DateMaskFormatter
public DateMaskFormatter()

Methods

 o getDateInstance
public java.text.DateFormat getDateInstance(int style)
Get an instance of date formatter for the given style.

Parameters:
style - the given formatting style. For example, SHORT for "M/d/yy" in the US locale.
Returns:
a date formatter.
See Also:
getDateInstance(int)
 o getDateTimeInstance
public java.text.DateFormat getDateTimeInstance(int style)
Get an instance of timestamp formatter for the given style.

Parameters:
style - the given formatting style.
Returns:
a date/time formatter.
See Also:
getDateTimeInstance(int,int)
 o getInstance
public java.text.DateFormat getInstance(int type,
                                        int style)
Get an instance of date formatter for the given type and style. Type can be one of DateMaskedFieldConstants.DATE_TYPE, TIME_TYPE or TIMESTAMP_TYPE.

Parameters:
type - the given type.
style - the given formatting style.
Returns:
a date/time formatter.
 o getTimeInstance
public java.text.DateFormat getTimeInstance(int style)
Get an instance of time formatter for the given style.

Parameters:
style - the given formatting style.
Returns:
a time formatter.
See Also:
getTimeInstance(int)

All Packages  Class Hierarchy  This Package  Previous  Next  Index