WebBrowser instead@Deprecated public interface DeviceInfo extends UserAgentInspector
VaadinSession.getBrowser()| Modifier and Type | Field and Description |
|---|---|
static String |
SESSION_ATTRIBUTE_NAME
Deprecated.
Name of the session attribute to cache DeviceInfo instance
|
| Modifier and Type | Method and Description |
|---|---|
static DeviceInfo |
create(com.vaadin.flow.component.UI ui,
UserAgentInspector userAgentInspector)
Deprecated.
Create a new
DeviceInfo for given UI, using the provided UserAgentInspector. |
static DeviceInfo |
create(com.vaadin.flow.component.UI ui,
com.vaadin.flow.server.VaadinRequest request)
Deprecated.
Create a new
DeviceInfo for given UI, using the provided VaadinRequest to configure a default
UserAgentInspector. |
static Optional<DeviceInfo> |
get()
Deprecated.
Get the
DeviceInfo for the current UI, if available. |
static Optional<DeviceInfo> |
get(com.vaadin.flow.component.UI ui)
Deprecated.
Get the
DeviceInfo for given UI, if available. |
int |
getWindowHeight()
Deprecated.
Get the browser window height.
|
int |
getWindowWidth()
Deprecated.
Get the browser window width.
|
static DeviceInfo |
require()
Deprecated.
Get the
DeviceInfo for the current UI, throwing a IllegalStateException if not available. |
create, create, getAcceptHeader, getUserAgentHeader, isAndroid, isAndroidPhone, isAndroidTablet, isGameConsole, isIOs, isIPad, isIPhone, isIPod, isKindle, isMobile, isNintendo, isPlaystation, isSmartphone, isTablet, isWebKit, isWindowsPhone, isXboxstatic final String SESSION_ATTRIBUTE_NAME
int getWindowWidth()
-1 if not available at method call timeint getWindowHeight()
-1 if not available at method call timestatic Optional<DeviceInfo> get(com.vaadin.flow.component.UI ui)
DeviceInfo for given UI, if available.ui - The UI for which to obtain the DeviceInfo (not null)DeviceInfo for given UIstatic Optional<DeviceInfo> get()
DeviceInfo for the current UI, if available.DeviceInfo for the current UIstatic DeviceInfo require()
DeviceInfo for the current UI, throwing a IllegalStateException if not available.DeviceInfo for the current UIIllegalStateException - If a DeviceInfo for current UI is not availablestatic DeviceInfo create(com.vaadin.flow.component.UI ui, UserAgentInspector userAgentInspector)
DeviceInfo for given UI, using the provided UserAgentInspector.ui - The UIuserAgentInspector - The UserAgentInspector to use (not null)DeviceInfostatic DeviceInfo create(com.vaadin.flow.component.UI ui, com.vaadin.flow.server.VaadinRequest request)
DeviceInfo for given UI, using the provided VaadinRequest to configure a default
UserAgentInspector.ui - The UIrequest - The request (not null)DeviceInfoCopyright © 2020 The Holon Platform. All rights reserved.