public class WebBrowser extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
String |
getAddress()
Gets the IP-address of the web browser, if available.
|
String |
getBrowserApplication()
Get the browser user-agent string.
|
int |
getBrowserMajorVersion()
Gets the major version of the browser the user is using.
|
int |
getBrowserMinorVersion()
Gets the minor version of the browser the user is using.
|
Locale |
getLocale()
Gets the locale reported by the browser.
|
boolean |
isAndroid()
Tests if the browser is run on Android.
|
boolean |
isChrome()
Tests whether the user is using Chrome.
|
boolean |
isChromeOS()
Tests if the browser is run on ChromeOS (e.g.
|
boolean |
isEdge()
Tests whether the user is using Edge.
|
boolean |
isFirefox()
Tests whether the user is using Firefox.
|
boolean |
isIE()
Tests whether the user is using Internet Explorer.
|
boolean |
isIPhone()
Tests if the browser is run on IPhone.
|
boolean |
isLinux()
Tests whether the user is using Linux.
|
boolean |
isMacOSX()
Tests whether the user is using Mac OS X.
|
boolean |
isOpera()
Tests whether the user is using Opera.
|
boolean |
isSafari()
Tests whether the user is using Safari.
|
boolean |
isSecureConnection()
Checks if the connection was established using HTTPS.
|
boolean |
isTooOldToFunctionProperly()
Checks if the browser is so old that it simply won't work with a Vaadin
application.
|
boolean |
isWindows()
Tests whether the user is using Windows.
|
boolean |
isWindowsPhone()
Tests whether the user is using Windows Phone.
|
public String getBrowserApplication()
public String getAddress()
public Locale getLocale()
public boolean isSecureConnection()
public boolean isFirefox()
public boolean isIE()
public boolean isEdge()
public boolean isSafari()
public boolean isOpera()
public boolean isChrome()
public int getBrowserMajorVersion()
Note that Internet Explorer in IE7 compatibility mode might return 8 in some cases even though it should return 7.
public int getBrowserMinorVersion()
getBrowserMajorVersion()
public boolean isLinux()
public boolean isMacOSX()
public boolean isWindows()
public boolean isWindowsPhone()
public boolean isAndroid()
public boolean isIPhone()
public boolean isChromeOS()
public boolean isTooOldToFunctionProperly()
Copyright © 2024. All rights reserved.