public final class

DefaultCalendarView

extends CalendarView
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.Composite
         ↳ com.google.gwt.user.datepicker.client.CalendarView
           ↳ com.google.gwt.user.datepicker.client.DefaultCalendarView

Class Overview

Simple calendar view. Not extensible as we wish to evolve it freely over time.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
DefaultCalendarView()
Constructor.
Public Methods
void addStyleToDate(String styleName, Date date)
Adds a style name to the cell of the supplied date.
Date getFirstDate()
Returns the first date that is currently shown by the calendar.
Date getLastDate()
Returns the last date that is currently shown by the calendar.
boolean isDateEnabled(Date d)
Is the cell representing the given date enabled?
void refresh()
Refresh the component.
void removeStyleFromDate(String styleName, Date date)
Removes a visible style name from the cell of the supplied date.
void setEnabledOnDate(boolean enabled, Date date)
Enables or Disables a particular date.
void setup()
Set up the component.
[Expand]
Inherited Methods
From class com.google.gwt.user.datepicker.client.CalendarView
From class com.google.gwt.user.client.ui.Composite
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.ui.IsWidget

Public Constructors

public DefaultCalendarView ()

Constructor.

Public Methods

public void addStyleToDate (String styleName, Date date)

Adds a style name to the cell of the supplied date. This style is only set until the next time the CalendarView is refreshed.

Parameters
styleName style name to add
date date that will have the supplied style added

public Date getFirstDate ()

Returns the first date that is currently shown by the calendar.

Returns
  • the first date.

public Date getLastDate ()

Returns the last date that is currently shown by the calendar.

Returns
  • the last date.

public boolean isDateEnabled (Date d)

Is the cell representing the given date enabled?

Parameters
d the date
Returns
  • is the date enabled

public void refresh ()

Refresh the component. Usually called because the model's current date has changed. In general, only should be called by DatePicker. Use refreshAll() if you need to refresh all components.

public void removeStyleFromDate (String styleName, Date date)

Removes a visible style name from the cell of the supplied date.

Parameters
styleName style name to remove
date date that will have the supplied style added

public void setEnabledOnDate (boolean enabled, Date date)

Enables or Disables a particular date. by default all valid dates are enabled after a rendering event. Disabled dates cannot be selected.

Parameters
enabled true for enabled, false for disabled
date date to enable or disable

public void setup ()

Set up the component.