public class ClientBrowser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ClientBrowser.PLUGIN |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BROWSER_ANDROID |
static java.lang.String |
BROWSER_BLACKBERRY |
static java.lang.String |
BROWSER_CHROME
chrome
|
static java.lang.String |
BROWSER_DAV |
static java.lang.String |
BROWSER_FIREFOX
Fire fox
|
static java.lang.String |
BROWSER_HTTPUNIT |
static java.lang.String |
BROWSER_IE
Internet Explorer
|
static java.lang.String |
BROWSER_IPAD
The browser is a IPad
|
static java.lang.String |
BROWSER_IPHONE
the browser is an IPhone
|
static java.lang.String |
BROWSER_MOBILE
mobile phone
|
static java.lang.String |
BROWSER_NETSCAPE |
static java.lang.String |
BROWSER_OPERA
Opera
|
static java.lang.String |
BROWSER_SAFARI |
static java.lang.String |
OS_ANDROID |
static java.lang.String |
OS_MAC
MAC OS
|
static java.lang.String |
OS_UNIX |
static java.lang.String |
OS_WIN |
Constructor and Description |
---|
ClientBrowser()
The constructor
|
ClientBrowser(java.lang.String agent) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleCDN()
http://stackoverflow.com/questions/550038/is-it-valid-to-replace-http-with-in-a-script-src-http
This is used for CDN
|
boolean |
canHandleCodeMirror()
http://codemirror.net/
The following desktop browsers are able to run CodeMirror:
Firefox 3 or higher
Chrome, any version
Safari 5.2 or higher
Opera 9 or higher (with some key-handling problems on OS X)
Internet Explorer 8 or higher in standards mode
(Not quirks mode.
|
boolean |
canHandleCSS3()
can this browser handler CSS3?
|
boolean |
canHandleDHTML() |
boolean |
canHandleDisabledInput()
Firefox doesn't allow copy of disabled fields.
|
boolean |
canHandleGWT()
can this browser handle GWT ?
|
boolean |
canHandleHttpCompression()
1) There is a BUG in IE5.5 that strips off the leading 2048 bytes
2) Problems with IE6.0 and Windows 2000 3) Having lots of problems with this I'll disable for most of the IE's 4) Looks like it's all now fixed in IE7 5) believe that the compression works for IE6.0 service pack 2 which we can detect by looking for SV1 |
boolean |
canHandleIFrame()
can this browser handle IFrame ?
|
boolean |
canHandleJqGrid() |
boolean |
canHandleNTLM()
NTLM is a Windows only technology which is supported by the following browsers.
|
boolean |
canHandlePrintBootStrap() |
boolean |
canHandleTables() |
boolean |
canHandleTEL()
can this browser handle TEL: anchors ?
|
boolean |
canHandleTinyMCE()
Does this browser support the HTML editor ?
|
boolean |
canHandleValidation()
can browser handler validation
|
boolean |
doesPDFDisplayInFrame() |
boolean |
formDesktop()
Is this browser a desktop browser ?
|
boolean |
formMobile()
Is this browser a mobile phone ?
|
boolean |
formTablet()
Is this browser a mobile phone ?
|
java.lang.String |
getAgent()
The browser agent.
|
java.lang.String |
getBrowserName() |
double |
getBrowserRealVersion()
get the browser real version
|
double |
getBrowserVersion()
get the browser version, eg: if IE11 is running in compatibility view mode of IE7,
the browser version should be 7.
|
java.lang.String |
getInfo() |
java.lang.String |
getOSName() |
double |
getOSVersion() |
boolean |
hasEventStopPropagation()
https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation
Feature Chrome Firefox Internet Explorer Opera Safari
Basic support (Yes) (Yes) 9 (Yes) (Yes)
|
boolean |
hasPlugin(ClientBrowser.PLUGIN plugin) |
boolean |
is64BitIE()
is the browser 64-bit IE
|
boolean |
isBrowserAndroid()
Android tablet or mobile
|
boolean |
isBrowserAndroidMobile() |
boolean |
isBrowserBlackBerry() |
boolean |
isBrowserChrome() |
boolean |
isBrowserDAV() |
boolean |
isBrowserFirefox()
is this fire fox ?
|
boolean |
isBrowserHTTPUnit() |
boolean |
isBrowserIE() |
boolean |
isBrowserIPad() |
boolean |
isBrowserIPhone() |
boolean |
isBrowserMOBILE()
Is this browser a mobile phone ?
|
boolean |
isBrowserNETSCAPE() |
boolean |
isBrowserOpera() |
boolean |
isBrowserSafari() |
boolean |
isMatch(java.lang.String pBrowserName) |
boolean |
isMatch(java.lang.String browserName,
java.lang.String OSname) |
boolean |
isMatch(java.lang.String browserName,
java.lang.String osName,
double lowVersion) |
boolean |
isMatch(java.lang.String browserName,
java.lang.String osName,
double lowVersion,
double highVersion)
Does the current browser match ?
|
boolean |
isMatchBlockPattern(java.lang.String blockPattern)
is match the block browser pattern
|
boolean |
isMDI()
Should we use a Multi-Document interface ?
|
boolean |
isPocketPC() |
boolean |
isWebCrawler() |
boolean |
knownNotToSupportJavaApplets()
We know that this browser doesn't support a browser and we shouldn't bother sending the applets.
|
boolean |
knownNotToSupportJavaScripts()
We know that this browser doesn't support a javascript and we shouldn't bother sending it.
|
boolean |
nativeDatePicker()
Should use native Date picker
|
boolean |
osAndroid() |
boolean |
osLinux()
Is this Linux or Unix
|
boolean |
osMAC() |
boolean |
osWindows()
Is this windows
|
void |
setSimulateMobileBrowser(boolean isSimulate)
simulate mobile browser.
|
boolean |
supportsInputRequired()
Is the input required supported.
|
boolean |
supportsP3P()
Platform for Privacy Preferences Project
https://en.wikipedia.org/wiki/P3P#The_future_of_P3P
https://support.google.com/accounts/answer/151657?hl=en
https://www.w3.org/P3P/
|
boolean |
supportsPlaceholder()
http://caniuse.com/input-placeholder
|
boolean |
supportsServiceWorker() |
boolean |
supportsTypeDate()
generate the raw HTML for this component.
|
boolean |
supportsTypeEmail()
generate the raw HTML for this component.
|
boolean |
supportsTypeNumber()
generate the raw HTML for this component.
|
boolean |
supportsTypeSearch()
generate the raw HTML for this component.
|
boolean |
supportsTypeURL()
generate the raw HTML for this component.
|
java.lang.String |
toString()
The string
|
public static final java.lang.String OS_MAC
public static final java.lang.String OS_UNIX
public static final java.lang.String OS_ANDROID
public static final java.lang.String OS_WIN
public static final java.lang.String BROWSER_MOBILE
public static final java.lang.String BROWSER_DAV
public static final java.lang.String BROWSER_BLACKBERRY
public static final java.lang.String BROWSER_IPHONE
public static final java.lang.String BROWSER_IPAD
public static final java.lang.String BROWSER_SAFARI
public static final java.lang.String BROWSER_IE
public static final java.lang.String BROWSER_FIREFOX
public static final java.lang.String BROWSER_CHROME
public static final java.lang.String BROWSER_OPERA
public static final java.lang.String BROWSER_NETSCAPE
public static final java.lang.String BROWSER_HTTPUNIT
public static final java.lang.String BROWSER_ANDROID
public ClientBrowser()
public ClientBrowser(java.lang.String agent)
agent
- @CheckReturnValue public boolean supportsP3P()
@CheckReturnValue public boolean supportsInputRequired()
@CheckReturnValue public boolean supportsServiceWorker()
@CheckReturnValue public boolean supportsPlaceholder()
@CheckReturnValue public boolean supportsTypeDate()
Input type IE Firefox Opera Chrome Safari ========== === ======= ===== ====== ====== email No 4.0 9.0 10.0 No url No 4.0 9.0 10.0 No number No No 9.0 7.0 5.1 range No No 9.0 4.0 4.0 Date pickers No No 9.0 10.0 5.1 search No 4.0 11.0 10.0 No color No No 11.0 12 No
@CheckReturnValue public boolean supportsTypeSearch()
Input type IE Firefox Opera Chrome Safari ========== === ======= ===== ====== ====== search 10 No ?? 10.0 5.1http://css-tricks.com/webkit-html5-search-inputs/
@CheckReturnValue public boolean supportsTypeNumber()
Input type IE Firefox Opera Chrome Safari ========== === ======= ===== ====== ====== number 10 28 9.0 7.0 5.1
@CheckReturnValue public boolean supportsTypeEmail()
Input type IE Firefox Opera Chrome Safari ========== === ======= ===== ====== ====== email 10 4.0 9.0 10.0 No
@CheckReturnValue public boolean supportsTypeURL()
Input type IE Firefox Opera Chrome Safari ========== === ======= ===== ====== ====== url 10 4.0 9.0 10.0 No
@CheckReturnValue public boolean nativeDatePicker()
@CheckReturnValue @Nonnull public java.lang.String getInfo()
@CheckReturnValue public boolean isWebCrawler()
@CheckReturnValue public boolean isBrowserOpera()
@CheckReturnValue public boolean isBrowserChrome()
@CheckReturnValue public boolean hasPlugin(ClientBrowser.PLUGIN plugin)
@CheckReturnValue public boolean isBrowserFirefox()
@CheckReturnValue public boolean isBrowserIE()
@CheckReturnValue public boolean isBrowserHTTPUnit()
@CheckReturnValue public boolean isBrowserNETSCAPE()
@CheckReturnValue public boolean isBrowserBlackBerry()
@CheckReturnValue public boolean isBrowserIPhone()
@CheckReturnValue public boolean isBrowserIPad()
@CheckReturnValue public boolean isBrowserAndroidMobile()
@CheckReturnValue public boolean isBrowserAndroid()
@CheckReturnValue public boolean isBrowserDAV()
@CheckReturnValue public boolean formDesktop()
@CheckReturnValue public boolean formMobile()
@CheckReturnValue public boolean isBrowserMOBILE()
@CheckReturnValue public boolean formTablet()
@CheckReturnValue public boolean isBrowserSafari()
@CheckReturnValue public boolean isMDI()
@CheckReturnValue public boolean is64BitIE()
@CheckReturnValue public boolean osMAC()
@CheckReturnValue public boolean osAndroid()
@CheckReturnValue public boolean osWindows()
@CheckReturnValue public boolean osLinux()
@CheckReturnValue public boolean isPocketPC()
@CheckReturnValue public boolean canHandleDHTML()
@CheckReturnValue public boolean knownNotToSupportJavaApplets()
@CheckReturnValue public boolean knownNotToSupportJavaScripts()
@CheckReturnValue public boolean canHandleTEL()
@CheckReturnValue public boolean canHandleGWT()
@CheckReturnValue public boolean canHandleJqGrid()
@CheckReturnValue public boolean canHandleCodeMirror()
@CheckReturnValue public boolean hasEventStopPropagation()
@CheckReturnValue public boolean canHandleCDN()
@CheckReturnValue public boolean canHandleDisabledInput()
@CheckReturnValue public boolean canHandleCSS3()
@CheckReturnValue public boolean canHandleValidation()
@CheckReturnValue public boolean canHandleTinyMCE()
@CheckReturnValue public boolean canHandleIFrame()
@CheckReturnValue @Nonnull public java.lang.String getBrowserName()
@CheckReturnValue public double getBrowserVersion()
@CheckReturnValue public double getBrowserRealVersion()
@CheckReturnValue @Nonnull public java.lang.String getOSName()
@CheckReturnValue public double getOSVersion()
@CheckReturnValue public boolean isMatchBlockPattern(@Nonnull java.lang.String blockPattern) throws java.util.regex.PatternSyntaxException
blockPattern
- browser pattern to blockjava.util.regex.PatternSyntaxException
@CheckReturnValue public boolean isMatch(@Nonnull java.lang.String pBrowserName)
pBrowserName
- @CheckReturnValue public boolean isMatch(@Nonnull java.lang.String browserName, @Nonnull java.lang.String OSname)
browserName
- OSname
- @CheckReturnValue public boolean isMatch(@Nonnull java.lang.String browserName, @Nonnull java.lang.String osName, double lowVersion)
browserName
- osName
- lowVersion
- @CheckReturnValue public boolean canHandleNTLM()
@CheckReturnValue public boolean canHandlePrintBootStrap()
@CheckReturnValue public boolean isMatch(@Nonnull java.lang.String browserName, @Nonnull java.lang.String osName, double lowVersion, double highVersion)
browserName
- osName
- lowVersion
- highVersion
- @CheckReturnValue public boolean canHandleHttpCompression()
@CheckReturnValue public boolean canHandleTables()
@CheckReturnValue public boolean doesPDFDisplayInFrame()
public void setSimulateMobileBrowser(boolean isSimulate)
isSimulate
- @CheckReturnValue @Nonnull public java.lang.String toString()
toString
in class java.lang.Object
@CheckReturnValue @Nonnull public java.lang.String getAgent()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.