public class DateTimeBoxBase extends Widget implements HasValue<Date>, HasEnabled, HasValueChangeHandlers<Date>, HasVisibility, HasChangeHandlers, HasVisibleHandlers, HasAllDateTimePickerHandlers, IsEditor<TakesValueEditor<Date>>, HasPlaceholder, HasAlternateSize, IsSearchQuery, HasSize, HasId, IsResponsive, HasStyle
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasViewMode.ViewMode
DEBUG_ID_PREFIX
Constructor and Description |
---|
DateTimeBoxBase() |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addChangeHandler(ChangeHandler handler) |
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> dateValueChangeHandler) |
TakesValueEditor<Date> |
asEditor()
Return Editor
|
protected void |
configure()
configure this datetimepicker.
|
protected void |
configure(Element e,
boolean autoclose,
int minuteStep,
boolean todayButton,
boolean highlightToday,
String minViewMode,
String startViewMode,
String maxViewMode,
String pickerPosition)
call jquery datetimepicker 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
|
PickerPosition |
getPickerPosition() |
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?
|
void |
onChange()
dateChange event handler.
|
void |
onHide(Event e) |
protected void |
onLoad() |
void |
onShow(Event e) |
protected void |
onUnload() |
void |
reconfigure() |
protected void |
removeDataIfExists(Element e) |
void |
removeStyle(Style style)
Removes the provided style from the widget.
|
void |
setAlignment(ValueBoxBase.TextAlignment align) |
void |
setAlternateSize(AlternateSize size) |
void |
setAutoClose(boolean autoclose)
Determine if the element will autoclose in some events.
|
void |
setDaysOfWeekDisabled(String value)
Disable days of week view.
|
void |
setEnabled(boolean enabled) |
void |
setEndDate_(Date endDate)
Set the max date in the component.
|
void |
setEndDate(String endDate)
Set the max date in the component.
|
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 |
setHighlightToday(boolean highlight) |
void |
setId(String id)
Set ID
|
void |
setLanguage(String language)
Setup the language of the component.
|
void |
setMaxView(HasViewMode.ViewMode mode)
Set the Max ViewMode
|
void |
setMaxView(String mode)
Set the Max ViewMode
|
void |
setMinuteStep(int minutes) |
void |
setMinView(HasViewMode.ViewMode mode)
Set the Min ViewMode
|
void |
setMinView(String mode)
Set the Min ViewMode
|
void |
setPickerPosition(PickerPosition pickerPosition) |
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 |
setShowOn(Device device)
Sets the kind of device, this widget is shown on.
|
void |
setShowTodayButton(boolean show) |
void |
setSize(int size)
Sets the widget's size.
|
void |
setStartDate_(Date startDate)
Set the min date in the component.
|
void |
setStartDate(String startDate)
Set the min date in the component.
|
void |
setStartView(HasViewMode.ViewMode mode)
Set the Start ViewMode
|
void |
setStartView(String mode)
Set the Start ViewMode
|
void |
setStyle(Style style)
Replaces the widet's style with the provided one.
|
void |
setValue(Date value) |
void |
setValue(Date value,
boolean fireEvents) |
void |
setWeekStart(int start)
Define the first day of week in the datepicker.
|
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 DateTimeBoxBase()
public void setAlignment(ValueBoxBase.TextAlignment align)
public boolean isReadOnly()
ValueBoxBase.isReadOnly()
public void setReadOnly(boolean readonly)
ValueBoxBase.setReadOnly(boolean)
public void setFormat(String format)
setFormat
in interface HasDateFormat
public void setLanguage(String language)
HasLanguage
setLanguage
in interface HasLanguage
protected TextBox getBox()
public String getOriginalValue()
protected void updateValue(Element e)
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<Date> dateValueChangeHandler)
addValueChangeHandler
in interface HasValueChangeHandlers<Date>
protected void configure(Widget w)
w:
- the widget to configure.public void onChange()
public void reconfigure()
protected void configure()
protected void removeDataIfExists(Element e)
protected void configure(Element e, boolean autoclose, int minuteStep, boolean todayButton, boolean highlightToday, String minViewMode, String startViewMode, String maxViewMode, String pickerPosition)
e:
- Element that will be transformed in a datetimepicker.autoclose
- is autoclose?public void show()
public void hide()
public void toggle()
It will be hidden if it was previously shown and shown if it was previously hidden.
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 void setWeekStart(int start)
setWeekStart
in interface HasWeekStart
public void setStartDate(String startDate)
setStartDate
in interface HasStartDate
public void setStartDate_(Date startDate)
setStartDate_
in interface HasStartDate
public void setEndDate(String endDate)
setEndDate
in interface HasEndDate
public void setEndDate_(Date endDate)
setEndDate_
in interface HasEndDate
public void setAutoClose(boolean autoclose)
setAutoClose
in interface HasAutoclose
public void setMinView(HasViewMode.ViewMode mode)
setMinView
in interface HasViewMode
mode
- ViewMode.{HOUR,DAY,MONTH,YEAR,DECADE}public void setMinView(String mode)
setMinView
in interface HasViewMode
mode
- One of (HOUR,DAY,MONTH,YEAR,DECADE), case-insensitivepublic void setStartView(HasViewMode.ViewMode mode)
setStartView
in interface HasViewMode
mode
- ViewMode.{HOUR,DAY,MONTH,YEAR,DECADE}public void setStartView(String mode)
setStartView
in interface HasViewMode
mode
- One of (HOUR,DAY,MONTH,YEAR,DECADE), case-insensitivepublic void setMaxView(HasViewMode.ViewMode mode)
setMaxView
in interface HasViewMode
mode
- ViewMode.{HOUR,DAY,MONTH,YEAR,DECADE}public void setMaxView(String mode)
setMaxView
in interface HasViewMode
mode
- One of (HOUR,DAY,MONTH,YEAR,DECADE), case-insensitivepublic TakesValueEditor<Date> asEditor()
asEditor
in interface IsEditor<TakesValueEditor<Date>>
public HandlerRegistration addChangeHandler(ChangeHandler handler)
addChangeHandler
in interface HasChangeHandlers
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 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 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 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 removeStyle(Style style)
removeStyle
in interface HasStyle
style
- the style to be removed from the Widget.public boolean isEnabled()
isEnabled
in interface HasEnabled
public void setEnabled(boolean enabled)
setEnabled
in interface HasEnabled
public void setDaysOfWeekDisabled(String value)
HasDaysOfWeek
setDaysOfWeekDisabled
in interface HasDaysOfWeek
value
- Days of week which are disabled: "0,6"public void setMinuteStep(int minutes)
setMinuteStep
in interface HasMinutes
public void setShowTodayButton(boolean show)
setShowTodayButton
in interface HasToday
public void setHighlightToday(boolean highlight)
setHighlightToday
in interface HasToday
public PickerPosition getPickerPosition()
public void setPickerPosition(PickerPosition pickerPosition)
Copyright © 2012-2014 gwtbootstrap. All Rights Reserved.