Class AbstractDecimalEditor<T extends java.lang.Number>
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<T>
-
- com.hybris.cockpitng.editors.impl.AbstractTextBasedEditorRenderer<T>
-
- com.hybris.cockpitng.editor.decimal.AbstractDecimalEditor<T>
-
- Type Parameters:
T- supported decimal classes:Float,Double
- All Implemented Interfaces:
CockpitEditorRenderer<T>,FormattableNumberEditor<T>
- Direct Known Subclasses:
DefaultDecimalEditor,DefaultFloatEditor
public abstract class AbstractDecimalEditor<T extends java.lang.Number> extends AbstractTextBasedEditorRenderer<T> implements FormattableNumberEditor<T>
-
-
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 AbstractDecimalEditor(java.lang.Class<T> valueType, T minValue, T maxValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TcoerceFromString(org.zkoss.zul.impl.InputElement editorView, java.lang.String text)Converts string value to a real value.protected TgetRawValue(org.zkoss.zul.impl.InputElement editorView)Extracts value of the given editor component.voidrender(org.zkoss.zk.ui.Component parent, EditorContext<T> context, EditorListener<T> listener)Creates a new editor component and attaches it to the specifiedComponentcomponent.protected voidsetRawValue(org.zkoss.zul.impl.InputElement editorView, T rawValue)Sets the value to the given editor component.protected voidvalidateRange(org.zkoss.zk.ui.Component component, EditorContext<T> context, T object)-
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, T rawValue)Description copied from class:AbstractTextBasedEditorRendererSets the value to the given editor component.- Specified by:
setRawValuein classAbstractTextBasedEditorRenderer<T extends java.lang.Number>- Parameters:
editorView- the underlying editor componentrawValue- the value
-
getRawValue
protected T getRawValue(org.zkoss.zul.impl.InputElement editorView)
Description copied from class:AbstractTextBasedEditorRendererExtracts value of the given editor component.- Specified by:
getRawValuein classAbstractTextBasedEditorRenderer<T extends java.lang.Number>- Parameters:
editorView- the underlying editor component- Returns:
- the value
-
coerceFromString
protected T coerceFromString(org.zkoss.zul.impl.InputElement editorView, java.lang.String text)
Description copied from class:AbstractTextBasedEditorRendererConverts string value to a real value.- Specified by:
coerceFromStringin classAbstractTextBasedEditorRenderer<T extends java.lang.Number>- Parameters:
editorView- the underlying editor componenttext- the string vale- Returns:
- the value
-
render
public void render(org.zkoss.zk.ui.Component parent, EditorContext<T> context, EditorListener<T> listener)Description copied from interface:CockpitEditorRendererCreates a new editor component and attaches it to the specifiedComponentcomponent.- Specified by:
renderin interfaceCockpitEditorRenderer<T extends java.lang.Number>- 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
-
validateRange
protected void validateRange(org.zkoss.zk.ui.Component component, EditorContext<T> context, T object)
-
-