public class TimeBoxBase extends Widget implements HasVisibleHandlers, HasPlaceholder, HasTemplate, HasShowInputs, HasSecondStep, HasModalBackdrop, HasMinuteStep, HasDisableFocus, HasDefaultTime, HasShowSeconds, HasMeridian, HasAlternateSize, IsSearchQuery, HasSize, HasId, IsResponsive, HasStyle, HasValue<Date>, HasEnabled, HasValueChangeHandlers<Date>, HasVisibility, HasTimeFormat
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasTemplate.Template
HasDefaultTime.DefaultTime
DEBUG_ID_PREFIX
Constructor and Description |
---|
TimeBoxBase() |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addHiddenHandler(HiddenHandler handler)
Adds a
HiddenEvent handler. |
HandlerRegistration |
addHideHandler(HideHandler handler)
Adds a
HideEvent handler. |
HandlerRegistration |
addShowHandler(ShowHandler handler)
Adds a
ShowEvent handler. |
HandlerRegistration |
addShownHandler(ShownHandler handler)
Adds a
ShownEvent handler. |
void |
addStyle(Style style)
Adds the provided style to the widget.
|
HandlerRegistration |
addValueChangeHandler(ValueChangeHandler<Date> handler) |
protected void |
configure()
configure this timepicker
|
protected void |
configure(Element e,
String template,
String defaultTime,
int minuteStep,
boolean showSeconds,
int secondStep,
boolean showMeridian,
boolean showInputs,
boolean disableFocus,
boolean modalBackdrop)
call jquery timepicker plugin in a element.
|
protected void |
configure(Widget w)
Configure the elements for a specific widget.
|
protected TextBox |
getBox()
Returns the internal instance of textbox element.
|
String |
getId()
Get ID
|
String |
getOriginalValue()
Get un-transformed text
|
String |
getPlaceholder()
Get a placeholder attribute (HTML5).
|
Date |
getValue() |
void |
hide()
Hides the widget if it was previously shown.
|
boolean |
isEnabled() |
boolean |
isReadOnly() |
boolean |
isSearchQuery()
is the element search-query style?
|
protected void |
onLoad() |
protected void |
onUnload()
This method is called immediately before a widget will be detached from the browser's document.
|
void |
reconfigure()
Removes any data in the time picker and reconfigures it
|
protected void |
removeDataIfExists(Element e)
Safely removes data
|
void |
removeStyle(Style style)
Removes the provided style from the widget.
|
void |
setAlternateSize(AlternateSize size) |
void |
setDefaultTime(HasDefaultTime.DefaultTime defaultTime)
Set the defaultTime of the component.
|
void |
setDefaultTime(String defaultTime)
Set the defaultTime of the component.
|
void |
setDisableFocus(boolean disableFocus)
Sets the disableFocus property component
|
void |
setEnabled(boolean enabled) |
void |
setFormat(String format)
Set the format in the component.
|
void |
setHideOn(Device device)
Sets the kind of device, this widget is hidden on.
|
void |
setId(String id)
Set ID
|
void |
setMeridian(boolean meridian)
Determine if the element will meridian in some events.
|
void |
setMinuteStep(int minuteStep)
Sets the minuteStep property on the component
|
void |
setModalBackdrop(boolean modalBackdrop)
Sets the hasModalBackdrop property component
|
void |
setPlaceholder(String placeholder)
Set a placeholder attribute (HTML5).
|
void |
setReadOnly(boolean readonly) |
void |
setSearchQuery(boolean searchQuery)
Set search-query style to the element.
|
void |
setSecondStep(int secondStep)
Sets the secondStep property on the component
|
void |
setShowInputs(boolean showInputs)
Sets the showInputs property component
|
void |
setShowOn(Device device)
Sets the kind of device, this widget is shown on.
|
void |
setShowSeconds(boolean showSeconds)
Sets the showSeconds property component
|
void |
setSize(int size)
Sets the widget's size.
|
void |
setStyle(Style style)
Replaces the widet's style with the provided one.
|
void |
setTemplate(HasTemplate.Template template)
Set the template of the timepicker.
|
void |
setTemplate(String template)
Set the template of the timepicker.
|
void |
setValue(Date value) |
void |
setValue(Date value,
boolean fireEvents) |
void |
show()
Shows the widget if it was previously hidden.
|
void |
toggle()
Toggles the view state of the widget.
|
protected void |
updateValue(Element e) |
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents
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, unsinkEvents
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
public TimeBoxBase()
public boolean isReadOnly()
ValueBoxBase.isReadOnly()
public void setReadOnly(boolean readonly)
ValueBoxBase.setReadOnly(boolean)
protected TextBox getBox()
public String getOriginalValue()
protected void updateValue(Element e)
protected void configure()
protected void configure(Widget w)
w:
- the widget to configure.protected void configure(Element e, String template, String defaultTime, int minuteStep, boolean showSeconds, int secondStep, boolean showMeridian, boolean showInputs, boolean disableFocus, boolean modalBackdrop)
e:
- Element that will be transformed in a timepicker.public void show()
public void hide()
public void toggle()
HasVisibility
It will be hidden if it was previously shown and shown if it was previously hidden.
protected void removeDataIfExists(Element e)
e:
- Element that will be clearedpublic void reconfigure()
protected void onUnload()
public void setPlaceholder(String placeholder)
setPlaceholder
in interface HasPlaceholder
placeholder
- the String to show. Use a empty string or null to remove the attribute.public String getPlaceholder()
getPlaceholder
in interface HasPlaceholder
public void setTemplate(HasTemplate.Template template)
setTemplate
in interface HasTemplate
public void setTemplate(String template)
setTemplate
in interface HasTemplate
public void setMeridian(boolean meridian)
setMeridian
in interface HasMeridian
public void setAlternateSize(AlternateSize size)
setAlternateSize
in interface HasAlternateSize
public void setSize(int size)
setSize
in interface HasSize
size
- the size of the widget in the Bootstrap grid systempublic void removeStyle(Style style)
removeStyle
in interface HasStyle
style
- the style to be removed from the Widget.public void setShowOn(Device device)
The widget is not shown on any other device.
Only works if responsive design is turned on!
setShowOn
in interface IsResponsive
Configurator.hasResponsiveDesign()
,
IsResponsive.setHideOn(Device)
public void setHideOn(Device device)
The widget is not hidden on any other device.
Only works if responsive design is turned on!
setHideOn
in interface IsResponsive
Configurator.hasResponsiveDesign()
,
IsResponsive.setShowOn(Device)
public void setSearchQuery(boolean searchQuery)
setSearchQuery
in interface IsSearchQuery
searchQuery
- true:add search-query css-class/false:remove search-query css-classpublic boolean isSearchQuery()
isSearchQuery
in interface IsSearchQuery
public boolean isEnabled()
isEnabled
in interface HasEnabled
public void setEnabled(boolean enabled)
setEnabled
in interface HasEnabled
public void setShowSeconds(boolean showSeconds)
setShowSeconds
in interface HasShowSeconds
public void setDisableFocus(boolean disableFocus)
setDisableFocus
in interface HasDisableFocus
public void setModalBackdrop(boolean modalBackdrop)
setModalBackdrop
in interface HasModalBackdrop
public void setShowInputs(boolean showInputs)
setShowInputs
in interface HasShowInputs
public void setMinuteStep(int minuteStep)
setMinuteStep
in interface HasMinuteStep
public void setSecondStep(int secondStep)
setSecondStep
in interface HasSecondStep
public void setDefaultTime(HasDefaultTime.DefaultTime defaultTime)
setDefaultTime
in interface HasDefaultTime
public void setDefaultTime(String defaultTime)
setDefaultTime
in interface HasDefaultTime
public HandlerRegistration addHideHandler(HideHandler handler)
HideEvent
handler.addHideHandler
in interface HasVisibleHandlers
handler
- the hide handlerHandlerRegistration
used to remove this handlerpublic HandlerRegistration addHiddenHandler(HiddenHandler handler)
HiddenEvent
handler.addHiddenHandler
in interface HasVisibleHandlers
handler
- the hidden handlerHandlerRegistration
used to remove this handlerpublic HandlerRegistration addShowHandler(ShowHandler handler)
ShowEvent
handler.addShowHandler
in interface HasVisibleHandlers
handler
- the show handlerHandlerRegistration
used to remove this handlerpublic HandlerRegistration addShownHandler(ShownHandler handler)
ShownEvent
handler.addShownHandler
in interface HasVisibleHandlers
handler
- the shown handlerHandlerRegistration
used to remove this handlerpublic HandlerRegistration addValueChangeHandler(ValueChangeHandler<Date> handler)
addValueChangeHandler
in interface HasValueChangeHandlers<Date>
public void setFormat(String format)
HasTimeFormat
setFormat
in interface HasTimeFormat
Copyright © 2012-2014 gwtbootstrap. All Rights Reserved.