|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.terminal.gwt.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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.terminal.Terminal |
---|
Terminal.ErrorEvent, Terminal.ErrorListener |
Constructor Summary | |
---|---|
WebBrowser()
|
Method Summary | |
---|---|
String |
getAddress()
Gets the IP-address of the web browser. |
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. |
Date |
getCurrentDate()
Returns the current date and time of the browser. |
String |
getDefaultTheme()
There is no default-theme for this terminal type. |
int |
getDSTSavings()
Gets the difference in minutes between the browser's GMT TimeZone and DST. |
Locale |
getLocale()
Get the default locate of the browser. |
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 terminal screen in pixels. |
int |
getScreenWidth()
Gets the width of the terminal screen in pixels. |
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 String getDefaultTheme()
getDefaultTheme
in interface Terminal
public int getScreenHeight()
Terminal
Note that the screen height is typically not available in the
Application.init()
method as this is called before the
browser has a chance to report the screen size to the server.
getScreenHeight
in interface Terminal
public int getScreenWidth()
Terminal
Note that the screen width is typically not available in the
Application.init()
method as this is called before the
browser has a chance to report the screen size to the server.
getScreenWidth
in interface Terminal
public String getBrowserApplication()
public String getAddress()
public 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 Integer getTimezoneOffset()
getRawTimezoneOffset()
.
getRawTimezoneOffset()
public 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 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 |