Class CodeEditor

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<C,T>
com.vaadin.flow.component.AbstractSinglePropertyField<JmixCodeEditor,String>
io.jmix.flowui.kit.component.codeeditor.JmixCodeEditor
io.jmix.flowui.component.codeeditor.CodeEditor
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<JmixCodeEditor>, com.vaadin.flow.component.CompositionNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<JmixCodeEditor>, com.vaadin.flow.component.FocusNotifier<JmixCodeEditor>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixCodeEditor,String>,String>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixCodeEditor,String>,String>, com.vaadin.flow.component.InputNotifier, com.vaadin.flow.component.KeyNotifier, com.vaadin.flow.component.shared.HasClientValidation, com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasValidationProperties, com.vaadin.flow.data.binder.HasValidator<String>, HasRequired, SupportsStatusChangeHandler<CodeEditor>, SupportsValidation<String>, SupportsValueSource<String>, HasTitle, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class CodeEditor extends JmixCodeEditor implements SupportsValueSource<String>, SupportsValidation<String>, SupportsStatusChangeHandler<CodeEditor>, HasRequired, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
See Also:
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • fieldDelegate

      protected FieldDelegate<CodeEditor,String,String> fieldDelegate
  • Constructor Details

    • CodeEditor

      public CodeEditor()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • addValidator

      public com.vaadin.flow.shared.Registration addValidator(Validator<? super String> validator)
      Specified by:
      addValidator in interface SupportsValidation<String>
    • executeValidators

      public void executeValidators() throws ValidationException
      Specified by:
      executeValidators in interface SupportsValidation<String>
      Throws:
      ValidationException
    • validate

      protected void validate()
      Overrides:
      validate in class JmixCodeEditor
    • isInvalid

      public boolean isInvalid()
      Specified by:
      isInvalid in interface com.vaadin.flow.component.HasValidation
      Specified by:
      isInvalid in interface com.vaadin.flow.component.shared.HasValidationProperties
    • setInvalid

      public void setInvalid(boolean invalid)
      Description copied from interface: SupportsValidation
      Sets invalid state to the field considering result of field validation.
      • Invalid - false and validation passed - false = field is invalid
      • Invalid - false and validation passed - true = field is valid
      • Invalid - true and validation passed - false = field is invalid
      • Invalid - true and validation passed - true = field is invalid
      Specified by:
      setInvalid in interface com.vaadin.flow.component.HasValidation
      Specified by:
      setInvalid in interface com.vaadin.flow.component.shared.HasValidationProperties
      Specified by:
      setInvalid in interface SupportsValidation<String>
      Parameters:
      invalid - whether field should be invalid
    • getErrorMessage

      @Nullable public String getErrorMessage()
      Specified by:
      getErrorMessage in interface com.vaadin.flow.component.HasValidation
      Specified by:
      getErrorMessage in interface com.vaadin.flow.component.shared.HasValidationProperties
      Specified by:
      getErrorMessage in interface SupportsValidation<String>
    • setErrorMessage

      public void setErrorMessage(@Nullable String errorMessage)
      Specified by:
      setErrorMessage in interface com.vaadin.flow.component.HasValidation
      Specified by:
      setErrorMessage in interface com.vaadin.flow.component.shared.HasValidationProperties
      Specified by:
      setErrorMessage in interface SupportsValidation<String>
    • setStatusChangeHandler

      public void setStatusChangeHandler(@Nullable Consumer<SupportsStatusChangeHandler.StatusContext<CodeEditor>> handler)
      Description copied from interface: SupportsStatusChangeHandler
      Sets a callback to be used to handle component status changes, e.g. validation messages set by HasValidation.setErrorMessage(String).
      Specified by:
      setStatusChangeHandler in interface SupportsStatusChangeHandler<CodeEditor>
      Parameters:
      handler - a handler to set
    • getValueSource

      @Nullable public ValueSource<String> getValueSource()
      Specified by:
      getValueSource in interface SupportsValueSource<String>
    • setValueSource

      public void setValueSource(@Nullable ValueSource<String> valueSource)
      Specified by:
      setValueSource in interface SupportsValueSource<String>
    • getRequiredMessage

      @Nullable public String getRequiredMessage()
      Specified by:
      getRequiredMessage in interface HasRequired
    • setRequiredMessage

      public void setRequiredMessage(@Nullable String requiredMessage)
      Specified by:
      setRequiredMessage in interface HasRequired
    • setValue

      public void setValue(String value)
      Specified by:
      setValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixCodeEditor,String>,String>
      Overrides:
      setValue in class com.vaadin.flow.component.AbstractField<JmixCodeEditor,String>
    • setRequired

      public void setRequired(boolean required)
      Description copied from class: JmixCodeEditor
      Specifies that the user must fill in a value.
      Specified by:
      setRequired in interface HasRequired
      Overrides:
      setRequired in class JmixCodeEditor
      Parameters:
      required - the boolean value to set
    • setRequiredIndicatorVisible

      public void setRequiredIndicatorVisible(boolean required)
      Specified by:
      setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixCodeEditor,String>,String>
      Specified by:
      setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixCodeEditor,String>,String>
      Overrides:
      setRequiredIndicatorVisible in class JmixCodeEditor
    • createFieldDelegate

      protected FieldDelegate<CodeEditor,String,String> createFieldDelegate()