Package com.iizix.gyro
Enum Class ScreenOrientation
- All Implemented Interfaces:
Serializable
,Comparable<ScreenOrientation>
,Constable
Enumeration for values used for screen orientation.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Enum Constant Summary
Enum ConstantDescriptionThe orientation is either landscape-primary or landscape-secondary (sensor).The orientation is in the primary landscape mode.The orientation is in the secondary landscape mode.The orientation is either portrait-primary or portrait-secondary (sensor).The orientation is in the primary portrait mode.The orientation is in the secondary portrait mode.Unknown orientation.Field Summary
Modifier and TypeFieldDescriptionfinal String
The string in window.screen.orientation on the client side.final boolean
Flag for landscape orientation (false for "unknown").final boolean
Flag for portrait orientation (false for "unknown").Method Summary
Modifier and TypeMethodDescriptionstatic ScreenOrientation
Returns 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
The orientation is either portrait-primary or portrait-secondary (sensor).landscape
The orientation is either landscape-primary or landscape-secondary (sensor).portrait_primary
The orientation is in the primary portrait mode.portrait_secondary
The orientation is in the secondary portrait mode.landscape_primary
The orientation is in the primary landscape mode.landscape_secondary
The orientation is in the secondary landscape mode.unknown
Unknown orientation.
Field Details
clientOrientation
The string in window.screen.orientation on the client side.isPortrait
public final boolean isPortraitFlag for portrait orientation (false for "unknown").isLandscape
public final boolean isLandscapeFlag for landscape orientation (false for "unknown").
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