|
||||||||||
| 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
org.zkoss.zul.Intbox
public class Intbox
An edit box for holding an integer.
| 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 | |
|---|---|
Intbox()
|
|
Intbox(int value)
|
|
| Method Summary | |
|---|---|
protected java.lang.Object |
coerceFromString(java.lang.String value)
Coerces the value passed to InputElement.setText(java.lang.String). |
protected java.lang.String |
coerceToString(java.lang.Object value)
Coerces the value passed to InputElement.setText(java.lang.String). |
java.lang.Integer |
getValue()
Returns the value (in Integer), might be null unless a constraint stops it. |
int |
intValue()
Returns the value in int. |
void |
setValue(java.lang.Integer value)
Sets the value (in Integer). |
| Methods inherited from class org.zkoss.zul.impl.NumberInputElement |
|---|
formatNumber, getRoundingMode, setRoundingMode, setRoundingMode, toNumberOnly |
| Methods inherited from class org.zkoss.zul.impl.FormatInputElement |
|---|
getFormat, getOuterAttrs, isAsapRequired, setFormat |
| Methods inherited from class org.zkoss.zul.impl.InputElement |
|---|
checkUserError, clearErrorMessage, 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 Intbox()
public Intbox(int value)
throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueException| Method Detail |
|---|
public java.lang.Integer getValue()
throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueException - if user entered a wrong value
public int intValue()
throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueException
public void setValue(java.lang.Integer value)
throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueException - if value is wrong
protected java.lang.Object coerceFromString(java.lang.String value)
throws org.zkoss.zk.ui.WrongValueException
InputElementInputElement.setText(java.lang.String).
Deriving note:
If you want to store the value in other type, say BigDecimal,
you have to override InputElement.coerceToString(java.lang.Object) and InputElement.coerceFromString(java.lang.String)
to convert between a string and your targeting type.
Moreover, when Textbox is called, it calls this method
with value = null. Derives shall handle this case properly.
coerceFromString in class InputElementorg.zkoss.zk.ui.WrongValueExceptionprotected java.lang.String coerceToString(java.lang.Object value)
InputElementInputElement.setText(java.lang.String).
Default: convert null to an empty string.
Deriving note:
If you want to store the value in other type, say BigDecimal,
you have to override InputElement.coerceToString(java.lang.Object) and InputElement.coerceFromString(java.lang.String)
to convert between a string and your targeting type.
coerceToString in class InputElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||