Package io.jmix.flowui.component.image
Enum Class 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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionTheme variant for image scale mode.Theme variant for image scale mode.Theme variant for image scale mode.Theme variant for image scale mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic JmixImageVariant
Returns the enum constant of this class with the specified name.static JmixImageVariant[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
Theme variant for image scale mode. The image is sized as ifCONTAIN
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
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
-
getVariantName
- Specified by:
getVariantName
in interfacecom.vaadin.flow.component.shared.ThemeVariant
-