eu.webtoolkit.jwt
Class WDoubleSpinBox

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by eu.webtoolkit.jwt.WWidget
          extended by eu.webtoolkit.jwt.WWebWidget
              extended by eu.webtoolkit.jwt.WInteractWidget
                  extended by eu.webtoolkit.jwt.WFormWidget
                      extended by eu.webtoolkit.jwt.WLineEdit
                          extended by eu.webtoolkit.jwt.WAbstractSpinBox
                              extended by eu.webtoolkit.jwt.WDoubleSpinBox

public class WDoubleSpinBox
extends WAbstractSpinBox

An input control for fixed point numbers.

The spin box provides a control for entering a fixed point number. It consists of a line edit, and buttons which allow to increase or decrease the value. If you rather need input of an integer number number, use WDoubleSpinBox instead.

WDoubleSpinBox is an inline widget.

CSS

See WAbstractSpinBox.

See Also:

Note: A spinbox configures a validator for validating the input. Therefore you cannot set a validator yourself.


Nested Class Summary
 
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WLineEdit
WLineEdit.EchoMode
 
Constructor Summary
WDoubleSpinBox()
          Creates a spin-box.
WDoubleSpinBox(WContainerWidget parent)
          Creates a spin-box.
 
Method Summary
 double getMaximum()
          Returns the maximum value.
 double getMinimum()
          Returns the minimum value.
 double getSingleStep()
          Returns the step value.
 double getValue()
          Returns the value.
 void setDecimals(int decimals)
          Sets the precision.
 void setMaximum(double maximum)
          Sets the maximum value.
 void setMinimum(double minimum)
          Sets the minimum value.
 void setRange(double minimum, double maximum)
          Sets the range.
 void setSingleStep(double step)
          Sets the step value.
 void setValue(double value)
          Sets the value.
 Signal1<java.lang.Double> valueChanged()
          A signal that indicates when the value has changed.
 
Methods inherited from class eu.webtoolkit.jwt.WAbstractSpinBox
boxPadding, getPrefix, getSuffix, isNativeControl, render, setNativeControl, setPrefix, setSuffix, setText
 
Methods inherited from class eu.webtoolkit.jwt.WLineEdit
boxBorder, getCursorPosition, getEchoMode, getMaxLength, getSelectedText, getSelectionStart, getText, getTextSize, getValueText, hasSelectedText, setEchoMode, setMaxLength, setTextSize, setValueText
 
Methods inherited from class eu.webtoolkit.jwt.WFormWidget
blurred, changed, enableAjax, focussed, getEmptyText, getLabel, getTabIndex, getValidator, hasFocus, isReadOnly, propagateSetEnabled, refresh, remove, selected, setEmptyText, setEnabled, setFocus, setFocus, setHidden, setReadOnly, setTabIndex, setValidator, validate, validated
 
Methods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted
 
Methods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, callJavaScriptMember, childrenChanged, doJavaScript, domCanBeSaved, escapeText, escapeText, escapeText, escapeText, find, getAttributeValue, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getStyleClass, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isVisible, jsStringLiteral, jsStringLiteral, removeScript, removeStyleClass, resize, setAttributeValue, setClearSides, setDecorationStyle, setDisabled, setFloatSide, setHiddenKeepsGeometry, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setOffsets, setPopup, setPositionScheme, setSelectable, setStyleClass, setToolTip, setVerticalAlignment, updateSignalConnection
 
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, 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
addChild, getObjectName, setObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WDoubleSpinBox

public WDoubleSpinBox(WContainerWidget parent)
Creates a spin-box.

The range is (0.0 - 99.99), the step size 1.0, and the spin box has a precision of 2 decimals.

The initial value is 0.0.


WDoubleSpinBox

public WDoubleSpinBox()
Creates a spin-box.

Calls this((WContainerWidget)null)

Method Detail

setMinimum

public void setMinimum(double minimum)
Sets the minimum value.

The default value is 0.0.


getMinimum

public double getMinimum()
Returns the minimum value.

See Also:
setMinimum(double minimum)

setMaximum

public void setMaximum(double maximum)
Sets the maximum value.

The default value is 99.99.


getMaximum

public double getMaximum()
Returns the maximum value.

See Also:
setMaximum(double maximum)

setRange

public void setRange(double minimum,
                     double maximum)
Sets the range.

See Also:
setMinimum(double minimum), setMaximum(double maximum)

setSingleStep

public void setSingleStep(double step)
Sets the step value.

The default value is 1.0.


getSingleStep

public double getSingleStep()
Returns the step value.

See Also:
setSingleStep(double step)

setDecimals

public void setDecimals(int decimals)
Sets the precision.

This sets the number of digits after the decimal point shown

The default precision is 2.


setValue

public void setValue(double value)
Sets the value.

value must be a value between getMinimum() and getMaximum().

The default value is 0


getValue

public double getValue()
Returns the value.


valueChanged

public Signal1<java.lang.Double> valueChanged()
A signal that indicates when the value has changed.

This signal is emitted when setValue() is called.

See Also:
setValue(double value)