Package com.vaadin.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.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 String
CLASSNAME
ApplicationConnection
client
For internal use only.protected String
currentLocale
protected Resolution
currentResolution
DateTimeService
dts
For internal use only.protected boolean
enabled
boolean
immediate
For internal use only.String
paintableId
For internal use only.protected boolean
readonly
static Resolution
RESOLUTION_DAY
Deprecated.static Resolution
RESOLUTION_HOUR
Deprecated.static Resolution
RESOLUTION_MIN
Deprecated.static Resolution
RESOLUTION_MONTH
Deprecated.static Resolution
RESOLUTION_SEC
Deprecated.static Resolution
RESOLUTION_YEAR
Deprecated.protected boolean
showISOWeekNumbers
-
Constructor Summary
Constructors Constructor Description VDateField()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationConnection
getClient()
Date
getCurrentDate()
String
getCurrentLocale()
Resolution
getCurrentResolution()
Date
getDate()
Returns a copy of the current date.DateTimeService
getDateTimeService()
String
getId()
int
getMilliseconds()
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.boolean
isEnabled()
boolean
isImmediate()
boolean
isReadonly()
boolean
isShowISOWeekNumbers()
Returns whether ISO 8601 week numbers should be shown in the date selector or not.static String
resolutionToString(Resolution res)
For internal use only.void
setCurrentDate(Date date)
void
setCurrentLocale(String currentLocale)
void
setCurrentResolution(Resolution currentResolution)
protected void
setDate(Date date)
Sets the current date for this VDateField.void
setEnabled(boolean enabled)
void
setImmediate(boolean immediate)
void
setMilliseconds(int ms)
void
setReadonly(boolean readonly)
void
setShowISOWeekNumbers(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
-
-
-
-
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:
isEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in 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
-
-