Package org.zkoss.stateless.sul
Interface ISpinner
-
- All Superinterfaces:
IAnyGroup<ISpinner>
,IChildrenOfInputgroup<ISpinner>
,IComponent<ISpinner>
,IFormatInputElement<ISpinner,java.lang.Integer>
,IHtmlBasedComponent<ISpinner>
,IInputElement<ISpinner,java.lang.Integer>
,INumberInputElement<ISpinner,java.lang.Integer>
,IReadonly<ISpinner>
,IXulElement<ISpinner>
public interface ISpinner extends INumberInputElement<ISpinner,java.lang.Integer>, IAnyGroup<ISpinner>
ImmutableSpinner
componentAn edit box for holding a constrained integer.
Constraint
You could specify what value to accept for input controls by use of the
constraint
attribute. It could be a combination ofno empty
and themin
(minimum) andmax
(maximum) to spinner.}.
For example,ISpinner.ofConstraint("no empty, min -2 max 6: between -2 to 6");
- Author:
- katherine
- See Also:
Spinner
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ISpinner.Builder
Builds instances of typeISpinner
.static class
ISpinner.Updater
Builds an updater of typeISpinner
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getStep()
Returns the step of spinnerdefault java.lang.String
getWidgetClass()
Returns the client widget class.default boolean
isButtonVisible()
Returns whether the button (on the right of the spinner) is visible.static ISpinner
of(int value)
Returns the instance with the given value.static ISpinner
of(java.lang.Integer value)
Returns the instance with the given value.static ISpinner
ofCols(int cols)
Returns the instance with the given cols.static ISpinner
ofConstraint(java.lang.String constraint)
Returns the instance with the given constraint.static ISpinner
ofId(java.lang.String id)
Returns the instance with the given id.ISpinner
withButtonVisible(boolean buttonVisible)
Returns a copy ofthis
immutable component with the specifiedbuttonVisible
.ISpinner
withStep(int step)
Returns a copy ofthis
immutable component with the specifiedstep
.ISpinner
withValue(java.lang.Integer value)
Returns a copy ofthis
immutable component with the specifiedvalue
.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IFormatInputElement
getFormat, withFormat
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IInputElement
getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getValue, isDisabled, isInplace, withCols, withConstraint, withDisabled, withErrorboxIconSclass, withErrorboxSclass, withErrorMessage, withInplace, withInputAttributes, withInstant, withMaxlength, withName, withPlaceholder
-
Methods inherited from interface org.zkoss.stateless.sul.INumberInputElement
getCols, getLocale, getRoundingMode, withLocale, withLocale, withRoundingMode
-
Methods inherited from interface org.zkoss.stateless.sul.IReadonly
isReadonly, withReadonly
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final ISpinner DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
withValue
ISpinner withValue(java.lang.Integer value)
Description copied from interface:IInputElement
Returns a copy ofthis
immutable component with the specifiedvalue
.Sets the value of the input component.
- Specified by:
withValue
in interfaceIInputElement<ISpinner,java.lang.Integer>
- Parameters:
value
- The value of the input component.Default:
null
.- Returns:
- A modified copy of the
this
object
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.inp.Spinner"
- Specified by:
getWidgetClass
in interfaceIComponent<ISpinner>
-
getStep
default int getStep()
Returns the step of spinnerDefault:
1
-
withStep
ISpinner withStep(int step)
Returns a copy ofthis
immutable component with the specifiedstep
.Sets the step of spinner
- Parameters:
step
- The step of the spinnerDefault:
1
.- Returns:
- A modified copy of the
this
object
-
isButtonVisible
default boolean isButtonVisible()
Returns whether the button (on the right of the spinner) is visible.Default:
true
.
-
withButtonVisible
ISpinner withButtonVisible(boolean buttonVisible)
Returns a copy ofthis
immutable component with the specifiedbuttonVisible
.Sets whether the button (on the right of the spinner) is visible.
- Parameters:
buttonVisible
-false
to disable the button visibility.Default:
true
.- Returns:
- A modified copy of the
this
object
-
of
static ISpinner of(java.lang.Integer value)
Returns the instance with the given value.- Parameters:
value
- The integer value of the spinner
-
of
static ISpinner of(int value)
Returns the instance with the given value.- Parameters:
value
- The integer value of the spinner
-
ofCols
static ISpinner ofCols(int cols)
Returns the instance with the given cols.- Parameters:
cols
- The cols which determines the visible width
-
ofConstraint
static ISpinner ofConstraint(java.lang.String constraint)
Returns the instance with the given constraint.- Parameters:
constraint
- The spinner constraint
-
ofId
static ISpinner ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id
- The id to identify this component
-
-