Class DefaultBigDecimalEditor
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<T>
-
- com.hybris.cockpitng.editors.impl.AbstractTextBasedEditorRenderer<java.math.BigDecimal>
-
- com.hybris.cockpitng.editor.defaultbigdecimal.DefaultBigDecimalEditor
-
- All Implemented Interfaces:
CockpitEditorRenderer<java.math.BigDecimal>,FormattableNumberEditor<java.math.BigDecimal>
public class DefaultBigDecimalEditor extends AbstractTextBasedEditorRenderer<java.math.BigDecimal> implements FormattableNumberEditor<java.math.BigDecimal>
Support forBigDecimal
-
-
Field Summary
-
Fields inherited from class com.hybris.cockpitng.editors.impl.AbstractTextBasedEditorRenderer
SETTING_INPUT_INSTANT
-
Fields inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
HEADER_LABEL_TOOLTIP, ON_ADD_EVENT, ON_DELETE_EVENT, YW_EDITOR_AREA_LABEL_CONTAINER
-
Fields inherited from interface com.hybris.cockpitng.editors.CockpitEditorRenderer
INITIAL_EDIT_STRING
-
Fields inherited from interface com.hybris.cockpitng.editors.FormattableNumberEditor
PARAMETER_NUMBER_FORMAT
-
-
Constructor Summary
Constructors Constructor Description DefaultBigDecimalEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.math.BigDecimalcoerceFromString(org.zkoss.zul.impl.InputElement editorView, java.lang.String text)Converts string value to a real value.protected java.math.BigDecimalgetRawValue(org.zkoss.zul.impl.InputElement editorView)Extracts value of the given editor component.voidrender(org.zkoss.zk.ui.Component parent, EditorContext<java.math.BigDecimal> context, EditorListener<java.math.BigDecimal> listener)Creates a new editor component and attaches it to the specifiedComponentcomponent.protected voidsetRawValue(org.zkoss.zul.impl.InputElement editorView, java.math.BigDecimal rawValue)Sets the value to the given editor component.-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractTextBasedEditorRenderer
clearInvalidInputAndNotify, handleChangeEvent, handleChangeEvent, handleChangingEvent, handleReadOnly, hasInvalidInput, initViewComponent, isPrimitive, onCancelEvent, onChangeEvent, onChangingEvent, onFocusEvent, onOkEvent
-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecorator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.cockpitng.editors.FormattableNumberEditor
setNumberFormat
-
-
-
-
Method Detail
-
setRawValue
protected void setRawValue(org.zkoss.zul.impl.InputElement editorView, java.math.BigDecimal rawValue)Description copied from class:AbstractTextBasedEditorRendererSets the value to the given editor component.- Specified by:
setRawValuein classAbstractTextBasedEditorRenderer<java.math.BigDecimal>- Parameters:
editorView- the underlying editor componentrawValue- the value
-
getRawValue
protected java.math.BigDecimal getRawValue(org.zkoss.zul.impl.InputElement editorView)
Description copied from class:AbstractTextBasedEditorRendererExtracts value of the given editor component.- Specified by:
getRawValuein classAbstractTextBasedEditorRenderer<java.math.BigDecimal>- Parameters:
editorView- the underlying editor component- Returns:
- the value
-
coerceFromString
protected java.math.BigDecimal coerceFromString(org.zkoss.zul.impl.InputElement editorView, java.lang.String text) throws org.zkoss.zk.ui.WrongValueExceptionDescription copied from class:AbstractTextBasedEditorRendererConverts string value to a real value.- Specified by:
coerceFromStringin classAbstractTextBasedEditorRenderer<java.math.BigDecimal>- Parameters:
editorView- the underlying editor componenttext- the string vale- Returns:
- the value
- Throws:
org.zkoss.zk.ui.WrongValueException
-
render
public void render(org.zkoss.zk.ui.Component parent, EditorContext<java.math.BigDecimal> context, EditorListener<java.math.BigDecimal> listener)Description copied from interface:CockpitEditorRendererCreates a new editor component and attaches it to the specifiedComponentcomponent.- Specified by:
renderin interfaceCockpitEditorRenderer<java.math.BigDecimal>- Parameters:
parent- parent component the editor should be attached tocontext- the context for the editor creationlistener- the listener to notify the rest of the world about value changes and other events
-
-