Enum Class FullscreenState
- All Implemented Interfaces:
Serializable,Comparable<FullscreenState>,Constable
Represents the fullscreen state of a browser page.
Wraps the browser's Fullscreen API (document.fullscreenEnabled and
document.fullscreenElement) into four observable states: the browser
does not support fullscreen at all, fullscreen is supported but the page is
not in it, the page is currently fullscreen, and an UNKNOWN sentinel
used before the first value has arrived from the client.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe page is currently in fullscreen mode.Fullscreen mode is supported and the page is currently not in it.No value has been reported by the browser yet.The browser does not support fullscreen mode, or the document is not permitted to enter it. -
Method Summary
Modifier and TypeMethodDescriptionstatic FullscreenStateReturns the enum constant of this class with the specified name.static FullscreenState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
No value has been reported by the browser yet. Used only as the initial value of the signal before the first client handshake delivers the real one. In normal request handling the signal is seeded before any user code (UI initialization,UIInitListener, component attach) runs, so this value is essentially never observed in practice; once a real value has arrived, the signal never returns toUNKNOWN. -
UNSUPPORTED
The browser does not support fullscreen mode, or the document is not permitted to enter it. In the browser, this corresponds todocument.fullscreenEnabledbeingfalse. Fullscreen requests bound viaFullscreenresolve to a rejection in this state. -
NOT_FULLSCREEN
Fullscreen mode is supported and the page is currently not in it. In the browser, this corresponds todocument.fullscreenEnabledbeingtrueanddocument.fullscreenElementbeingnull. -
FULLSCREEN
The page is currently in fullscreen mode. In the browser, this corresponds todocument.fullscreenElementbeing non-null.
-
-
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
-