org.kuali.student.common.ui.client.widgets
Class KSDatePicker

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 org.kuali.student.common.ui.client.widgets.KSDatePickerAbstract
                  extended by org.kuali.student.common.ui.client.widgets.KSDatePicker
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasValueChangeHandlers<Date>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.TakesValue<Date>, com.google.gwt.user.client.ui.HasValue<Date>, com.google.gwt.user.client.ui.IsWidget, HasWatermark

public class KSDatePicker
extends KSDatePickerAbstract
implements HasWatermark

The KSDatePicker widget provides an easy way for a date to be entered by a user. When this widget obtains focus, a datepicker popup calendar appears below the text field. The user may either select the date using the calendar, or fill in the date manually (which will automatically selects the date for them in the calendar). TODO 03/11/2009 - This widget currently only supports dates entered in the mm/dd/yyyy format. Known unresolved backspace bug in Firefox.

Author:
Kuali Student Team

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.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
KSDatePicker()
          Creates a KSDatePicker widget.
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addBlurHandler(com.google.gwt.event.dom.client.BlurHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Date> handler)
           
 Date getValue()
          Get the currently selected date.
 boolean hasWatermark()
           
 void setValue(Date date)
          Sets the date and selects it.
 void setValue(Date date, boolean fireEvents)
           
 void setWatermarkText(String waterMark)
           
 boolean watermarkShowing()
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, 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
 
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, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

KSDatePicker

public KSDatePicker()
Creates a KSDatePicker widget.

Method Detail

getValue

public Date getValue()
Get the currently selected date.

Specified by:
getValue in interface com.google.gwt.user.client.TakesValue<Date>
Specified by:
getValue in interface com.google.gwt.user.client.ui.HasValue<Date>
Specified by:
getValue in class KSDatePickerAbstract
Returns:
the Date selected

setValue

public void setValue(Date date)
Sets the date and selects it.

Specified by:
setValue in interface com.google.gwt.user.client.TakesValue<Date>
Specified by:
setValue in interface com.google.gwt.user.client.ui.HasValue<Date>
Specified by:
setValue in class KSDatePickerAbstract
Parameters:
date - the Date to set the calendar and associated field to

setValue

public void setValue(Date date,
                     boolean fireEvents)
Specified by:
setValue in interface com.google.gwt.user.client.ui.HasValue<Date>
See Also:
HasValue.setValue(java.lang.Object, boolean)

addValueChangeHandler

public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Date> handler)
Specified by:
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<Date>
See Also:
HasValueChangeHandlers.addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)

addFocusHandler

public com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
Specified by:
addFocusHandler in interface com.google.gwt.event.dom.client.HasFocusHandlers

addBlurHandler

public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(com.google.gwt.event.dom.client.BlurHandler handler)
Specified by:
addBlurHandler in interface com.google.gwt.event.dom.client.HasBlurHandlers

hasWatermark

public boolean hasWatermark()
Specified by:
hasWatermark in interface HasWatermark

setWatermarkText

public void setWatermarkText(String waterMark)
Specified by:
setWatermarkText in interface HasWatermark

watermarkShowing

public boolean watermarkShowing()
Specified by:
watermarkShowing in interface HasWatermark


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.