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
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 specified Page page.
     
    Returns the value held by this editor.
    boolean
    Returns whether this editor is editable or not
    boolean
    Returns whether this editor is an inline editor or not.
    boolean
     
    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 it
    void
    setOptional(boolean optional)
     
    void
    Sets the value of this editor to value.
  • Field Details

  • 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 specified Page page.
      Parameters:
      initialValue - editor's initial value
      parameters - parameters passed via configuration for particular editor
      listener - the EditorListener 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

      String getEditorType()
    • setValue

      void setValue(Object value)
      Sets the value of this editor to value.

      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 specified EditorListener the underlying view component might generate an event which causes the EditorListener.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 createViewComponent
      selectAll - 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)