eu.webtoolkit.jwt
Class WSpinBox

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.WSpinBox

public class WSpinBox
extends WAbstractSpinBox

An input control for integer numbers.

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

WSpinBox 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
WSpinBox()
          Creates a spin-box.
WSpinBox(WContainerWidget parent)
          Creates a spin-box.
 
Method Summary
 int getMaximum()
          Returns the maximum value.
 int getMinimum()
          Returns the minimum value.
 int getSingleStep()
          Returns the step value.
 int getValue()
          Returns the value.
 void setMaximum(int maximum)
          Sets the maximum value.
 void setMinimum(int minimum)
          Sets the minimum value.
 void setRange(int minimum, int maximum)
          Sets the range.
 void setSingleStep(int step)
          Sets the step value.
 void setValue(int value)
          Sets the value.
 Signal1<java.lang.Integer> 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

WSpinBox

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

The range is (0 - 99) and the step size 1.

The initial value is 0.


WSpinBox

public WSpinBox()
Creates a spin-box.

Calls this((WContainerWidget)null)

Method Detail

setMinimum

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

The default value is 0.


getMinimum

public int getMinimum()
Returns the minimum value.

See Also:
setMinimum(int minimum)

setMaximum

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

The default value is 99.


getMaximum

public int getMaximum()
Returns the maximum value.

See Also:
setMaximum(int maximum)

setRange

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

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

setSingleStep

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

The default value is 1.


getSingleStep

public int getSingleStep()
Returns the step value.


setValue

public void setValue(int value)
Sets the value.

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

The default value is 0


getValue

public int getValue()
Returns the value.


valueChanged

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

This signal is emitted when setValue() is called.

See Also:
setValue(int value)