|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.WebBrowser
public class WebBrowser
Class that provides information about the web browser the user is using. Provides information such as browser name and version, screen resolution and IP address.
| Constructor Summary | |
|---|---|
WebBrowser()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAddress()
Gets the IP-address of the web browser. |
java.lang.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. |
java.util.Date |
getCurrentDate()
Returns the current date and time of the browser. |
int |
getDSTSavings()
Gets the difference in minutes between the browser's GMT TimeZone and DST. |
java.util.Locale |
getLocale()
Get the default locate of the browser. |
java.lang.Integer |
getRawTimezoneOffset()
Returns the browser-reported TimeZone offset in milliseconds from GMT ignoring possible daylight saving adjustments that may be in effect in the browser. |
int |
getScreenHeight()
Gets the height of the screen in pixels. |
int |
getScreenWidth()
Gets the width of the screen in pixels. |
java.lang.Integer |
getTimezoneOffset()
Returns the browser-reported TimeZone offset in milliseconds from GMT. |
boolean |
isChrome()
Tests whether the user is using Chrome. |
boolean |
isChromeFrame()
Tests whether the user is using Chrome Frame. |
boolean |
isChromeFrameCapable()
Tests whether the user's browser is Chrome Frame capable. |
boolean |
isDSTInEffect()
Determines whether daylight savings time (DST) is currently in effect in the region of the browser or not. |
boolean |
isFirefox()
Tests whether the user is using Firefox. |
boolean |
isIE()
Tests whether the user is using Internet Explorer. |
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()
Is the connection made using HTTPS? |
boolean |
isTooOldToFunctionProperly()
Checks if the browser is so old that it simply won't work with a Vaadin application. |
boolean |
isTouchDevice()
|
boolean |
isWindows()
Tests whether the user is using Windows. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebBrowser()
| Method Detail |
|---|
public int getScreenHeight()
public int getScreenWidth()
public java.lang.String getBrowserApplication()
public java.lang.String getAddress()
public java.util.Locale getLocale()
public boolean isSecureConnection()
public boolean isFirefox()
public boolean isIE()
public boolean isSafari()
public boolean isOpera()
public boolean isChrome()
public boolean isChromeFrame()
public boolean isChromeFrameCapable()
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 java.lang.Integer getTimezoneOffset()
getRawTimezoneOffset().
getRawTimezoneOffset()public java.lang.Integer getRawTimezoneOffset()
You can use this to figure out which TimeZones the user could actually be
in by calling TimeZone.getAvailableIDs(int).
If getRawTimezoneOffset() and getTimezoneOffset()
returns the same value, the browser is either in a zone that does not
currently have daylight saving time, or in a zone that never has daylight
saving time.
public int getDSTSavings()
public boolean isDSTInEffect()
public java.util.Date getCurrentDate()
isDSTInEffect(),
getDSTSavings(),
getTimezoneOffset()public boolean isTouchDevice()
public boolean isTooOldToFunctionProperly()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||