Enum Class Image.ScaleMode

java.lang.Object
java.lang.Enum<Image.ScaleMode>
io.jmix.ui.component.Image.ScaleMode
All Implemented Interfaces:
Serializable, Comparable<Image.ScaleMode>, Constable
Enclosing interface:
Image<T>

public static enum Image.ScaleMode extends Enum<Image.ScaleMode>
Defines image scale mode. Corresponds to the object-fit CSS property.
  • Enum Constant Details

    • FILL

      public static final Image.ScaleMode FILL
      The image is stretched according to the size of the component.
    • CONTAIN

      public static final Image.ScaleMode CONTAIN
      The image is compressed or stretched to fit the component dimensions while preserving the proportions.
    • COVER

      public static final Image.ScaleMode COVER
      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.
    • SCALE_DOWN

      public static final Image.ScaleMode SCALE_DOWN
      The image is sized as if NONE or CONTAIN were specified, whichever would result in a smaller concrete object size.
    • NONE

      public static final Image.ScaleMode NONE
      The image is not resized.
  • Method Details

    • values

      public static Image.ScaleMode[] 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 Image.ScaleMode 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