Class DefaultTimeEditor
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<T>
-
- com.hybris.cockpitng.editors.impl.AbstractTextBasedEditorRenderer<java.util.Date>
-
- com.hybris.cockpitng.editor.defaultdate.AbstractDateTimeEditor<org.zkoss.zul.Timebox>
-
- com.hybris.cockpitng.editor.defaultdate.DefaultTimeEditor
-
- All Implemented Interfaces:
CockpitEditorRenderer<java.util.Date>
public class DefaultTimeEditor extends AbstractDateTimeEditor<org.zkoss.zul.Timebox>
Default Editor forDatevalues regarding only time.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringTIME_FORMAT-
Fields inherited from class com.hybris.cockpitng.editor.defaultdate.AbstractDateTimeEditor
DATE_FORMAT_NONE, SELECTED_TIME_ZONE
-
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
-
-
Constructor Summary
Constructors Constructor Description DefaultTimeEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.DatecoerceFromString(org.zkoss.zul.impl.InputElement editorView, java.lang.String text)Converts string value to a real value.protected org.zkoss.zul.TimeboxcreateEditorView()Creates a view component.protected java.lang.StringgetDateFormat(int dateStyle)Determines a format string for specified format style (see:DateFormat)protected java.lang.StringgetFormatConfigurationParameter()Defines a name of configuration parameter that stands for a date format.voidinitTimeZone(org.zkoss.zul.Timebox box, EditorContext<java.util.Date> context)protected voidinitViewComponent(org.zkoss.zul.impl.InputElement editorView, EditorContext<java.util.Date> context, EditorListener<java.util.Date> listener)Adds event listeners to this editor component, parses the parameter for initial value etc.-
Methods inherited from class com.hybris.cockpitng.editor.defaultdate.AbstractDateTimeEditor
getDateFormat, getDateFormat, getDefaultDateFormat, getDefaultDateFormat, getInitialTimeZoneFromConfig, getPatternDateFormat, getRawValue, getRequiredStyle, getSessionTimeZoneAttribute, getZKDefaultTimeZone, handleReadOnly, render, setRawValue
-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractTextBasedEditorRenderer
clearInvalidInputAndNotify, handleChangeEvent, handleChangeEvent, handleChangingEvent, hasInvalidInput, isPrimitive, onCancelEvent, onChangeEvent, onChangingEvent, onFocusEvent, onOkEvent
-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecorator
-
-
-
-
Field Detail
-
TIME_FORMAT
protected static final java.lang.String TIME_FORMAT
- See Also:
- Constant Field Values
-
-
Method Detail
-
createEditorView
protected org.zkoss.zul.Timebox createEditorView()
Description copied from class:AbstractDateTimeEditorCreates a view component.- Specified by:
createEditorViewin classAbstractDateTimeEditor<org.zkoss.zul.Timebox>- Returns:
- view component
-
getDateFormat
protected java.lang.String getDateFormat(int dateStyle)
Description copied from class:AbstractDateTimeEditorDetermines a format string for specified format style (see:DateFormat)- Specified by:
getDateFormatin classAbstractDateTimeEditor<org.zkoss.zul.Timebox>- Parameters:
dateStyle- format style- Returns:
- format string
-
getFormatConfigurationParameter
protected java.lang.String getFormatConfigurationParameter()
Description copied from class:AbstractDateTimeEditorDefines a name of configuration parameter that stands for a date format.- Specified by:
getFormatConfigurationParameterin classAbstractDateTimeEditor<org.zkoss.zul.Timebox>- Returns:
- name of configuration parameter
-
initViewComponent
protected void initViewComponent(org.zkoss.zul.impl.InputElement editorView, EditorContext<java.util.Date> context, EditorListener<java.util.Date> listener)Description copied from class:AbstractTextBasedEditorRendererAdds event listeners to this editor component, parses the parameter for initial value etc.- Overrides:
initViewComponentin classAbstractDateTimeEditor<org.zkoss.zul.Timebox>- Parameters:
editorView- the editor component previously created in overridden methodCockpitEditorRenderer.render(org.zkoss.zk.ui.Component, com.hybris.cockpitng.editors.EditorContext, com.hybris.cockpitng.editors.EditorListener)context- the editor context
-
initTimeZone
public void initTimeZone(org.zkoss.zul.Timebox box, EditorContext<java.util.Date> context)- Overrides:
initTimeZonein classAbstractDateTimeEditor<org.zkoss.zul.Timebox>
-
coerceFromString
protected java.util.Date 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.util.Date>- Parameters:
editorView- the underlying editor componenttext- the string vale- Returns:
- the value
- Throws:
org.zkoss.zk.ui.WrongValueException
-
-