com.sencha.gxt.widget.core.client
Class DatePicker

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.DatePicker
All Implemented Interfaces:
HasAttachHandlers, HasResizeHandlers, HasValueChangeHandlers<java.util.Date>, HasHandlers, EventListener, TakesValue<java.util.Date>, HasEnabled, HasValue<java.util.Date>, HasVisibility, IsWidget, BeforeHideEvent.HasBeforeHideHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId

public class DatePicker
extends Component
implements HasValue<java.util.Date>

A date picker that displays a calendar for the specified month and provides the user the ability to select the month, year and day.


Nested Class Summary
static interface DatePicker.DatePickerAppearance
          The appearance of the date picker.
 class DatePicker.DatePickerDefaultMessages
          The translatable strings (e.g.
static interface DatePicker.DatePickerMessages
          The translatable strings (e.g.
static class DatePicker.DateState
           
 
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
DatePicker()
          Creates a date picker with the default appearance.
DatePicker(DatePicker.DatePickerAppearance appearance)
          Creates a date picker with the specified appearance.
 
Method Summary
 HandlerRegistration addValueChangeHandler(ValueChangeHandler<java.util.Date> handler)
           
 java.util.Date getMaxDate()
          Returns the field's maximum allowed date.
 DatePicker.DatePickerMessages getMessages()
          Returns the date picker messages.
 java.util.Date getMinDate()
          Returns the picker's minimum data.
 int getStartDay()
          Returns the picker's start day.
 java.util.Date getValue()
           
 void onBrowserEvent(Event event)
           
 void setMaxDate(java.util.Date maxDate)
          Sets the picker's maximum allowed date.
 void setMessages(DatePicker.DatePickerMessages messages)
          Optionally, sets the date picker messages.
 void setMinDate(java.util.Date minDate)
          Sets the picker's minimum allowed date.
 void setStartDay(int startDay)
          Sets the picker's start day
 void setValue(java.util.Date date)
           
 void setValue(java.util.Date date, boolean fireEvents)
           
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

DatePicker

public DatePicker()
Creates a date picker with the default appearance.


DatePicker

public DatePicker(DatePicker.DatePickerAppearance appearance)
Creates a date picker with the specified appearance.

Parameters:
appearance - the appearance of the date picker
Method Detail

addValueChangeHandler

public HandlerRegistration addValueChangeHandler(ValueChangeHandler<java.util.Date> handler)
Specified by:
addValueChangeHandler in interface HasValueChangeHandlers<java.util.Date>

getMaxDate

public java.util.Date getMaxDate()
Returns the field's maximum allowed date.

Returns:
the max date

getMessages

public DatePicker.DatePickerMessages getMessages()
Returns the date picker messages.

Returns:
the messages

getMinDate

public java.util.Date getMinDate()
Returns the picker's minimum data.

Returns:
the minimum date

getStartDay

public int getStartDay()
Returns the picker's start day.

Returns:
the start day

getValue

public java.util.Date getValue()
Specified by:
getValue in interface TakesValue<java.util.Date>
Specified by:
getValue in interface HasValue<java.util.Date>

onBrowserEvent

public void onBrowserEvent(Event event)
Specified by:
onBrowserEvent in interface EventListener
Overrides:
onBrowserEvent in class Component

setMaxDate

public void setMaxDate(java.util.Date maxDate)
Sets the picker's maximum allowed date.

Parameters:
maxDate - the max date

setMessages

public void setMessages(DatePicker.DatePickerMessages messages)
Optionally, sets the date picker messages.

Parameters:
messages - the messages

setMinDate

public void setMinDate(java.util.Date minDate)
Sets the picker's minimum allowed date.

Parameters:
minDate - the minimum date

setStartDay

public void setStartDay(int startDay)
Sets the picker's start day

Parameters:
startDay - the start day

setValue

public void setValue(java.util.Date date)
Specified by:
setValue in interface TakesValue<java.util.Date>
Specified by:
setValue in interface HasValue<java.util.Date>

setValue

public void setValue(java.util.Date date,
                     boolean fireEvents)
Specified by:
setValue in interface HasValue<java.util.Date>


Copyright © 2012. All Rights Reserved.