Package com.oorian.html.layout
Enum Class AspectRatio.Ratio
- All Implemented Interfaces:
Serializable,Comparable<AspectRatio.Ratio>,Constable
- Enclosing class:
AspectRatio
Common aspect ratio presets.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription2:1 wide banner ratio.21:9 ultrawide/cinema ratio.3:2 classic 35mm film ratio.2:3 portrait film orientation.4:3 standard photo/monitor ratio.3:4 portrait orientation.1:1 square ratio.1:2 tall banner ratio.9:16 vertical video (stories/reels).16:9 widescreen video ratio. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height component of the ratio.getValue()Returns the CSS aspect-ratio value.intgetWidth()Returns the width component of the ratio.static AspectRatio.RatioReturns the enum constant of this class with the specified name.static AspectRatio.Ratio[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SQUARE
1:1 square ratio. -
VIDEO
16:9 widescreen video ratio. -
PHOTO
4:3 standard photo/monitor ratio. -
PORTRAIT
3:4 portrait orientation. -
FILM
3:2 classic 35mm film ratio. -
FILM_PORTRAIT
2:3 portrait film orientation. -
CINEMA
21:9 ultrawide/cinema ratio. -
VERTICAL_VIDEO
9:16 vertical video (stories/reels). -
BANNER
2:1 wide banner ratio. -
TALL
1:2 tall banner ratio.
-
-
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
-
getValue
Returns the CSS aspect-ratio value.- Returns:
- the CSS value string (e.g., "16 / 9")
-
getWidth
public int getWidth()Returns the width component of the ratio.- Returns:
- the width value
-
getHeight
public int getHeight()Returns the height component of the ratio.- Returns:
- the height value
-