Package io.jmix.ui.component
Enum Class Image.ScaleMode
- All Implemented Interfaces:
Serializable
,Comparable<Image.ScaleMode>
,Constable
Defines image scale mode.
Corresponds to the
object-fit
CSS property.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe image is compressed or stretched to fit the component dimensions while preserving the proportions.The image is compressed or stretched to fill the entire component while preserving the proportions.The image is stretched according to the size of the component.The image is not resized. -
Method Summary
Modifier and TypeMethodDescriptionstatic Image.ScaleMode
Returns the enum constant of this class with the specified name.static Image.ScaleMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FILL
The image is stretched according to the size of the component. -
CONTAIN
The image is compressed or stretched to fit the component dimensions while preserving the proportions. -
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
-
NONE
The image is not resized.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-