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>
ImmutableSpinnercomponentAn edit box for holding a constrained integer.
Constraint
You could specify what value to accept for input controls by use of the
constraintattribute. It could be a combination ofno emptyand 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 classISpinner.BuilderBuilds instances of typeISpinner.static classISpinner.UpdaterBuilds an updater of typeISpinnerforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetStep()Returns the step of spinnerdefault java.lang.StringgetWidgetClass()Returns the client widget class.default booleanisButtonVisible()Returns whether the button (on the right of the spinner) is visible.static ISpinnerof(int value)Returns the instance with the given value.static ISpinnerof(java.lang.Integer value)Returns the instance with the given value.static ISpinnerofCols(int cols)Returns the instance with the given cols.static ISpinnerofConstraint(java.lang.String constraint)Returns the instance with the given constraint.static ISpinnerofId(java.lang.String id)Returns the instance with the given id.ISpinnerwithButtonVisible(boolean buttonVisible)Returns a copy ofthisimmutable component with the specifiedbuttonVisible.ISpinnerwithStep(int step)Returns a copy ofthisimmutable component with the specifiedstep.ISpinnerwithValue(java.lang.Integer value)Returns a copy ofthisimmutable 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:IInputElementReturns a copy ofthisimmutable component with the specifiedvalue.Sets the value of the input component.
- Specified by:
withValuein interfaceIInputElement<ISpinner,java.lang.Integer>- Parameters:
value- The value of the input component.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.inp.Spinner"- Specified by:
getWidgetClassin interfaceIComponent<ISpinner>
-
getStep
default int getStep()
Returns the step of spinnerDefault:
1
-
withStep
ISpinner withStep(int step)
Returns a copy ofthisimmutable component with the specifiedstep.Sets the step of spinner
- Parameters:
step- The step of the spinnerDefault:
1.- Returns:
- A modified copy of the
thisobject
-
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 ofthisimmutable component with the specifiedbuttonVisible.Sets whether the button (on the right of the spinner) is visible.
- Parameters:
buttonVisible-falseto disable the button visibility.Default:
true.- Returns:
- A modified copy of the
thisobject
-
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
-
-