Package com.vaadin.v7.client.ui
Class VDateField
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.google.gwt.user.client.ui.FlowPanel
-
- com.vaadin.v7.client.ui.VDateField
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasEnabled,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IndexedPanel,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget,com.google.gwt.user.client.ui.InsertPanel,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,Field,Iterable<com.google.gwt.user.client.ui.Widget>
- Direct Known Subclasses:
VDateFieldCalendar,VTextualDate
public class VDateField extends com.google.gwt.user.client.ui.FlowPanel implements Field, com.google.gwt.user.client.ui.HasEnabled
-
-
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
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASSNAMEApplicationConnectionclientFor internal use only.protected StringcurrentLocaleprotected ResolutioncurrentResolutionDateTimeServicedtsFor internal use only.protected booleanenabledbooleanimmediateFor internal use only.StringpaintableIdFor internal use only.protected booleanreadonlystatic ResolutionRESOLUTION_DAYDeprecated.static ResolutionRESOLUTION_HOURDeprecated.static ResolutionRESOLUTION_MINDeprecated.static ResolutionRESOLUTION_MONTHDeprecated.static ResolutionRESOLUTION_SECDeprecated.static ResolutionRESOLUTION_YEARDeprecated.protected booleanshowISOWeekNumbers
-
Constructor Summary
Constructors Constructor Description VDateField()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationConnectiongetClient()DategetCurrentDate()StringgetCurrentLocale()ResolutiongetCurrentResolution()DategetDate()Returns a copy of the current date.DateTimeServicegetDateTimeService()StringgetId()intgetMilliseconds()static doublegetTime(int y, int m, int d, int h, int mi, int s, int ms)We need this redundant native function because Java's Date object doesn't have a setMilliseconds method.booleanisEnabled()booleanisImmediate()booleanisReadonly()booleanisShowISOWeekNumbers()Returns whether ISO 8601 week numbers should be shown in the date selector or not.static StringresolutionToString(Resolution res)For internal use only.voidsetCurrentDate(Date date)voidsetCurrentLocale(String currentLocale)voidsetCurrentResolution(Resolution currentResolution)protected voidsetDate(Date date)Sets the current date for this VDateField.voidsetEnabled(boolean enabled)voidsetImmediate(boolean immediate)voidsetMilliseconds(int ms)voidsetReadonly(boolean readonly)voidsetShowISOWeekNumbers(boolean showISOWeekNumbers)-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
- See Also:
- Constant Field Values
-
paintableId
public String paintableId
For internal use only. May be removed or replaced in the future.
-
client
public ApplicationConnection client
For internal use only. May be removed or replaced in the future.
-
immediate
public boolean immediate
For internal use only. May be removed or replaced in the future.
-
RESOLUTION_YEAR
@Deprecated public static final Resolution RESOLUTION_YEAR
Deprecated.
-
RESOLUTION_MONTH
@Deprecated public static final Resolution RESOLUTION_MONTH
Deprecated.
-
RESOLUTION_DAY
@Deprecated public static final Resolution RESOLUTION_DAY
Deprecated.
-
RESOLUTION_HOUR
@Deprecated public static final Resolution RESOLUTION_HOUR
Deprecated.
-
RESOLUTION_MIN
@Deprecated public static final Resolution RESOLUTION_MIN
Deprecated.
-
RESOLUTION_SEC
@Deprecated public static final Resolution RESOLUTION_SEC
Deprecated.
-
currentResolution
protected Resolution currentResolution
-
currentLocale
protected String currentLocale
-
readonly
protected boolean readonly
-
enabled
protected boolean enabled
-
dts
public DateTimeService dts
For internal use only. May be removed or replaced in the future.
-
showISOWeekNumbers
protected boolean showISOWeekNumbers
-
-
Method Detail
-
resolutionToString
public static String resolutionToString(Resolution res)
For internal use only. May be removed or replaced in the future.
-
getTime
public static double getTime(int y, int m, int d, int h, int mi, int s, int ms)We need this redundant native function because Java's Date object doesn't have a setMilliseconds method.For internal use only. May be removed or replaced in the future.
-
getMilliseconds
public int getMilliseconds()
-
setMilliseconds
public void setMilliseconds(int ms)
-
getCurrentResolution
public Resolution getCurrentResolution()
-
setCurrentResolution
public void setCurrentResolution(Resolution currentResolution)
-
getCurrentLocale
public String getCurrentLocale()
-
setCurrentLocale
public void setCurrentLocale(String currentLocale)
-
getCurrentDate
public Date getCurrentDate()
-
setCurrentDate
public void setCurrentDate(Date date)
-
isImmediate
public boolean isImmediate()
-
setImmediate
public void setImmediate(boolean immediate)
-
isReadonly
public boolean isReadonly()
-
setReadonly
public void setReadonly(boolean readonly)
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
getDateTimeService
public DateTimeService getDateTimeService()
-
getId
public String getId()
-
getClient
public ApplicationConnection getClient()
-
isShowISOWeekNumbers
public boolean isShowISOWeekNumbers()
Returns whether ISO 8601 week numbers should be shown in the date selector or not. ISO 8601 defines that a week always starts with a Monday so the week numbers are only shown if this is the case.- Returns:
- true if week number should be shown, false otherwise
-
setShowISOWeekNumbers
public void setShowISOWeekNumbers(boolean showISOWeekNumbers)
-
getDate
public Date getDate()
Returns a copy of the current date. Modifying the returned date will not modify the value of this VDateField. UsesetDate(Date)to change the current date.For internal use only. May be removed or replaced in the future.
- Returns:
- A copy of the current date
-
setDate
protected void setDate(Date date)
Sets the current date for this VDateField.- Parameters:
date- The new date to use
-
-