com.smartgwt.client.widgets
Class DateChooser

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.smartgwt.client.widgets.BaseWidget
              extended by com.smartgwt.client.widgets.Canvas
                  extended by com.smartgwt.client.widgets.DateChooser
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, IsWidget, HasClickHandlers, HasDataChangedHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers

public class DateChooser
extends Canvas
implements HasDataChangedHandlers

Simple interactive calendar interface used to pick a date. Used by the DateItem class.


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.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet, scClassName
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DateChooser()
           
DateChooser(JavaScriptObject jsObj)
           
 
Method Summary
 HandlerRegistration addDataChangedHandler(DataChangedHandler handler)
          Add a dataChanged handler.
 void cancelClick()
          Fired when the user clicks the cancel button in this date chooser.
protected  JavaScriptObject create()
           
 String getAlternateStyleSuffix()
          The text appended to the style name when using alternateWeekStyles.
 Boolean getAlternateWeekStyles()
          Whether alternating weeks should be drawn in alternating styles.
 String getBaseBottomButtonStyle()
          CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel").
 String getBaseButtonStyle()
          Base css style applied to this picker's buttons.
 String getBaseNavButtonStyle()
          CSS style to apply to navigation buttons and date display at the top of the component.
 String getBaseWeekdayStyle()
          Base css style applied to weekdays.
 String getBaseWeekendStyle()
          Base css style applied to weekends.
 String getCancelButtonTitle()
          Title for the cancellation button.
 Date getData()
          Get the current value of the picker.
 int getDayNameLength()
          How long (how many characters) shxxould be day names be.
 Boolean getDisableWeekends()
          Whether it should be valid to pick a weekend day.
 int getEndYear()
          Last year that may be selected.
 int getFirstDayOfWeek()
          Day of the week to show in the first column.
 int getHeaderHeight()
          Height of the header area (containing the next/previous month & year buttons) in pixels
 String getHeaderStyle()
          CSS style applied to the day-of-week headers.
 String getMonthMenuStyle()
          Style for the pop-up year menu.
 String getNextMonthIcon()
          Icon for the next month button
 int getNextMonthIconHeight()
          Height of the icon for the next month button
 int getNextMonthIconWidth()
          Width of the icon for the next month button
 String getNextYearIcon()
          Icon for the next year button
 int getNextYearIconHeight()
          Height of the icon for the next year button
 int getNextYearIconWidth()
          Width of the icon for the next year button
static DateChooser getOrCreateRef(JavaScriptObject jsObj)
           
 String getPrevMonthIcon()
          Icon for the previous month button
 int getPrevMonthIconHeight()
          Height of the icon for the previous month button
 int getPrevMonthIconWidth()
          Width of the icon for the previous month button
 String getPrevYearIcon()
          Icon for the previous year button
 int getPrevYearIconHeight()
          Height of the icon for the previous year button
 int getPrevYearIconWidth()
          Width of the icon for the previous year button
 Boolean getShowCancelButton()
          Determines whether the "Cancel" button will be displayed.
 Boolean getShowTodayButton()
          Determines whether the "Today" button will be displayed, allowing the user to select the current date.
 Boolean getShowWeekends()
          Whether weekend days should be shown.
 String getSkinImgDir()
          Overridden directory where images for this widget (such as the month and year button icons) may be found.
 int getStartYear()
          Earliest year that may be selected.
 Integer getTodayButtonHeight()
          If set specifies a fixed height for the Today and Cancel buttons.
 String getTodayButtonTitle()
          Title for "Today" button.
 String getWeekendHeaderStyle()
          Optional CSS style applied to the day-of-week headers for weekend days.
 String getYearMenuStyle()
          Style for the pop-up year menu.
 void setAlternateStyleSuffix(String alternateStyleSuffix)
          The text appended to the style name when using alternateWeekStyles.
 void setAlternateWeekStyles(Boolean alternateWeekStyles)
          Whether alternating weeks should be drawn in alternating styles.
 void setBaseBottomButtonStyle(String baseBottomButtonStyle)
          CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel").
 void setBaseButtonStyle(String baseButtonStyle)
          Base css style applied to this picker's buttons.
 void setBaseNavButtonStyle(String baseNavButtonStyle)
          CSS style to apply to navigation buttons and date display at the top of the component.
 void setBaseWeekdayStyle(String baseWeekdayStyle)
          Base css style applied to weekdays.
 void setBaseWeekendStyle(String baseWeekendStyle)
          Base css style applied to weekends.
 void setCancelButtonTitle(String cancelButtonTitle)
          Title for the cancellation button.
 void setData(Date date)
          Set the picker to show the given date.
 void setDayNameLength(int dayNameLength)
          How long (how many characters) shxxould be day names be.
static void setDefaultProperties(DateChooser dateChooserProperties)
          Class level method to set the default properties of this class.
 void setDisableWeekends(Boolean disableWeekends)
          Whether it should be valid to pick a weekend day.
 void setEndYear(int endYear)
          Last year that may be selected.
 void setFirstDayOfWeek(int firstDayOfWeek)
          Day of the week to show in the first column.
 void setHeaderHeight(int headerHeight)
          Height of the header area (containing the next/previous month & year buttons) in pixels
 void setHeaderStyle(String headerStyle)
          CSS style applied to the day-of-week headers.
 void setMonthMenuStyle(String monthMenuStyle)
          Style for the pop-up year menu.
 void setNextMonthIcon(String nextMonthIcon)
          Icon for the next month button
 void setNextMonthIconHeight(int nextMonthIconHeight)
          Height of the icon for the next month button
 void setNextMonthIconWidth(int nextMonthIconWidth)
          Width of the icon for the next month button
 void setNextYearIcon(String nextYearIcon)
          Icon for the next year button
 void setNextYearIconHeight(int nextYearIconHeight)
          Height of the icon for the next year button
 void setNextYearIconWidth(int nextYearIconWidth)
          Width of the icon for the next year button
 void setPrevMonthIcon(String prevMonthIcon)
          Icon for the previous month button
 void setPrevMonthIconHeight(int prevMonthIconHeight)
          Height of the icon for the previous month button
 void setPrevMonthIconWidth(int prevMonthIconWidth)
          Width of the icon for the previous month button
 void setPrevYearIcon(String prevYearIcon)
          Icon for the previous year button
 void setPrevYearIconHeight(int prevYearIconHeight)
          Height of the icon for the previous year button
 void setPrevYearIconWidth(int prevYearIconWidth)
          Width of the icon for the previous year button
 void setShowCancelButton(Boolean showCancelButton)
          Determines whether the "Cancel" button will be displayed.
 void setShowTodayButton(Boolean showTodayButton)
          Determines whether the "Today" button will be displayed, allowing the user to select the current date.
 void setShowWeekends(Boolean showWeekends)
          Whether weekend days should be shown.
 void setSkinImgDir(String skinImgDir)
          Overridden directory where images for this widget (such as the month and year button icons) may be found.
 void setStartYear(int startYear)
          Earliest year that may be selected.
 void setTodayButtonHeight(Integer todayButtonHeight)
          If set specifies a fixed height for the Today and Cancel buttons.
 void setTodayButtonTitle(String todayButtonTitle)
          Title for "Today" button.
 void setWeekendHeaderStyle(String weekendHeaderStyle)
          Optional CSS style applied to the day-of-week headers for weekend days.
 void setYearMenuStyle(String yearMenuStyle)
          Style for the pop-up year menu.
 void todayClick()
          Fired when the user clicks the Today button.
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, convertToCanvasArray, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getExtraSpace, getFacetId, getFullDataPath, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPercentBox, getPosition, getPrefix, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, getTopAsString, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onInit, parentResized, printComponents, redraw, redraw, removeChild, removeChild, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setCanvasItem, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setFacetId, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentElement, setPercentBox, setPosition, setPrefix, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hashCode, isConfigOnly, isCreated, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

DateChooser

public DateChooser()

DateChooser

public DateChooser(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static DateChooser getOrCreateRef(JavaScriptObject jsObj)

create

protected JavaScriptObject create()
Overrides:
create in class Canvas

setAlternateStyleSuffix

public void setAlternateStyleSuffix(String alternateStyleSuffix)
The text appended to the style name when using alternateWeekStyles.

Parameters:
alternateStyleSuffix - alternateStyleSuffix Default value is "Dark"

getAlternateStyleSuffix

public String getAlternateStyleSuffix()
The text appended to the style name when using alternateWeekStyles.

Returns:
String

setAlternateWeekStyles

public void setAlternateWeekStyles(Boolean alternateWeekStyles)
Whether alternating weeks should be drawn in alternating styles. If enabled, the cell style for alternate rows will have alternateStyleSuffix appended to it.

Parameters:
alternateWeekStyles - alternateWeekStyles Default value is null

getAlternateWeekStyles

public Boolean getAlternateWeekStyles()
Whether alternating weeks should be drawn in alternating styles. If enabled, the cell style for alternate rows will have alternateStyleSuffix appended to it.

Returns:
Boolean

setBaseBottomButtonStyle

public void setBaseBottomButtonStyle(String baseBottomButtonStyle)
CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel"). If null, the CSS style specified in baseButtonStyle is used.

Parameters:
baseBottomButtonStyle - baseBottomButtonStyle Default value is null

getBaseBottomButtonStyle

public String getBaseBottomButtonStyle()
CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel"). If null, the CSS style specified in baseButtonStyle is used.

Returns:
String

setBaseButtonStyle

public void setBaseButtonStyle(String baseButtonStyle)
Base css style applied to this picker's buttons. Will have "Over", "Selected" and "Down" suffix appended as the user interacts with buttons.

Parameters:
baseButtonStyle - baseButtonStyle Default value is "dateChooserButton"

getBaseButtonStyle

public String getBaseButtonStyle()
Base css style applied to this picker's buttons. Will have "Over", "Selected" and "Down" suffix appended as the user interacts with buttons.

Returns:
String

setBaseNavButtonStyle

public void setBaseNavButtonStyle(String baseNavButtonStyle)
CSS style to apply to navigation buttons and date display at the top of the component. If null, the CSS style specified in baseButtonStyle is used.

Parameters:
baseNavButtonStyle - baseNavButtonStyle Default value is null

getBaseNavButtonStyle

public String getBaseNavButtonStyle()
CSS style to apply to navigation buttons and date display at the top of the component. If null, the CSS style specified in baseButtonStyle is used.

Returns:
String

setBaseWeekdayStyle

public void setBaseWeekdayStyle(String baseWeekdayStyle)
Base css style applied to weekdays. Will have "Over", "Selected" and "Down" suffix appended as the user interacts with buttons. Defaults to baseButtonStyle.

Parameters:
baseWeekdayStyle - baseWeekdayStyle Default value is null

getBaseWeekdayStyle

public String getBaseWeekdayStyle()
Base css style applied to weekdays. Will have "Over", "Selected" and "Down" suffix appended as the user interacts with buttons. Defaults to baseButtonStyle.

Returns:
String

setBaseWeekendStyle

public void setBaseWeekendStyle(String baseWeekendStyle)
Base css style applied to weekends. Will have "Over", "Selected" and "Down" suffix appended as the user interacts with buttons. Defaults to baseWeekdayStyle.

Parameters:
baseWeekendStyle - baseWeekendStyle Default value is null

getBaseWeekendStyle

public String getBaseWeekendStyle()
Base css style applied to weekends. Will have "Over", "Selected" and "Down" suffix appended as the user interacts with buttons. Defaults to baseWeekdayStyle.

Returns:
String

setCancelButtonTitle

public void setCancelButtonTitle(String cancelButtonTitle)
Title for the cancellation button.

Parameters:
cancelButtonTitle - cancelButtonTitle Default value is "Cancel"

getCancelButtonTitle

public String getCancelButtonTitle()
Title for the cancellation button.

Returns:
String

setDayNameLength

public void setDayNameLength(int dayNameLength)
                      throws IllegalStateException
How long (how many characters) shxxould be day names be. May be 1, 2 or 3 characters.

Parameters:
dayNameLength - dayNameLength Default value is 2
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getDayNameLength

public int getDayNameLength()
How long (how many characters) shxxould be day names be. May be 1, 2 or 3 characters.

Returns:
int

setDisableWeekends

public void setDisableWeekends(Boolean disableWeekends)
                        throws IllegalStateException
Whether it should be valid to pick a weekend day. If set to true, weekend days appear in disabled style and cannot be picked.

Which days are considered weekends is controlled by weekendDays.

Parameters:
disableWeekends - disableWeekends Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getDisableWeekends

public Boolean getDisableWeekends()
Whether it should be valid to pick a weekend day. If set to true, weekend days appear in disabled style and cannot be picked.

Which days are considered weekends is controlled by weekendDays.

Returns:
Boolean

setEndYear

public void setEndYear(int endYear)
                throws IllegalStateException
Last year that may be selected.

Parameters:
endYear - endYear Default value is 2015
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getEndYear

public int getEndYear()
Last year that may be selected.

Returns:
int

setFirstDayOfWeek

public void setFirstDayOfWeek(int firstDayOfWeek)
                       throws IllegalStateException
Day of the week to show in the first column. 0=Sunday, 1=Monday, ..., 6=Saturday.

Parameters:
firstDayOfWeek - firstDayOfWeek Default value is 0
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Appearance overview and related methods

getFirstDayOfWeek

public int getFirstDayOfWeek()
Day of the week to show in the first column. 0=Sunday, 1=Monday, ..., 6=Saturday.

Returns:
int
See Also:
Appearance overview and related methods

setHeaderHeight

public void setHeaderHeight(int headerHeight)
                     throws IllegalStateException
Height of the header area (containing the next/previous month & year buttons) in pixels

Parameters:
headerHeight - headerHeight Default value is 20
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getHeaderHeight

public int getHeaderHeight()
Height of the header area (containing the next/previous month & year buttons) in pixels

Returns:
int

setHeaderStyle

public void setHeaderStyle(String headerStyle)
CSS style applied to the day-of-week headers. By default this applies to all days of the week. To apply a separate style to weekend headers, set weekendHeaderStyle

Parameters:
headerStyle - headerStyle Default value is "dateChooserButtonDisabled"

getHeaderStyle

public String getHeaderStyle()
CSS style applied to the day-of-week headers. By default this applies to all days of the week. To apply a separate style to weekend headers, set weekendHeaderStyle

Returns:
String

setMonthMenuStyle

public void setMonthMenuStyle(String monthMenuStyle)
                       throws IllegalStateException
Style for the pop-up year menu.

Parameters:
monthMenuStyle - monthMenuStyle Default value is "dateChooserMonthMenu"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getMonthMenuStyle

public String getMonthMenuStyle()
Style for the pop-up year menu.

Returns:
String

setNextMonthIcon

public void setNextMonthIcon(String nextMonthIcon)
Icon for the next month button

Parameters:
nextMonthIcon - nextMonthIcon Default value is "[SKIN]arrow_right.gif"

getNextMonthIcon

public String getNextMonthIcon()
Icon for the next month button

Returns:
String

setNextMonthIconHeight

public void setNextMonthIconHeight(int nextMonthIconHeight)
Height of the icon for the next month button

Parameters:
nextMonthIconHeight - nextMonthIconHeight Default value is 7

getNextMonthIconHeight

public int getNextMonthIconHeight()
Height of the icon for the next month button

Returns:
int

setNextMonthIconWidth

public void setNextMonthIconWidth(int nextMonthIconWidth)
Width of the icon for the next month button

Parameters:
nextMonthIconWidth - nextMonthIconWidth Default value is 7

getNextMonthIconWidth

public int getNextMonthIconWidth()
Width of the icon for the next month button

Returns:
int

setNextYearIcon

public void setNextYearIcon(String nextYearIcon)
                     throws IllegalStateException
Icon for the next year button

Parameters:
nextYearIcon - nextYearIcon Default value is "[SKIN]doubleArrow_right.gif"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
com.smartgwt.client.widgets.DateChooser#setShowDoubleYearIcon

getNextYearIcon

public String getNextYearIcon()
Icon for the next year button

Returns:
String
See Also:
com.smartgwt.client.widgets.DateChooser#getShowDoubleYearIcon

setNextYearIconHeight

public void setNextYearIconHeight(int nextYearIconHeight)
Height of the icon for the next year button

Parameters:
nextYearIconHeight - nextYearIconHeight Default value is 7

getNextYearIconHeight

public int getNextYearIconHeight()
Height of the icon for the next year button

Returns:
int

setNextYearIconWidth

public void setNextYearIconWidth(int nextYearIconWidth)
                          throws IllegalStateException
Width of the icon for the next year button

Parameters:
nextYearIconWidth - nextYearIconWidth Default value is 14
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getNextYearIconWidth

public int getNextYearIconWidth()
Width of the icon for the next year button

Returns:
int

setPrevMonthIcon

public void setPrevMonthIcon(String prevMonthIcon)
                      throws IllegalStateException
Icon for the previous month button

Parameters:
prevMonthIcon - prevMonthIcon Default value is "[SKIN]arrow_left.gif"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getPrevMonthIcon

public String getPrevMonthIcon()
Icon for the previous month button

Returns:
String

setPrevMonthIconHeight

public void setPrevMonthIconHeight(int prevMonthIconHeight)
                            throws IllegalStateException
Height of the icon for the previous month button

Parameters:
prevMonthIconHeight - prevMonthIconHeight Default value is 7
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getPrevMonthIconHeight

public int getPrevMonthIconHeight()
Height of the icon for the previous month button

Returns:
int

setPrevMonthIconWidth

public void setPrevMonthIconWidth(int prevMonthIconWidth)
                           throws IllegalStateException
Width of the icon for the previous month button

Parameters:
prevMonthIconWidth - prevMonthIconWidth Default value is 7
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getPrevMonthIconWidth

public int getPrevMonthIconWidth()
Width of the icon for the previous month button

Returns:
int

setPrevYearIcon

public void setPrevYearIcon(String prevYearIcon)
                     throws IllegalStateException
Icon for the previous year button

Parameters:
prevYearIcon - prevYearIcon Default value is "[SKIN]doubleArrow_left.gif"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
com.smartgwt.client.widgets.DateChooser#setShowDoubleYearIcon

getPrevYearIcon

public String getPrevYearIcon()
Icon for the previous year button

Returns:
String
See Also:
com.smartgwt.client.widgets.DateChooser#getShowDoubleYearIcon

setPrevYearIconHeight

public void setPrevYearIconHeight(int prevYearIconHeight)
                           throws IllegalStateException
Height of the icon for the previous year button

Parameters:
prevYearIconHeight - prevYearIconHeight Default value is 7
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getPrevYearIconHeight

public int getPrevYearIconHeight()
Height of the icon for the previous year button

Returns:
int

setPrevYearIconWidth

public void setPrevYearIconWidth(int prevYearIconWidth)
                          throws IllegalStateException
Width of the icon for the previous year button

Parameters:
prevYearIconWidth - prevYearIconWidth Default value is 14
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getPrevYearIconWidth

public int getPrevYearIconWidth()
Width of the icon for the previous year button

Returns:
int

setShowCancelButton

public void setShowCancelButton(Boolean showCancelButton)
Determines whether the "Cancel" button will be displayed.

Parameters:
showCancelButton - showCancelButton Default value is false

getShowCancelButton

public Boolean getShowCancelButton()
Determines whether the "Cancel" button will be displayed.

Returns:
Boolean

setShowTodayButton

public void setShowTodayButton(Boolean showTodayButton)
Determines whether the "Today" button will be displayed, allowing the user to select the current date.

Parameters:
showTodayButton - showTodayButton Default value is true

getShowTodayButton

public Boolean getShowTodayButton()
Determines whether the "Today" button will be displayed, allowing the user to select the current date.

Returns:
Boolean

setShowWeekends

public void setShowWeekends(Boolean showWeekends)
                     throws IllegalStateException
Whether weekend days should be shown. Which days are considered weekends is controlled by weekendDays.

Parameters:
showWeekends - showWeekends Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getShowWeekends

public Boolean getShowWeekends()
Whether weekend days should be shown. Which days are considered weekends is controlled by weekendDays.

Returns:
Boolean

setSkinImgDir

public void setSkinImgDir(String skinImgDir)
Overridden directory where images for this widget (such as the month and year button icons) may be found.

Note : This is an advanced setting

Overrides:
setSkinImgDir in class Canvas
Parameters:
skinImgDir - skinImgDir Default value is "images/common/"
See Also:
Images overview and related methods

getSkinImgDir

public String getSkinImgDir()
Overridden directory where images for this widget (such as the month and year button icons) may be found.

Overrides:
getSkinImgDir in class Canvas
Returns:
String
See Also:
Images overview and related methods

setStartYear

public void setStartYear(int startYear)
                  throws IllegalStateException
Earliest year that may be selected.

Parameters:
startYear - startYear Default value is 1995
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getStartYear

public int getStartYear()
Earliest year that may be selected.

Returns:
int

setTodayButtonHeight

public void setTodayButtonHeight(Integer todayButtonHeight)
If set specifies a fixed height for the Today and Cancel buttons.

Parameters:
todayButtonHeight - todayButtonHeight Default value is null

getTodayButtonHeight

public Integer getTodayButtonHeight()
If set specifies a fixed height for the Today and Cancel buttons.

Returns:
Integer

setTodayButtonTitle

public void setTodayButtonTitle(String todayButtonTitle)
Title for "Today" button.

Parameters:
todayButtonTitle - todayButtonTitle Default value is "Today"

getTodayButtonTitle

public String getTodayButtonTitle()
Title for "Today" button.

Returns:
String

setWeekendHeaderStyle

public void setWeekendHeaderStyle(String weekendHeaderStyle)
Optional CSS style applied to the day-of-week headers for weekend days. If unset headerStyle will be applied to both weekdays and weekend days.

Parameters:
weekendHeaderStyle - weekendHeaderStyle Default value is null

getWeekendHeaderStyle

public String getWeekendHeaderStyle()
Optional CSS style applied to the day-of-week headers for weekend days. If unset headerStyle will be applied to both weekdays and weekend days.

Returns:
String

setYearMenuStyle

public void setYearMenuStyle(String yearMenuStyle)
                      throws IllegalStateException
Style for the pop-up year menu.

Parameters:
yearMenuStyle - yearMenuStyle Default value is "dateChooserYearMenu"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getYearMenuStyle

public String getYearMenuStyle()
Style for the pop-up year menu.

Returns:
String

cancelClick

public void cancelClick()
Fired when the user clicks the cancel button in this date chooser. Default implementation clears the date chooser.


addDataChangedHandler

public HandlerRegistration addDataChangedHandler(DataChangedHandler handler)
Add a dataChanged handler.

Method to override or observe in order to be notified when a user picks a date value.

Has no default behavior (so no need to call Super).

Use DateChooser.getData to get the current date value.

Specified by:
addDataChangedHandler in interface HasDataChangedHandlers
Parameters:
handler - the dataChanged handler
Returns:
HandlerRegistration used to remove this handler

getData

public Date getData()
Get the current value of the picker.

See DateChooser.dataChanged for how to respond to the user picking a date.

Returns:
current date

setData

public void setData(Date date)
Set the picker to show the given date.

Parameters:
date - new value

todayClick

public void todayClick()
Fired when the user clicks the Today button. Default implementation will select the current date in the date chooser.


setDefaultProperties

public static void setDefaultProperties(DateChooser dateChooserProperties)
Class level method to set the default properties of this class. If set, then all subsequent instances of this class will automatically have the default properties that were set when this method was called. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.

Parameters:
dateChooserProperties - properties that should be used as new defaults when instances of this class are created