org.olat.core.gui.components.date
Class DateComponentFactory

java.lang.Object
  extended by org.olat.core.gui.components.date.DateComponentFactory

public class DateComponentFactory
extends java.lang.Object

Description:
Use this factory to create a simple date component that can display a date as a little calendar. Optionally the year can be enabled or disabled.

The component does not fire any events not can the date be changed using this component. Use the flexi form for this purpose. This is a display-only component.

Initial Date: 01.12.2009

Author:
gnaegi

Constructor Summary
DateComponentFactory()
           
 
Method Summary
static DateComponent createDateComponentWithoutYear(java.lang.String name, java.util.Date date, Container container)
          Create a date view that displays only the month and the day and no year.
static DateComponent createDateComponentWithYear(java.lang.String name, java.util.Date date, Container container)
          Create a date view that displays the year, month and day.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateComponentFactory

public DateComponentFactory()
Method Detail

createDateComponentWithYear

public static DateComponent createDateComponentWithYear(java.lang.String name,
                                                        java.util.Date date,
                                                        Container container)
Create a date view that displays the year, month and day.

Parameters:
name - the name of the component
date - the date to be displayed
container - the container or NULL if you add it yourself to your container
Returns:
the date component

createDateComponentWithoutYear

public static DateComponent createDateComponentWithoutYear(java.lang.String name,
                                                           java.util.Date date,
                                                           Container container)
Create a date view that displays only the month and the day and no year.

Parameters:
name - the name of the component
date - the date to be displayed
container - the container or NULL if you add it yourself to your container
Returns:
the date component