public class UTCTimeBoxImplHtml4 extends UTCTimeBoxImplShared
It will use the GWT DateTimeFormat to parse in the browser timezone, but it will then convert the time to be independent of timezone.
It will first parse a manually typed date using the time format specified (defaulting to TIME_SHORT). It will then attempt the following formats in order: "hh:mm a", "hh:mma", "HH:mm". If all of these fail, it will attempt to insert a colon in the right place (e.g. 12 -> 12:00, 123 -> 1:23, and 1234 -> 12:34) and try the specified time format and the fallback formats again.
The control supports an unspecified value of null with a blank textbox.
fallbackFormatStrings, fallbackTimeFormats, timeFormat| Constructor and Description |
|---|
UTCTimeBoxImplHtml4()
Allows a UTCTimeBox to be created with a specified format.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Long> handler) |
void |
clearInvalidStyle() |
String |
getText() |
org.gwtbootstrap3.extras.select.client.ui.Select |
getTextBox()
Returns the TextBox on which this control is based.
|
Long |
getValue()
Returns the time value (as milliseconds since midnight
independent of time zone)
|
boolean |
hasValidValue()
A valid value is either empty (null) or filled with a valid
time.
|
boolean |
hasValue() |
protected boolean |
isSameValue(Long a,
Long b) |
void |
setTabIndex(int tabIndex)
Sets the tab index for the control.
|
void |
setText(String text) |
void |
setTimeFormat(com.google.gwt.i18n.client.DateTimeFormat timeFormat)
Sets the DateTimeFormat for this UTCTimeBox.
|
void |
setValue(Long value,
boolean fireEvents)
Sets the time value (as milliseconds since midnight independent
of time zone)
|
protected void |
setValue(Long value,
boolean updateTextBox,
boolean fireEvents) |
void |
setVisibleLength(int length)
Sets the visible length of the time input.
|
protected void |
syncTextToValue(Long value) |
protected void |
syncValueToText() |
void |
validate()
Validates the value that has been typed into the text input.
|
formatUsingFormat, normalizeInLocalRange, parseUsingFallbacks, parseUsingFallbacksWithColon, parseUsingFormat, setValue, text2value, value2textclaimElement, 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 UTCTimeBoxImplHtml4()
public void setTimeFormat(com.google.gwt.i18n.client.DateTimeFormat timeFormat)
UTCTimeBoxImplSharedsetTimeFormat in interface UTCTimeBoxImplsetTimeFormat in class UTCTimeBoxImplSharedpublic org.gwtbootstrap3.extras.select.client.ui.Select getTextBox()
public boolean hasValue()
public boolean hasValidValue()
public Long getValue()
public void setValue(Long value, boolean fireEvents)
protected void setValue(Long value, boolean updateTextBox, boolean fireEvents)
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Long> handler)
public String getText()
public void setText(String text)
protected void syncTextToValue(Long value)
protected void syncValueToText()
public void validate()
UTCTimeBoxImplSharedvalidate in interface UTCTimeBoxImplvalidate in class UTCTimeBoxImplSharedpublic void setVisibleLength(int length)
UTCTimeBoxImplSharedsetVisibleLength in interface UTCTimeBoxImplsetVisibleLength in class UTCTimeBoxImplSharedpublic void setTabIndex(int tabIndex)
UTCTimeBoxImplpublic void clearInvalidStyle()
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.