Package com.vaadin.flow.component.page
Enum Class ScreenOrientation
- All Implemented Interfaces:
Serializable,Comparable<ScreenOrientation>,Constable
Represents the orientation types reported by the Screen Orientation API.
These correspond to the concrete orientation types that can be observed as the current screen orientation state.
- Author:
- Vaadin Ltd
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ScreenOrientationfromClientValue(String clientValue) Converts a client-side orientation type string to the corresponding enum value.Returns the value as used by the browser's Screen Orientation API.static ScreenOrientationReturns the enum constant of this class with the specified name.static ScreenOrientation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PORTRAIT_PRIMARY
-
PORTRAIT_SECONDARY
-
LANDSCAPE_PRIMARY
-
LANDSCAPE_SECONDARY
-
-
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
-
getClientValue
Returns the value as used by the browser's Screen Orientation API.- Returns:
- the client-side orientation type string
-
fromClientValue
Converts a client-side orientation type string to the corresponding enum value.- Parameters:
clientValue- the orientation type string from the browser- Returns:
- the corresponding enum value
- Throws:
IllegalArgumentException- if the value does not match any known orientation type
-