Enum Class ValueChangeMode

java.lang.Object
java.lang.Enum<ValueChangeMode>
org.vaadin.hugerte.ValueChangeMode
All Implemented Interfaces:
Serializable, Comparable<ValueChangeMode>, Constable, ClientSideReference

public enum ValueChangeMode extends Enum<ValueChangeMode> implements ClientSideReference
Enumeration of value change modes for the HugeRTE.
  • Enum Constant Details

    • ON_CHANGE

      public static final ValueChangeMode ON_CHANGE
      Syncs the value with the server on every "change" event, that is fired by the editor. This usually happens either when a new line is added, whole words are deleted at once or the editor loses the focus.
    • ON_BLUR

      public static final ValueChangeMode ON_BLUR
      Syncs the value with the server, when the editor loses the focus ("blur event").
    • TIMEOUT

      public static final ValueChangeMode TIMEOUT

      Syncs the value after the last change, when a certain amount of time has passed. If before that timeout any additional changes are made, the timeout is reset and starts again.

      This is the equivalent to Vaadin's native ValueChangeMode.LAZY

    • INTERVAL

      public static final ValueChangeMode INTERVAL

      Syncs the value periodically regardless of any user events, as long as there are changes to sync.

      This is the equivalent to Vaadin's native ValueChangeMode.TIMEOUT

  • Method Details

    • values

      public static ValueChangeMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ValueChangeMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getClientSideRepresentation

      public String getClientSideRepresentation()
      Description copied from interface: ClientSideReference
      Returns the client side representation of this instance.
      Specified by:
      getClientSideRepresentation in interface ClientSideReference
      Returns:
      client side representation
    • fromClientSide

      public static ValueChangeMode fromClientSide(String clientSide)
      Interprets the given string as the client side representation of an enum and returns the matching instance.
      Parameters:
      clientSide - client side representation
      Returns:
      instance
      Throws:
      IllegalArgumentException - on any unknown string