Zimlet JavaScript API Reference - DwtSpinner

Class DwtSpinner


Extends DwtControl.

Represents a entry field for entering numeric values. Has 2 arrow buttons that can be used to increment or decrement the current value with a step that can be specified.

CSS

  • DwtSpinner -- a table that contains the spinner elements
  • DwtSpinner-inputCell -- the TD that holds the input field
  • DwtSpinner-btnCell -- a DIV holding the 2 arrow buttons
  • DwtSpinner-upBtn -- the DIV button for increment operation
  • DwtSpinner-downBtn -- the DIV button for decrement operation
  • DwtSpinner-up-pressed -- upBtn while pressed
  • DwtSpinner-down-pressed -- downBtn while pressed
  • DwtSpinner-disabled -- the table gets this class added when the widget is disabled


Defined in: DwtSpinner.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtSpinner(params)
Creates a spinner control.
Method Summary
Method Attributes Method Name and Description
 
Gets the input element.
 
Gets the value.
 
setValue(val)
Sets the value.
Methods borrowed from class DwtControl:
addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, dispose, focus, getBounds, getClassName, getContent, getCursor, getData, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTabGroupMember, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
DwtSpinner(params)
Creates a spinner control.
Author: Mihai Bazon.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} params.parent
the parent widget
{string} params.className
the class name for the containing DIV (see DwtControl)
{string} params.posStyle
the positioning style (see DwtControl)
{number} params.max
the maximum value
{number} params.min
the minimum value
{number} params.size
size of the input field, as in <input size="X">
{number} params.value
the original value of the input field
{number} params.maxLen
the maximum length of the text in the input field
{number} params.step
the amount to add or substract when the arrow buttons are pressed
{number} params.decimals Optional, Default: 0
Number of decimal digits. Specify 0 to allow only integers (default). Pass null to allow float numbers but not enforce decimals.
{string} params.align Optional, Default: "right"
the align of the input field text (see dwt.css)
Method Detail
{Element} getInputElement()
Gets the input element.
Returns:
{Element} the element

{number} getValue()
Gets the value.
Returns:
{number} the value

setValue(val)
Sets the value.
Parameters:
{number} val
the value

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:29 GMT-0400 (EDT)