Class WDatePicker
A date picker shows a line edit and an icon which when clicked popups a WCalendar
for
editing the date. Any date entered in the line edit is reflected in the calendar, and vice-versa.
Each of these widgets may be accessed individually (getLineEdit()
, getCalendar()
, and getDisplayWidget()
) and there is a constructor that allows you to
specify an existing line edit and display widget.
The date format used by default is "dd/MM/yyyy"
and can be changed
using setFormat()
. At any time, the date set may be
read using getDate()
, or can be changed using setDate()
.
i18n
Internationalization of WDatePicker
is mostly handled through the internationalization
mechanism of WDate
.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
ConstructorDescriptionDeprecated.Create a new date picker.WDatePicker
(WContainerWidget parentContainer) Deprecated.Create a new date picker.WDatePicker
(WInteractWidget displayWidget, WLineEdit forEdit) Deprecated.Create a new date picker for existing line edit and with custom display widget.WDatePicker
(WInteractWidget displayWidget, WLineEdit forEdit, WContainerWidget parentContainer) Deprecated.Create a new date picker for existing line edit and with custom display widget.WDatePicker
(WLineEdit forEdit) Deprecated.Create a new date picker for a line edit.WDatePicker
(WLineEdit forEdit, WContainerWidget parentContainer) Deprecated.Create a new date picker for a line edit. -
Method Summary
Modifier and TypeMethodDescriptionchanged()
Deprecated.Signal emitted when the value has changed.Deprecated.Returns the bottom date of the valid range.Deprecated.The calendar widget.getDate()
Deprecated.The current date.Deprecated.Returns the validator.Deprecated.The display widget.Deprecated.Returns the format.Deprecated.The line edit.Deprecated.The popup widget.getTop()
Deprecated.Returns the top date of the valid range.Deprecated.A signal which indicates that the popup has been closed.void
remove()
Deprecated.Destructor.protected void
render
(EnumSet<RenderFlag> flags) Deprecated.Renders the widget.void
Deprecated.Sets the bottom of the valid date range.void
Deprecated.Sets the current date.void
setDisabled
(boolean disabled) Deprecated.Sets whether the widget is disabled.void
setEnabled
(boolean enabled) Deprecated.Sets whether the widget is enabled.void
Deprecated.Sets the format used for parsing or writing the date in the line edit.void
setHidden
(boolean hidden, WAnimation animation) Deprecated.Hide/unhide the widget.void
setPopupVisible
(boolean visible) Deprecated.Shows or hides the popup.void
Deprecated.Sets the top of the valid date range.Methods inherited from class eu.webtoolkit.jwt.WCompositeWidget
addStyleClass, boxBorder, boxPadding, callJavaScriptMember, doJavaScript, enableAjax, find, findById, getAttributeValue, getBaseZIndex, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getId, getImplementation, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getObjectName, getOffset, getPositionScheme, getScrollVisibilityMargin, getStyleClass, getTabIndex, getTakeImplementation, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, hasFocus, hasStyleClass, isCanReceiveFocus, isDisabled, isEnabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isScrollVisibilityEnabled, isScrollVisible, isSetFirstFocus, isThemeStyleEnabled, isVisible, load, propagateSetEnabled, propagateSetVisible, refresh, removeStyleClass, removeWidget, resize, scrollVisibilityChanged, setAttributeValue, setCanReceiveFocus, setClearSides, setDecorationStyle, setDeferredToolTip, setFloatSide, setFocus, setHiddenKeepsGeometry, setId, setImplementation, setInline, setJavaScriptMember, setLineHeight, setMargin, setMaximumSize, setMinimumSize, setObjectName, setOffsets, setPopup, setPositionScheme, setScrollVisibilityEnabled, setScrollVisibilityMargin, setSelectable, setStyleClass, setTabIndex, setThemeStyleEnabled, setToolTip, setVerticalAlignment
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addJSignal, addStyleClass, animateHide, animateShow, createJavaScript, disable, dropEvent, enable, getDropTouch, getJsRef, getParent, hide, htmlText, isExposed, isGlobalWidget, isLayoutSizeAware, isRendered, layoutSizeChanged, needsRerender, positionAt, positionAt, removeFromParent, removeStyleClass, render, resize, scheduleRender, scheduleRender, scheduleRender, setClearSides, setDeferredToolTip, setFocus, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
Methods inherited from class eu.webtoolkit.jwt.WObject
setFormData
-
Constructor Details
-
WDatePicker
Deprecated.Create a new date picker.This constructor creates a line edit with an icon that leads to a popup calendar. A
WDateValidator
is configured for the line edit. -
WDatePicker
public WDatePicker()Deprecated.Create a new date picker. -
WDatePicker
Deprecated.Create a new date picker for a line edit.This constructor creates an icon that leads to a popup calendar.
The
forEdit
argument is the lineEdit that works in conjunction with the date picker. This widget does not become part of the date picker, and may be located anywhere else. -
WDatePicker
Deprecated.Create a new date picker for a line edit. -
WDatePicker
public WDatePicker(WInteractWidget displayWidget, WLineEdit forEdit, WContainerWidget parentContainer) Deprecated.Create a new date picker for existing line edit and with custom display widget.The
displayWidget
is a button or image which much be clicked to open the date picker.The
forEdit
argument is the lineEdit that works in conjunction with the date picker. -
WDatePicker
Deprecated.Create a new date picker for existing line edit and with custom display widget.
-
-
Method Details
-
remove
public void remove()Deprecated.Destructor.- Overrides:
remove
in classWCompositeWidget
- See Also:
-
getDateValidator
Deprecated.Returns the validator.Most of the configuration of the date edit is stored in the validator.
-
setFormat
Deprecated.Sets the format used for parsing or writing the date in the line edit.Sets the format used for representing the date in the line edit. If the line edit has a
WDateValidator
configured for it, then also there the format is updated.The default format is
'dd/MM/yyyy'
.- See Also:
-
getFormat
Deprecated.Returns the format.- See Also:
-
getCalendar
Deprecated.The calendar widget.Returns the calendar widget.
-
getLineEdit
Deprecated.The line edit.Returns the line edit which works in conjunction with this date picker.
-
getDisplayWidget
Deprecated.The display widget.Returns the icon which activates the popup.
-
getPopupWidget
Deprecated.The popup widget.Returns the popup widget that contains the calendar.
-
getDate
Deprecated.The current date.Reads the current date from the
getLineEdit()
.Returns
null
if the date could not be parsed using the currentgetFormat()
.
- See Also:
-
setDate
Deprecated.Sets the current date.Does nothing if the current date is
Null
.- See Also:
-
setEnabled
public void setEnabled(boolean enabled) Deprecated.Sets whether the widget is enabled.This is the oppositie of
setDisabled()
. -
setDisabled
public void setDisabled(boolean disabled) Deprecated.Description copied from class:WWidget
Sets whether the widget is disabled.Enables or disables the widget (including all its descendant widgets). setDisabled(false) will enable this widget and all descendant widgets that are not disabled. A widget is only enabled if it and all its ancestors in the widget tree are disabled.
Typically, a disabled form widget will not allow changing the value, and disabled widgets will not react to mouse click events.
- Overrides:
setDisabled
in classWCompositeWidget
- See Also:
-
setHidden
Deprecated.Hide/unhide the widget.- Overrides:
setHidden
in classWCompositeWidget
-
setBottom
Deprecated.Sets the bottom of the valid date range. -
getBottom
Deprecated.Returns the bottom date of the valid range. -
setTop
Deprecated.Sets the top of the valid date range. -
getTop
Deprecated.Returns the top date of the valid range. -
changed
Deprecated.Signal emitted when the value has changed.This signal is emitted when a new date has been entered (either through the line edit, or through the calendar popup).
-
setPopupVisible
public void setPopupVisible(boolean visible) Deprecated.Shows or hides the popup. -
popupClosed
Deprecated.A signal which indicates that the popup has been closed.The signal is only fired when the popup has been closed by the user.
-
render
Deprecated.Description copied from class:WWidget
Renders the widget.This function renders the widget (or an update for the widget), after this has been scheduled using
scheduleRender()
.The default implementation will render the widget by serializing changes to JavaScript and HTML. You may want to reimplement this widget if you have been postponing some of the layout / rendering implementation until the latest moment possible. In that case you should make sure you call the base implementation however.
- Overrides:
render
in classWCompositeWidget
-
WDateEdit