Class WTimeEdit
public class WTimeEdit extends WLineEdit
- See Also:
WTime
,Styling through CSS is not applicable.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WLineEdit
WLineEdit.EchoMode, WLineEdit.InputMaskFlag
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Field Summary
Fields inherited from class eu.webtoolkit.jwt.WInteractWidget
dragTouchEndSlot_, dragTouchSlot_
-
Constructor Summary
Constructors Constructor Description WTimeEdit()
Creates a new time edit.WTimeEdit(WContainerWidget parent)
Creates a new time edit. -
Method Summary
Modifier and Type Method Description WTime
getBottom()
Returns the lower limit of the valid time range.java.lang.String
getFormat()
Returns the format.int
getHourStep()
Returns the step size for the hours.int
getMillisecondStep()
Returns the step size for the milliseconds.int
getMinuteStep()
Returns the step size for the minutes.int
getSecondStep()
Returns the step size for the seconds.WTime
getTime()
Returns the time.WTime
getTop()
Returns the upper limit of the valid time range.WTimeValidator
getValidator()
Returns the validator.boolean
isWrapAroundEnabled()
Returns whether wraparound is enabled.void
load()
Loads content just before the widget is used.protected void
propagateSetEnabled(boolean enabled)
Propagates that a widget was enabled or disabled through children.void
remove()
Destructor.protected void
render(java.util.EnumSet<RenderFlag> flags)
Renders the widget.void
setBottom(WTime bottom)
Sets the lower limit of the valid time range.void
setFormat(java.lang.String format)
Sets the format of the Time.void
setHidden(boolean hidden, WAnimation animation)
Sets the hidden state of this widget.void
setHourStep(int step)
Sets the step size for the hours.void
setMillisecondStep(int step)
Sets the step size for the milliseconds.void
setMinuteStep(int step)
Sets the step size for the minutes.void
setSecondStep(int step)
Sets the step size for the seconds.void
setTime(WTime time)
Sets the time.void
setTop(WTime top)
Sets the upper limit of the valid time range.void
setWrapAroundEnabled(boolean enabled)
Enables or disables wraparound.Methods inherited from class eu.webtoolkit.jwt.WLineEdit
boxBorder, boxPadding, getCursorPosition, getDisplayText, getDomChanges, getEchoMode, getInputMask, getMaxLength, getSelectedText, getSelectionStart, getText, getTextSize, getValueText, hasSelectedText, isAutoComplete, setAutoComplete, setEchoMode, setFormData, setInputMask, setInputMask, setInputMask, setInputMask, setMaxLength, setSelection, setText, setTextSize, setValueText, textInput, validate
Methods inherited from class eu.webtoolkit.jwt.WFormWidget
changed, enableAjax, getEmptyText, getLabel, getPlaceholderText, getTabIndex, isCanReceiveFocus, isReadOnly, refresh, selected, setEmptyText, setEnabled, setPlaceholderText, setReadOnly, setToolTip, setValidator, validated
Methods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, getMouseOverDelay, isEnabled, keyPressed, keyWentDown, keyWentUp, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, setDraggable, setDraggable, setDraggable, setDraggable, setMouseOverDelay, setPopup, touchEnded, touchMoved, touchStarted, unsetDraggable
Methods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, blurred, callJavaScriptMember, childrenChanged, createDomElement, doJavaScript, escapeText, escapeText, escapeText, escapeText, find, findById, focussed, getAttributeValue, getBaseZIndex, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getHtmlTagName, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getScrollVisibilityMargin, getStyleClass, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, hasFocus, hasStyleClass, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isScrollVisibilityEnabled, isScrollVisible, isSetFirstFocus, isThemeStyleEnabled, isVisible, jsStringLiteral, jsStringLiteral, parentResized, parentResized, propagateSetVisible, removeScript, removeStyleClass, resize, scrollVisibilityChanged, setAttributeValue, setBaseZIndex, setCanReceiveFocus, setClearSides, setDecorationStyle, setDeferredToolTip, setDisabled, setFloatSide, setFocus, setHiddenKeepsGeometry, setHtmlTagName, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setOffsets, setPositionScheme, setScrollVisibilityEnabled, setScrollVisibilityMargin, setSelectable, setStyleClass, setTabIndex, setThemeStyleEnabled, setVerticalAlignment, updateSignalConnection, voidEventSignal
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, isLayoutSizeAware, layoutSizeChanged, needsRerender, positionAt, positionAt, removeChild, removeStyleClass, render, resize, scheduleRender, scheduleRender, scheduleRender, setClearSides, setDeferredToolTip, setFocus, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setObjectName, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getObjectName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WTimeEdit
Creates a new time edit. -
WTimeEdit
public WTimeEdit()Creates a new time edit.
-
-
Method Details
-
remove
public void remove()Description copied from class:WFormWidget
Destructor.If a label was associated with the widget, its buddy is reset to
null
.- Overrides:
remove
in classWFormWidget
- See Also:
WContainerWidget.removeWidget(WWidget widget)
-
setTime
Sets the time.Does nothing if the current time is
Null
.- See Also:
getTime()
-
getTime
Returns the time.Returns an invalid time (for which
WTime.isValid()
returnsfalse
) if the time could not be parsed using the currentgetFormat()
.- See Also:
setTime(WTime time)
,WLineEdit.getText()
-
getValidator
Returns the validator.- Overrides:
getValidator
in classWFormWidget
- See Also:
WTimeValidator
-
setFormat
public void setFormat(java.lang.String format)Sets the format of the Time. -
getFormat
public java.lang.String getFormat()Returns the format. -
setHidden
Description copied from class:WFormWidget
Sets the hidden state of this widget.If the widget has a label, it is hidden and shown together with this widget.
- Overrides:
setHidden
in classWFormWidget
-
setBottom
Sets the lower limit of the valid time range. -
getBottom
Returns the lower limit of the valid time range. -
setTop
Sets the upper limit of the valid time range. -
getTop
Returns the upper limit of the valid time range. -
setHourStep
public void setHourStep(int step)Sets the step size for the hours. -
getHourStep
public int getHourStep()Returns the step size for the hours. -
setMinuteStep
public void setMinuteStep(int step)Sets the step size for the minutes. -
getMinuteStep
public int getMinuteStep()Returns the step size for the minutes. -
setSecondStep
public void setSecondStep(int step)Sets the step size for the seconds. -
getSecondStep
public int getSecondStep()Returns the step size for the seconds. -
setMillisecondStep
public void setMillisecondStep(int step)Sets the step size for the milliseconds. -
getMillisecondStep
public int getMillisecondStep()Returns the step size for the milliseconds. -
setWrapAroundEnabled
public void setWrapAroundEnabled(boolean enabled)Enables or disables wraparound.Wraparound is enabled by default
-
isWrapAroundEnabled
public boolean isWrapAroundEnabled()Returns whether wraparound is enabled. -
load
public void load()Description copied from class:WWidget
Loads content just before the widget is used.This method is called after a widget is inserted in the widget hierarchy and fully constructed, but before the widget is rendered. Widgets that get inserted in the widget hierarchy will be rendered. Visible widgets are rendered immediately, and invisible widgets in the back-ground (or not for a plain HTML session). This method is called when the widget is directly or indirectly inserted into the widget tree.
The default implementation simply propagates the load signal to its children. You may want to override this method to delay loading of resource-intensive contents.
During the life-time of a widget, this method may be called multiple times, so you should make sure that you do a deferred initializiation only once.
- Overrides:
load
in classWInteractWidget
-
render
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.
-
propagateSetEnabled
protected void propagateSetEnabled(boolean enabled)Description copied from class:WWidget
Propagates that a widget was enabled or disabled through children.When enabling or disabling a widget, you usually also want to disable contained children. This method is called by
setDisabled()
to propagate its state to all children.You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.
- Overrides:
propagateSetEnabled
in classWFormWidget
-