|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.impl.InputElement
org.zkoss.zul.impl.FormatInputElement
org.zkoss.zul.impl.NumberInputElement
public abstract class NumberInputElement
A skeletal implementation for number-type input box.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.zkoss.zul.impl.InputElement |
|---|
InputElement.ExtraCtrl |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH |
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Constructor Summary | |
|---|---|
NumberInputElement()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
formatNumber(java.lang.Object value,
java.lang.String defaultFormat)
Formats a number (Integer, BigDecimal...) into a string. |
int |
getRoundingMode()
Returns the rounding mode. |
void |
setRoundingMode(int mode)
Sets the rounding mode. |
void |
setRoundingMode(java.lang.String name)
Sets the rounding mode by the name. |
protected java.lang.Object[] |
toNumberOnly(java.lang.String val)
Filters out non digit characters, such comma and whitespace, from the specified value. |
| Methods inherited from class org.zkoss.zul.impl.FormatInputElement |
|---|
getFormat, getOuterAttrs, isAsapRequired, setFormat |
| Methods inherited from class org.zkoss.zul.impl.InputElement |
|---|
checkUserError, clearErrorMessage, coerceFromString, coerceToString, getAreaText, getCols, getConstraint, getErrorMessage, getInnerAttrs, getMaxlength, getName, getRawText, getRawValue, getTabindex, getTargetValue, getText, getType, isChildable, isDisabled, isMultiline, isReadonly, isValid, newExtraCtrl, onWrongValue, select, setCols, setConstraint, setConstraint, setDisabled, setMaxlength, setName, setRawValue, setReadonly, setSelectedText, setSelectionRange, setTabindex, setText, showCustomError, validate |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getAllOnClickAttrs, getContext, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex |
| Methods inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumberInputElement()
| Method Detail |
|---|
public void setRoundingMode(int mode)
mode - 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 and BigDecimal.ROUND_UP
java.lang.UnsupportedOperationException - if Java 5 or belowpublic void setRoundingMode(java.lang.String name)
name - the rounding mode's name. Allowed value:
java.lang.UnsupportedOperationException - if Java 5 or belowRoundingModespublic int getRoundingMode()
Default: BigDecimal.ROUND_HALF_EVEN.
protected java.lang.String formatNumber(java.lang.Object value,
java.lang.String defaultFormat)
A utility to assist the handling of numeric data.
defaultFormat - used if FormatInputElement.getFormat() returns null.
If defaultFormat and FormatInputElement.getFormat() are both null,
the system's default format is used.toNumberOnly(java.lang.String)protected java.lang.Object[] toNumberOnly(java.lang.String val)
formatNumber(java.lang.Object, java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||