Class DefaultCalendarView
- 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.DatePickerComponent
-
- com.google.gwt.user.datepicker.client.CalendarView
-
- com.google.gwt.user.datepicker.client.DefaultCalendarView
-
- All Implemented Interfaces:
HasAttachHandlers,HasHandlers,EventListener,HasVisibility,IsRenderable,IsWidget
public final class DefaultCalendarView extends CalendarView
Simple calendar view. Not extensible as we wish to evolve it freely over time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classDefaultCalendarView.CellGridCell grid.-
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
Constructors Constructor Description DefaultCalendarView()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStyleToDate(java.lang.String styleName, java.util.Date date)Adds a style name to the cell of the supplied date.java.util.DategetFirstDate()Returns the first date that is currently shown by the calendar.java.util.DategetLastDate()Returns the last date that is currently shown by the calendar.booleanisDateEnabled(java.util.Date d)Is the cell representing the given date enabled?voidrefresh()Refresh the component.voidremoveStyleFromDate(java.lang.String styleName, java.util.Date date)Removes a visible style name from the cell of the supplied date.voidsetAriaSelectedCell(java.util.Date date)Sets aria-selected in the given date's cell and clears the other cells.voidsetEnabledOnDate(boolean enabled, java.util.Date date)Enables or Disables a particular date.voidsetup()Set up the component.-
Methods inherited from class com.google.gwt.user.datepicker.client.CalendarView
setHighlightedDate
-
Methods inherited from class com.google.gwt.user.datepicker.client.DatePickerComponent
addMonths, css, getDatePicker, getModel, refreshAll, setDatePicker
-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Method Detail
-
addStyleToDate
public void addStyleToDate(java.lang.String styleName, java.util.Date date)Description copied from class:CalendarViewAdds a style name to the cell of the supplied date. This style is only set until the next time theCalendarViewis refreshed.- Specified by:
addStyleToDatein classCalendarView- Parameters:
styleName- style name to adddate- date that will have the supplied style added
-
getFirstDate
public java.util.Date getFirstDate()
Description copied from class:CalendarViewReturns the first date that is currently shown by the calendar.- Specified by:
getFirstDatein classCalendarView- Returns:
- the first date.
-
getLastDate
public java.util.Date getLastDate()
Description copied from class:CalendarViewReturns the last date that is currently shown by the calendar.- Specified by:
getLastDatein classCalendarView- Returns:
- the last date.
-
isDateEnabled
public boolean isDateEnabled(java.util.Date d)
Description copied from class:CalendarViewIs the cell representing the given date enabled?- Specified by:
isDateEnabledin classCalendarView- Parameters:
d- the date- Returns:
- is the date enabled
-
refresh
public void refresh()
Description copied from class:DatePickerComponentRefresh the component. Usually called because the model's current date has changed. In general, only should be called byDatePicker. Use refreshAll() if you need to refresh all components.- Specified by:
refreshin classDatePickerComponent
-
removeStyleFromDate
public void removeStyleFromDate(java.lang.String styleName, java.util.Date date)Description copied from class:CalendarViewRemoves a visible style name from the cell of the supplied date.- Specified by:
removeStyleFromDatein classCalendarView- Parameters:
styleName- style name to removedate- date that will have the supplied style added
-
setAriaSelectedCell
public void setAriaSelectedCell(java.util.Date date)
Description copied from class:CalendarViewSets aria-selected in the given date's cell and clears the other cells.- Overrides:
setAriaSelectedCellin classCalendarView- Parameters:
date- the date of the cell where aria-selected should be set, or null to clear aria-selected.
-
setEnabledOnDate
public void setEnabledOnDate(boolean enabled, java.util.Date date)Description copied from class:CalendarViewEnables or Disables a particular date. by default all valid dates are enabled after a rendering event. Disabled dates cannot be selected.- Specified by:
setEnabledOnDatein classCalendarView- Parameters:
enabled- true for enabled, false for disableddate- date to enable or disable
-
setup
public void setup()
Description copied from class:DatePickerComponentSet up the component.- Specified by:
setupin classDatePickerComponent
-
-