Interface INumberInputElement<I extends INumberInputElement,ValueType>
-
- All Superinterfaces:
IChildrenOfInputgroup<I>
,IComponent<I>
,IFormatInputElement<I,ValueType>
,IHtmlBasedComponent<I>
,IInputElement<I,ValueType>
,IReadonly<I>
,IXulElement<I>
- All Known Subinterfaces:
IDecimalbox
,IDoublebox
,IDoublespinner
,IIntbox
,ILongbox
,ISpinner
public interface INumberInputElement<I extends INumberInputElement,ValueType> extends IFormatInputElement<I,ValueType>
ImmutableNumberInputElement
interface.A skeletal implementation for number-type input component.
Per-component Locale
You can add a locale per component for all of the INumberInputElement.
For example,- Author:
- katherine
- See Also:
NumberInputElement
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getCols()
Returns the cols which determines the visible width, in characters.java.util.Locale
getLocale()
Returns the locale associated with this number input componentdefault int
getRoundingMode()
Returns the rounding mode.default I
withLocale(java.lang.String locale)
Returns a copy ofthis
immutable component with the specifiedlocale
.I
withLocale(java.util.Locale locale)
Returns a copy ofthis
immutable component with the specifiedlocale
.I
withRoundingMode(int roundingMode)
Returns a copy ofthis
immutable component with the specifiedroundingMode
.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, 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, withValue
-
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
-
-
-
-
Method Detail
-
getLocale
@Nullable java.util.Locale getLocale()
Returns the locale associated with this number input componentDefault:
null
, ifLocales.getCurrent()
is preferred
-
withLocale
I withLocale(@Nullable java.util.Locale locale)
Returns a copy ofthis
immutable component with the specifiedlocale
.Sets the locale used to identify the symbols of this number input component.
If the format of
IFormatInputElement.getFormat()
is null, the format is assumed fromgetDefaultFormat()
.- Parameters:
locale
- The preferred localeDefault:
null
, ifLocales.getCurrent()
is preferred.- Returns:
- A modified copy of the
this
object
-
withLocale
default I withLocale(java.lang.String locale)
Returns a copy ofthis
immutable component with the specifiedlocale
.Sets the locale used to identify the symbols of this number input component.
If the format of
IFormatInputElement.getFormat()
is null, the format is assumed fromgetDefaultFormat()
.- Parameters:
locale
- The preferred localeDefault:
null
, ifLocales.getCurrent()
is preferred.- Returns:
- A modified copy of the
this
object
-
getCols
default int getCols()
Returns the cols which determines the visible width, in characters.Default:
11
(non-positive means the same as browser's default).- Specified by:
getCols
in interfaceIInputElement<I extends INumberInputElement,ValueType>
-
getRoundingMode
default int getRoundingMode()
Returns the rounding mode.Default:
BigDecimal.ROUND_HALF_EVEN
.
-
withRoundingMode
I withRoundingMode(int roundingMode)
Returns a copy ofthis
immutable component with the specifiedroundingMode
.Sets the rounding mode.
- Parameters:
roundingMode
- The rounding mode. Allowed value:BigDecimal.ROUND_CEILING
,BigDecimal.ROUND_DOWN
,BigDecimal.ROUND_FLOOR
,BigDecimal.ROUND_HALF_DOWN
,BigDecimal.ROUND_HALF_UP
,BigDecimal.ROUND_HALF_EVEN
,BigDecimal.ROUND_UNNECESSARY
andBigDecimal.ROUND_UP
Default:
BigDecimal.ROUND_HALF_EVEN
.- Returns:
- A modified copy of the
this
object
-
-