Interface UIEditor
-
- All Known Subinterfaces:
ConditionUIEditor
,EnumUIEditor
,ListUIEditor
,ReferenceUIEditor
- All Known Implementing Classes:
AbstractConditionUIEditor
,AbstractExtensibleConditionUIEditor
,AbstractFeatureUIEditor
,AbstractReferenceUIEditor
,AbstractSimpleInputConditionUIEditor
,AbstractTextBasedUIEditor
,AbstractUIEditor
,BigDecimalUIEditor
,CelumMediaCollectionUIEditor
,CelumMediaReferenceCollectionUIEditor
,CelumMediaReferenceUIEditor
,CelumSimpleMediaReferenceUIEditor
,CheckboxBooleanUIEditor
,ClassUIEditor
,CollectionUIEditor
,CollectionUIEditorMedia
,ContextAreaReferenceCollectionUIEditor
,DefaultBooleanUIEditor
,DefaultCharacterUIEditor
,DefaultDateConditionUIEditor
,DefaultDateUIEditor
,DefaultDecimalConditionUIEditor
,DefaultDecimalUIEditor
,DefaultDummyUIEditor
,DefaultEnumUIEditor
,DefaultFeatureConditionUIEditor
,DefaultFeatureUIEditor
,DefaultFeatureUnitUIEditor
,DefaultFloatConditionUIEditor
,DefaultFloatUIEditor
,DefaultImageUIEditor
,DefaultIntConditionUIEditor
,DefaultIntegerUIEditor
,DefaultLongConditionUIEditor
,DefaultLongUIEditor
,DefaultMediaReferenceCollectionUIEditor
,DefaultMediaReferenceUIEditor
,DefaultPKUIEditor
,DefaultReferenceCollectionUIEditor
,DefaultReferenceUIEditor
,DefaultSelectUIEditor
,DefaultSimpleMediaReferenceUIEditor
,DefaultSimpleReferenceUIEditor
,DefaultTextConditionUIEditor
,DefaultTextUIEditor
,DropdownBooleanUIEditor
,EncodingEnumUIEditor
,FileUploaderUIEditor
,GenericCollectionUIEditor
,GenericRangeUIEditor
,HmcLikeTextConditionUIEditor
,ListViewCollectionEditor
,LocaleUIEditor
,MapUIEditor
,MinimalReferenceUIEditor
,NullableSelectUIEditor
,ObjectTranslatorUIEditor
,ProductCodeReferenceUIEditor
,ProductCodeReferenceUIEditor
,SimpleReferenceUIEditor
,TriggersUIEditor
,UnitReferenceUIEditor
,WysiwygUIEditor
public interface UIEditor
General interface to be used by editors.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INITIAL_EDIT_STRING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.zkoss.zk.ui.HtmlBasedComponent
createViewComponent(java.lang.Object initialValue, java.util.Map<java.lang.String,? extends java.lang.Object> parameters, EditorListener listener)
Creates a new editor component and attaches it to the specifiedPage
page
.java.lang.String
getEditorType()
java.lang.Object
getValue()
Returns the value held by this editor.boolean
isEditable()
Returns whether this editor is editable or notboolean
isInline()
Returns whether this editor is an inline editor or not.boolean
isOptional()
void
setEditable(boolean editable)
Defines whether this editor shall be editable.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 itvoid
setOptional(boolean optional)
void
setValue(java.lang.Object value)
Sets the value of this editor tovalue
.
-
-
-
Field Detail
-
INITIAL_EDIT_STRING
static final java.lang.String INITIAL_EDIT_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
createViewComponent
org.zkoss.zk.ui.HtmlBasedComponent createViewComponent(java.lang.Object initialValue, java.util.Map<java.lang.String,? extends java.lang.Object> parameters, EditorListener listener)
Creates a new editor component and attaches it to the specifiedPage
page
.- Parameters:
initialValue
- editor's initial valueparameters
- parameters passed via configuration for particular editorlistener
- theEditorListener
that 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
java.lang.String getEditorType()
-
setValue
void setValue(java.lang.Object value)
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 specifiedEditorListener
the underlying view component might generate an event which causes theEditorListener.valueChanged(Object)
method to be called.- Parameters:
value
- the value to set
-
getValue
java.lang.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)
-
-