Enum Class JmixImageVariant

java.lang.Object
java.lang.Enum<JmixImageVariant>
io.jmix.flowui.component.image.JmixImageVariant
All Implemented Interfaces:
com.vaadin.flow.component.shared.ThemeVariant, Serializable, Comparable<JmixImageVariant>, Constable

public enum JmixImageVariant extends Enum<JmixImageVariant> implements com.vaadin.flow.component.shared.ThemeVariant
Set of theme variants applicable for JmixImage component.
  • Enum Constant Details

    • FILL

      public static final JmixImageVariant FILL
      Theme variant for image scale mode. The image is stretched according to the size of the component.

      Corresponds to the object-fit:fill CSS property.

    • COVER

      public static final JmixImageVariant COVER
      Theme variant for image scale mode. The image is compressed or stretched to fill the entire component while preserving the proportions. If the image proportions do not match the component's proportions then the image will be clipped to fit.

      Corresponds to the object-fit:cover CSS property.

    • CONTAIN

      public static final JmixImageVariant CONTAIN
      Theme variant for image scale mode. The image is compressed or stretched to fit the component dimensions while preserving the proportions.

      Corresponds to the object-fit:contain CSS property.

    • SCALE_DOWN

      public static final JmixImageVariant SCALE_DOWN
      Theme variant for image scale mode. The image is sized as if CONTAIN were specified or no theme variant was specified, whichever would result in a smaller concrete object size.

      Corresponds to the object-fit:scale-down CSS property.

  • Method Details

    • values

      public static JmixImageVariant[] 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 JmixImageVariant 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
    • getVariantName

      public String getVariantName()
      Specified by:
      getVariantName in interface com.vaadin.flow.component.shared.ThemeVariant