com.google.gwt.user.datepicker.client
Class CalendarView

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.google.gwt.user.datepicker.client.CalendarView
All Implemented Interfaces:
HasHandlers, EventListener
Direct Known Subclasses:
DefaultCalendarView

public abstract class CalendarView
extends Composite

The CalendarView is a calendar grid that represents the current view of a DatePicker. Note, the calendar view only deals with the currently visible dates and all state is flushed when the calendar view is refreshed.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
CalendarView()
          Constructor.
 
Method Summary
abstract  void addStyleToDate(java.lang.String styleName, java.util.Date date)
          Adds a style name to the cell of the supplied date.
abstract  java.util.Date getFirstDate()
          Returns the first date that is currently shown by the calendar.
abstract  java.util.Date getLastDate()
          Returns the last date that is currently shown by the calendar.
 CalendarModel getModel()
           
abstract  boolean isDateEnabled(java.util.Date date)
          Is the cell representing the given date enabled?
abstract  void removeStyleFromDate(java.lang.String styleName, java.util.Date date)
          Removes a visible style name from the cell of the supplied date.
abstract  void setEnabledOnDate(boolean enabled, java.util.Date date)
          Enables or Disables a particular date.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
isAttached, onBrowserEvent
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
fireEvent, getLayoutData, getParent, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalendarView

public CalendarView()
Constructor.

Method Detail

addStyleToDate

public abstract void addStyleToDate(java.lang.String styleName,
                                    java.util.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

getFirstDate

public abstract java.util.Date getFirstDate()
Returns the first date that is currently shown by the calendar.

Returns:
the first date.

getLastDate

public abstract java.util.Date getLastDate()
Returns the last date that is currently shown by the calendar.

Returns:
the last date.

isDateEnabled

public abstract boolean isDateEnabled(java.util.Date date)
Is the cell representing the given date enabled?

Parameters:
date - the date
Returns:
is the date enabled

removeStyleFromDate

public abstract void removeStyleFromDate(java.lang.String styleName,
                                         java.util.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

setEnabledOnDate

public abstract void setEnabledOnDate(boolean enabled,
                                      java.util.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

getModel

public CalendarModel getModel()