Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.maryanovsky.gwtutils.client
Class BrowserUtils

    java.lang.Object
      com.maryanovsky.gwtutils.client.BrowserUtils

    public class BrowserUtils

extends Object

Various browser related or browser specific utilities.

Author:
  Maryanovsky Alexander

Field Summary
`static String` | `USER_AGENT` The user-agent string of the browser we are running in.

Constructor Summary
`BrowserUtils()`

Method Summary
`static String` | `getAppleWebKitVersion()` Returns the AppleWebKit version number.
`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` | `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` | `isAppleWebKit()` Returns whether we are running in an AppleWebKit browser.
`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` | `isLinux()` Returns whether we're running on Linux.
`static boolean` | `isMacOS()` Returns whether we're running on Mac OS.
`static boolean` | `isMobileSafari()` Returns whether we are running in MobileSafari.
`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

### USER_AGENT

    public static final String USER_AGENT

  The user-agent string of the browser we are running in.

Constructor Detail

### BrowserUtils

    public BrowserUtils()

Method Detail

### isIE

    public static boolean isIE()

  Returns whether we are running in MSIE.

### isIE6

    public static boolean isIE6()

  Returns whether we are running in MSIE 6.

### isOpera

    public static boolean isOpera()

  Returns whether we are running in Opera.

### isSafari

    public static boolean isSafari()

  Returns whether we are running in Safari.

### isMobileSafari

    public static boolean isMobileSafari()

  Returns whether we are running in MobileSafari.

### isAppleWebKit

    public static boolean isAppleWebKit()

  Returns whether we are running in an AppleWebKit browser.

### getAppleWebKitVersion

    public static String getAppleWebKitVersion()

  Returns the AppleWebKit version number. Returns an empty string if unable to detect (possibly because we're not running in an AppleWebKit browser).

### getSafariVersion

    public static String getSafariVersion()

  Returns the Safari version number (the one used for marketing, like 4.0). Returns an empty string if unable to detect.

### isMozilla

    public static boolean isMozilla()

  Returns whether we are running in a Mozilla browser.

### isGecko

    public static boolean isGecko()

  Returns whether we are running in a Gecko based browser.

### getGeckoVersion

    public static String getGeckoVersion()

  Returns the Gecko version number. Returns an empty string if unable to detect (possibly because we're not running in a Gecko browser).

### isWindows

    public static boolean isWindows()

  Returns whether we're running on MS Windows.

### isMacOS

    public static boolean isMacOS()

  Returns whether we're running on Mac OS.

### isLinux

    public static boolean isLinux()

  Returns whether we're running on Linux.

### getHostPageUrl

    public static String getHostPageUrl()

  Returns the full URL of the host webpage.

### getHostname

    public static String getHostname()

  Returns the hostname of the URL at which this application is running.

### getPathname

    public static String getPathname()

  Returns the pathname of the URL at which this application is running.

### setDocumentLocation

    public static void setDocumentLocation(String location)

  Sets `document.location` to the specified value.

### setStatus

    public static void setStatus(String statusText)

  Sets the status of the window we're running in to the specified string.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD