com.l2fprod.common.beans.editor
Class JCalendarDatePropertyEditor

java.lang.Object
  extended by com.l2fprod.common.beans.editor.AbstractPropertyEditor
      extended by com.l2fprod.common.beans.editor.JCalendarDatePropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class JCalendarDatePropertyEditor
extends AbstractPropertyEditor

Date Property Editor based on toedter JCalendar component.


Field Summary
 
Fields inherited from class com.l2fprod.common.beans.editor.AbstractPropertyEditor
editor
 
Constructor Summary
JCalendarDatePropertyEditor()
          Constructor for JCalendarDatePropertyEditor
JCalendarDatePropertyEditor(java.util.Locale locale)
          Constructor for JCalendarDatePropertyEditor
JCalendarDatePropertyEditor(java.lang.String dateFormatString, java.util.Locale locale)
          Constructor for JCalendarDatePropertyEditor
 
Method Summary
 java.lang.String getAsText()
          Returns the Date formated with the locale and formatString set.
 java.lang.String getDateFormatString()
          Gets the date format string.
 java.util.Locale getLocale()
          Returns the Locale used.
 java.lang.Object getValue()
          Returns the Date of the Calendar
 void setDateFormatString(java.lang.String dateFormatString)
          Sets the date format string.
 void setLocale(java.util.Locale l)
          Sets the locale.
 void setValue(java.lang.Object value)
          Sets the Date of the Calendar
 
Methods inherited from class com.l2fprod.common.beans.editor.AbstractPropertyEditor
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, setAsText, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCalendarDatePropertyEditor

public JCalendarDatePropertyEditor()
Constructor for JCalendarDatePropertyEditor


JCalendarDatePropertyEditor

public JCalendarDatePropertyEditor(java.lang.String dateFormatString,
                                   java.util.Locale locale)
Constructor for JCalendarDatePropertyEditor

Parameters:
dateFormatString - string used to format the Date object, see: java.text.SimpleDateFormat
locale - Locale used to display the Date object

JCalendarDatePropertyEditor

public JCalendarDatePropertyEditor(java.util.Locale locale)
Constructor for JCalendarDatePropertyEditor

Parameters:
locale - Locale used to display the Date object
Method Detail

getValue

public java.lang.Object getValue()
Returns the Date of the Calendar

Specified by:
getValue in interface java.beans.PropertyEditor
Overrides:
getValue in class AbstractPropertyEditor
Returns:
the date choosed as a java.util.Date b> object or null is the date is not set

setValue

public void setValue(java.lang.Object value)
Sets the Date of the Calendar

Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class AbstractPropertyEditor
Parameters:
value - the Date object

getAsText

public java.lang.String getAsText()
Returns the Date formated with the locale and formatString set.

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class AbstractPropertyEditor
Returns:
the choosen Date as String

setDateFormatString

public void setDateFormatString(java.lang.String dateFormatString)
Sets the date format string. E.g "MMMMM d, yyyy" will result in "July 21, 2004" if this is the selected date and locale is English.

Parameters:
dateFormatString - The dateFormatString to set.

getDateFormatString

public java.lang.String getDateFormatString()
Gets the date format string.

Returns:
Returns the dateFormatString.

setLocale

public void setLocale(java.util.Locale l)
Sets the locale.

Parameters:
l - The new locale value

getLocale

public java.util.Locale getLocale()
Returns the Locale used.

Returns:
the Locale object