|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maryanovsky.gwtutils.client.BrowserUtils
public class BrowserUtils
Various browser related or browser specific utilities.
Field Summary | |
---|---|
static String |
USER_AGENT
The user-agent string of the browser we are running in. |
Constructor Summary | |
---|---|
BrowserUtils()
|
Method Summary | |
---|---|
static int |
compareVersions(String version1,
String version2)
Compares two version numbers of something. |
static String |
getAppleWebKitVersion()
Returns the AppleWebKit version number. |
static double |
getDevicePixelRatio()
Returns the value of window.devicePixelRatio , or 1 if
there's no such property. |
static String |
getGeckoVersion()
Returns the Gecko version number. |
static String |
getHostname()
Returns the hostname of the URL at which this application is running. |
static String |
getHostPageUrl()
Returns the full URL of the host webpage. |
static String |
getIEVersion()
Returns the version of IE we're running in. |
static String |
getPathname()
Returns the pathname of the URL at which this application is running. |
static String |
getSafariVersion()
Returns the Safari version number (the one used for marketing, like 4.0). |
static boolean |
hasTouchEventsSupport()
Returns whether the browser supports touch events. |
static boolean |
isAndroid()
Returns whether we are running on an Android device. |
static boolean |
isAppleWebKit()
Returns whether we are running in an AppleWebKit browser. |
static boolean |
isAppleWebKitOnAndroid()
Returns whether we are running in an AppleWebKit browser, on an Android device. |
static boolean |
isGecko()
Returns whether we are running in a Gecko based browser. |
static boolean |
isIE()
Returns whether we are running in MSIE. |
static boolean |
isIE6()
Returns whether we are running in MSIE 6. |
static boolean |
isIE7()
Returns whether we are running in MSIE 7. |
static boolean |
isIE8()
Returns whether we are running in MSIE 8. |
static boolean |
isLinux()
Returns whether we're running on Linux. |
static boolean |
isMacOS()
Returns whether we're running on Mac OS. |
static boolean |
isMobileAppleWebKit()
Returns whether we are running in a mobile version of an AppleWebKit browser. |
static boolean |
isMozilla()
Returns whether we are running in a Mozilla browser. |
static boolean |
isOpera()
Returns whether we are running in Opera. |
static boolean |
isSafari()
Returns whether we are running in Safari. |
static boolean |
isWindows()
Returns whether we're running on MS Windows. |
static void |
setDocumentLocation(String location)
Sets document.location to the specified value. |
static void |
setStatus(String statusText)
Sets the status of the window we're running in to the specified string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String USER_AGENT
Constructor Detail |
---|
public BrowserUtils()
Method Detail |
---|
public static boolean isIE()
public static boolean isIE6()
public static boolean isIE7()
public static boolean isIE8()
public static String getIEVersion()
public static boolean isOpera()
public static boolean isSafari()
public static String getSafariVersion()
public static boolean isAppleWebKit()
public static boolean isMobileAppleWebKit()
public static String getAppleWebKitVersion()
public static boolean isAndroid()
public static boolean isAppleWebKitOnAndroid()
public static boolean isMozilla()
public static boolean isGecko()
public static String getGeckoVersion()
public static boolean isWindows()
public static boolean isMacOS()
public static boolean isLinux()
public static int compareVersions(String version1, String version2)
public static String getHostPageUrl()
public static String getHostname()
public static String getPathname()
public static void setDocumentLocation(String location)
document.location
to the specified value.
public static void setStatus(String statusText)
public static double getDevicePixelRatio()
window.devicePixelRatio
, or 1 if
there's no such property.
public static boolean hasTouchEventsSupport()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |