public class UTCDateBox extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.user.client.ui.HasValue<Long>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<Long>, com.google.gwt.user.client.ui.HasEnabled
Note: In keeping with the behavior of the GWT DateBox, null is used to represent no value. This means that you should check for null when calling getValue(), just as you would for DateBox. With auto-boxing Long/long, this may seem strange but is consistent.
| Modifier and Type | Field and Description |
|---|---|
static long |
DAY_IN_MS |
| Constructor and Description |
|---|
UTCDateBox()
Creates a new UTCDateBox with the medium date format for the
current locale.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler handler) |
static Long |
date2utc(Date date)
Converts a gwt Date in the timezone of the current browser to a time in
UTC.
|
org.uberfire.ext.widgets.common.client.common.DatePicker |
getDateBox() |
Long |
getValue()
Returns the date value specified by the DateBox measured in number of
milliseconds since January 1, 1970, 00:00:00 GMT.
|
static Long |
getValueForToday() |
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
void |
setValue(Long value)
Sets the value in the DateBox.
|
void |
setValue(Long value,
boolean fireEvents)
Sets the value in the DateBox.
|
static long |
timezoneOffsetMillis(Date date)
Returns the timezone offset for the specified Date.
|
static long |
trimTimeToMidnight(long time) |
static Date |
utc2date(Long time)
Converts a time in UTC to a gwt Date object which is in the timezone of
the current browser.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, 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, toStringpublic static final long DAY_IN_MS
public UTCDateBox()
public Long getValue()
public void setValue(Long value)
setValue in interface com.google.gwt.user.client.TakesValue<Long>setValue in interface com.google.gwt.user.client.ui.HasValue<Long>value - A time measured in the number of milliseconds since January 1,
1970, 00:00:00 GMT. This time should be at midnight in GMT for
the Date selected.
If value is null or represents a negative number, the DateBox will have no value.
public void setValue(Long value, boolean fireEvents)
setValue in interface com.google.gwt.user.client.ui.HasValue<Long>value - A time measured in the number of milliseconds since January 1,
1970, 00:00:00 GMT. This time should be at midnight in GMT for
the Date selected.
If value is null or represents a negative number, the DateBox will have no value.
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler handler)
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<Long>public boolean isEnabled()
isEnabled in interface com.google.gwt.user.client.ui.HasEnabledpublic void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledpublic org.uberfire.ext.widgets.common.client.common.DatePicker getDateBox()
public static final long trimTimeToMidnight(long time)
public static final Date utc2date(Long time)
public static final Long date2utc(Date date)
public static final Long getValueForToday()
public static final long timezoneOffsetMillis(Date date)
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.