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:
HasHandlers, com.google.gwt.user.client.EventListener, 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, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers

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
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DateChooser()
           
DateChooser(com.google.gwt.core.client.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  com.google.gwt.core.client.JavaScriptObject create()
           
 java.lang.String getAlternateStyleSuffix()
          The text appended to the style name when using alternateWeekStyles.
 java.lang.Boolean getAlternateWeekStyles()
          Whether alternating weeks should be drawn in alternating styles.
 java.lang.String getBaseBottomButtonStyle()
          CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel").
 java.lang.String getBaseButtonStyle()
          Base css style applied to this picker's buttons.
 java.lang.String getBaseNavButtonStyle()
          CSS style to apply to navigation buttons and date display at the top of the component.
 java.lang.String getBaseWeekdayStyle()
          Base css style applied to weekdays.
 java.lang.String getBaseWeekendStyle()
          Base css style applied to weekends.
 java.lang.String getCancelButtonTitle()
          Title for the cancellation button.
 java.util.Date getData()
          Get the current value of the picker.
 java.lang.Boolean getDisableWeekends()
          Whether it should be valid to pick a weekend day.
 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
 java.lang.String getHeaderStyle()
          CSS style applied to the day-of-week headers.
 java.lang.String getMonthMenuStyle()
          Style for the pop-up year menu.
 java.lang.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
 java.lang.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(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 java.lang.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
 java.lang.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
 java.lang.Boolean getShowCancelButton()
          Determines whether the "Cancel" button will be displayed.
 java.lang.Boolean getShowDoubleYearIcon()
          If this property is set to true the previous and next year buttons will render out the previous and next month button icons twice rather than using the prevYearIcon and nextYearIcon.
 java.lang.Boolean getShowTodayButton()
          Determines whether the "Today" button will be displayed, allowing the user to select the current date.
 java.lang.Boolean getShowWeekends()
          Whether weekend days should be shown.
 java.lang.String getSkinImgDir()
          Overridden directory where images for this widget (such as the month and year button icons) may be found.
 java.lang.Integer getTodayButtonHeight()
          If set specifies a fixed height for the Today and Cancel buttons.
 java.lang.String getTodayButtonTitle()
          Title for "Today" button.
 java.lang.String getWeekendHeaderStyle()
          Optional CSS style applied to the day-of-week headers for weekend days.
 java.lang.String getYearMenuStyle()
          Style for the pop-up year menu.
 void setAlternateStyleSuffix(java.lang.String alternateStyleSuffix)
          The text appended to the style name when using alternateWeekStyles.
 void setAlternateWeekStyles(java.lang.Boolean alternateWeekStyles)
          Whether alternating weeks should be drawn in alternating styles.
 void setBaseBottomButtonStyle(java.lang.String baseBottomButtonStyle)
          CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel").
 void setBaseButtonStyle(java.lang.String baseButtonStyle)
          Base css style applied to this picker's buttons.
 void setBaseNavButtonStyle(java.lang.String baseNavButtonStyle)
          CSS style to apply to navigation buttons and date display at the top of the component.
 void setBaseWeekdayStyle(java.lang.String baseWeekdayStyle)
          Base css style applied to weekdays.
 void setBaseWeekendStyle(java.lang.String baseWeekendStyle)
          Base css style applied to weekends.
 void setCancelButtonTitle(java.lang.String cancelButtonTitle)
          Title for the cancellation button.
 void setData(java.util.Date date)
          Set the picker to show the given date.
 void setDisableWeekends(java.lang.Boolean disableWeekends)
          Whether it should be valid to pick a weekend day.
 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(java.lang.String headerStyle)
          CSS style applied to the day-of-week headers.
 void setMonthMenuStyle(java.lang.String monthMenuStyle)
          Style for the pop-up year menu.
 void setNextMonthIcon(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.Boolean showCancelButton)
          Determines whether the "Cancel" button will be displayed.
 void setShowDoubleYearIcon(java.lang.Boolean showDoubleYearIcon)
          If this property is set to true the previous and next year buttons will render out the previous and next month button icons twice rather than using the prevYearIcon and nextYearIcon.
 void setShowTodayButton(java.lang.Boolean showTodayButton)
          Determines whether the "Today" button will be displayed, allowing the user to select the current date.
 void setShowWeekends(java.lang.Boolean showWeekends)
          Whether weekend days should be shown.
 void setSkinImgDir(java.lang.String skinImgDir)
          Overridden directory where images for this widget (such as the month and year button icons) may be found.
 void setTodayButtonHeight(java.lang.Integer todayButtonHeight)
          If set specifies a fixed height for the Today and Cancel buttons.
 void setTodayButtonTitle(java.lang.String todayButtonTitle)
          Title for "Today" button.
 void setWeekendHeaderStyle(java.lang.String weekendHeaderStyle)
          Optional CSS style applied to the day-of-week headers for weekend days.
 void setYearMenuStyle(java.lang.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, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, 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, getAnimateShowTime, getAnimateTime, getAppImgDir, getAutoShowParent, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getContents, getContextMenu, getCursor, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionCursor, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getExtraSpace, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getLeft, getMargin, getMatchElement, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPercentBox, getPosition, getPrefix, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowResizeBar, getShowShadow, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, 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, parentResized, redraw, redraw, removeChild, removeChild, resizeBy, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowTime, setAnimateTime, setAppImgDir, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDefaultHeight, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionCursor, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentElement, setPercentBox, setPosition, setPrefix, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowResizeBar, setShowShadow, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showNextTo, showNextTo, showPrintPreview, updateHover, updateHover, updateShadow, visibleAtPoint, 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, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, hashCode, isConfigOnly, isCreated, onDestroy, onDraw, onInit, 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, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent
 
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, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, 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(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static DateChooser getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

create

protected com.google.gwt.core.client.JavaScriptObject create()
Overrides:
create in class Canvas

setHeaderHeight

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

Parameters:
headerHeight - headerHeight Default value is 20
Throws:
java.lang.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

setSkinImgDir

public void setSkinImgDir(java.lang.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/"

getSkinImgDir

public java.lang.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

setPrevYearIcon

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

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

getPrevYearIcon

public java.lang.String getPrevYearIcon()
Icon for the previous year button

Returns:
String

setPrevYearIconWidth

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

Parameters:
prevYearIconWidth - prevYearIconWidth Default value is 14
Throws:
java.lang.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

setPrevYearIconHeight

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

Parameters:
prevYearIconHeight - prevYearIconHeight Default value is 7
Throws:
java.lang.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

setPrevMonthIcon

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

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

getPrevMonthIcon

public java.lang.String getPrevMonthIcon()
Icon for the previous month button

Returns:
String

setPrevMonthIconWidth

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

Parameters:
prevMonthIconWidth - prevMonthIconWidth Default value is 7
Throws:
java.lang.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

setPrevMonthIconHeight

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

Parameters:
prevMonthIconHeight - prevMonthIconHeight Default value is 7
Throws:
java.lang.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

setNextYearIcon

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

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

getNextYearIcon

public java.lang.String getNextYearIcon()
Icon for the next year button

Returns:
String

setNextYearIconWidth

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

Parameters:
nextYearIconWidth - nextYearIconWidth Default value is 14
Throws:
java.lang.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

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

setNextMonthIcon

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

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

getNextMonthIcon

public java.lang.String getNextMonthIcon()
Icon for the next month button

Returns:
String

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

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

setShowDoubleYearIcon

public void setShowDoubleYearIcon(java.lang.Boolean showDoubleYearIcon)
If this property is set to true the previous and next year buttons will render out the previous and next month button icons twice rather than using the prevYearIcon and nextYearIcon.

Set to true by default as not all skins contain media for the year icons.

Parameters:
showDoubleYearIcon - showDoubleYearIcon Default value is true

getShowDoubleYearIcon

public java.lang.Boolean getShowDoubleYearIcon()
If this property is set to true the previous and next year buttons will render out the previous and next month button icons twice rather than using the prevYearIcon and nextYearIcon.

Set to true by default as not all skins contain media for the year icons.

Returns:
Boolean

setYearMenuStyle

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

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

getYearMenuStyle

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

Returns:
String

setMonthMenuStyle

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

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

getMonthMenuStyle

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

Returns:
String

setShowTodayButton

public void setShowTodayButton(java.lang.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 java.lang.Boolean getShowTodayButton()
Determines whether the "Today" button will be displayed, allowing the user to select the current date.

Returns:
Boolean

setShowCancelButton

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

Parameters:
showCancelButton - showCancelButton Default value is false

getShowCancelButton

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

Returns:
Boolean

setTodayButtonTitle

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

Parameters:
todayButtonTitle - todayButtonTitle Default value is "Today"

getTodayButtonTitle

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

Returns:
String

setCancelButtonTitle

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

Parameters:
cancelButtonTitle - cancelButtonTitle Default value is "Cancel"

getCancelButtonTitle

public java.lang.String getCancelButtonTitle()
Title for the cancellation button.

Returns:
String

setTodayButtonHeight

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

Parameters:
todayButtonHeight - todayButtonHeight Default value is null

getTodayButtonHeight

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

Returns:
Integer

setDisableWeekends

public void setDisableWeekends(java.lang.Boolean disableWeekends)
                        throws java.lang.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 com.smartgwt.client..Date#weekendDays.

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

getDisableWeekends

public java.lang.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 com.smartgwt.client..Date#weekendDays.

Returns:
Boolean

setShowWeekends

public void setShowWeekends(java.lang.Boolean showWeekends)
                     throws java.lang.IllegalStateException
Whether weekend days should be shown. Which days are considered weekends is controlled by com.smartgwt.client..Date#weekendDays.

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

getShowWeekends

public java.lang.Boolean getShowWeekends()
Whether weekend days should be shown. Which days are considered weekends is controlled by com.smartgwt.client..Date#weekendDays.

Returns:
Boolean

setFirstDayOfWeek

public void setFirstDayOfWeek(int firstDayOfWeek)
                       throws java.lang.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:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getFirstDayOfWeek

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

Returns:
int

setBaseButtonStyle

public void setBaseButtonStyle(java.lang.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 java.lang.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

setBaseWeekdayStyle

public void setBaseWeekdayStyle(java.lang.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 java.lang.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(java.lang.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 java.lang.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

setAlternateWeekStyles

public void setAlternateWeekStyles(java.lang.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 java.lang.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

setAlternateStyleSuffix

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

Parameters:
alternateStyleSuffix - alternateStyleSuffix Default value is "Dark"

getAlternateStyleSuffix

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

Returns:
String

setHeaderStyle

public void setHeaderStyle(java.lang.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 java.lang.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

setWeekendHeaderStyle

public void setWeekendHeaderStyle(java.lang.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 java.lang.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

setBaseNavButtonStyle

public void setBaseNavButtonStyle(java.lang.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 java.lang.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

setBaseBottomButtonStyle

public void setBaseBottomButtonStyle(java.lang.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 java.lang.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

setData

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

Parameters:
date - new value

getData

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

See addDataChangedHandler(com.smartgwt.client.widgets.events.DataChangedHandler) for how to respond to the user picking a date.

Returns:
current date

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 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

cancelClick

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


todayClick

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