Interface UIEditor
- All Known Subinterfaces:
ConditionUIEditor,EnumUIEditor,ListUIEditor,ReferenceUIEditor
- All Known Implementing Classes:
AbstractConditionUIEditor,AbstractExtensibleConditionUIEditor,AbstractFeatureUIEditor,AbstractReferenceUIEditor,AbstractSimpleInputConditionUIEditor,AbstractTextBasedUIEditor,AbstractUIEditor,BaseStoreCheckboxUIEditor,BigDecimalUIEditor,CategoryVersionRadioEditor,CelumMediaCollectionUIEditor,CelumMediaReferenceCollectionUIEditor,CelumMediaReferenceUIEditor,CelumSimpleMediaReferenceUIEditor,CheckboxBooleanUIEditor,ClassUIEditor,CollectionUIEditor,CollectionUIEditorMedia,ContextAreaReferenceCollectionUIEditor,DefaultBooleanUIEditor,DefaultDateConditionUIEditor,DefaultDateUIEditor,DefaultDecimalConditionUIEditor,DefaultDecimalUIEditor,DefaultDummyUIEditor,DefaultEnumUIEditor,DefaultFeatureConditionUIEditor,DefaultFeatureUIEditor,DefaultFeatureUnitUIEditor,DefaultFloatConditionUIEditor,DefaultFloatUIEditor,DefaultImageUIEditor,DefaultIntConditionUIEditor,DefaultIntegerUIEditor,DefaultLongConditionUIEditor,DefaultLongUIEditor,DefaultMediaPreviewUIEditor,DefaultMediaReferenceCollectionUIEditor,DefaultMediaReferenceUIEditor,DefaultPKUIEditor,DefaultReferenceCollectionUIEditor,DefaultReferenceUIEditor,DefaultSelectUIEditor,DefaultSimpleMediaReferenceUIEditor,DefaultSimpleReferenceUIEditor,DefaultTextConditionUIEditor,DefaultTextUIEditor,DropdownBooleanUIEditor,GenericCollectionUIEditor,GenericRangeUIEditor,HmcLikeTextConditionUIEditor,ListViewCollectionEditor,MapUIEditor,MinimalReferenceUIEditor,NullableSelectUIEditor,ProductCodeReferenceUIEditor,ProductCodeReferenceUIEditor,SimpleReferenceUIEditor,UnitReferenceUIEditor,WysiwygUIEditor
public interface UIEditor
General interface to be used by editors.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.zkoss.zk.ui.HtmlBasedComponentcreateViewComponent(Object initialValue, Map<String, ? extends Object> parameters, EditorListener listener) Creates a new editor component and attaches it to the specifiedPagepage.getValue()Returns the value held by this editor.booleanReturns whether this editor is editable or notbooleanisInline()Returns whether this editor is an inline editor or not.booleanvoidsetEditable(boolean editable) Defines whether this editor shall be editable.voidsetFocus(org.zkoss.zk.ui.HtmlBasedComponent rootEditorComponent, boolean selectAll) Sets the focus on the given input component which can be the rootEditorComponent or a child of itvoidsetOptional(boolean optional) voidSets the value of this editor tovalue.
-
Field Details
-
INITIAL_EDIT_STRING
- See Also:
-
-
Method Details
-
createViewComponent
org.zkoss.zk.ui.HtmlBasedComponent createViewComponent(Object initialValue, Map<String, ? extends Object> parameters, EditorListener listener) Creates a new editor component and attaches it to the specifiedPagepage.- Parameters:
initialValue- editor's initial valueparameters- parameters passed via configuration for particular editorlistener- theEditorListenerthat will receive events when the editor's value is changed- Returns:
- the editor component
-
isInline
boolean isInline()Returns whether this editor is an inline editor or not.- Returns:
- true, if inline
-
getEditorType
String getEditorType() -
setValue
Sets the value of this editor tovalue. Note: Does not have anything to do with value persistence, it is only for setting the value to be displayed. However, depending on the view component implementation and the specifiedEditorListenerthe underlying view component might generate an event which causes theEditorListener.valueChanged(Object)method to be called.- Parameters:
value- the value to set
-
getValue
Object getValue()Returns the value held by this editor.- Returns:
- this editor's value
-
setEditable
void setEditable(boolean editable) Defines whether this editor shall be editable. Has to be set before creating the view component.- Parameters:
editable- whether this editor is editable or not
-
isEditable
boolean isEditable()Returns whether this editor is editable or not- Returns:
- true, if editable
-
setFocus
void setFocus(org.zkoss.zk.ui.HtmlBasedComponent rootEditorComponent, boolean selectAll) Sets the focus on the given input component which can be the rootEditorComponent or a child of it- Parameters:
rootEditorComponent- the rootEditorComponent which is returned on method createViewComponentselectAll- if true, select the whole input field after focus. It is not guaranteed that the editor supports selection.
-
isOptional
boolean isOptional() -
setOptional
void setOptional(boolean optional)
-