| java.lang.Object com.ivata.mask.web.browser.Browser
Browser | public class Browser (Code) | |
This class identifies the capabilities of the web browser the client is
using, from the user agent string.
LoginTag creates an instance of this class in the http
session, storing it under the attribute name "browser" .
since: ivata masks 0.4 (2002-09-12) author: Colin MacLeod author: colin.macleod@ivata.com version: $Revision: 1.6 $ |
Constructor Summary | |
public | Browser(String userAgentParam, String javaScriptVersionParam)
Construct an instance of the browser, using the user agent string
provided to detect the browser's capabilities. |
Method Summary | |
final public boolean | canDisplayFrames()
Detect whether or not the browser can display frames. | final public boolean | canDisplayIFrames()
Detect whether or not the browser can display <iframe&bt;
tags. | final public boolean | canDisplayMarquee()
Detect whether or not the browser can display
<marquee&bt; tags. | public String | getJavaScriptVersion()
A String depicting the version number of the JavaScript this browser
supports if supported, otherwise null if the browser
doesn't support JavaScript. | public String | getUserAgent()
Initialized by the constructor, this is the user agent string from the
request.getHeader("User-Agent") value. | public String | getVersion()
A string depiction of the browser version number if available and known,
otherwise null if the browser manufacturer could not be
identified. | public boolean | isFirefox() Detect whether or not this browser is a flavor of Firefox. | public boolean | isInternetExplorer() Detect whether or not this browser is a flavor of IE. | public boolean | isJavaScriptEnabled()
Detect whether or not this browser is capable of displaying JavaScript,
and has JavaScript enabled. | public boolean | isMozilla() Detect whether or not this browser is a flavor of Mozilla, though not
Firefox. | public boolean | isNetscape() Detect whether or not this browser is a flavor of Netscape. | public boolean | isOpera() Detect whether or not this browser is a flavor of Opera. | final public void | setJavaScriptVersion(String javaScriptVersionParam) | final public void | setType(Integer typeParam) | final public void | setUserAgent(String userAgentParam) | final public void | setVersion(String versionParam) Refer to
#getVersion() . |
Browser | public Browser(String userAgentParam, String javaScriptVersionParam)(Code) | |
Construct an instance of the browser, using the user agent string
provided to detect the browser's capabilities.
Parameters: userAgentParam - Refer to #getUserAgent(). Parameters: javaScriptVersionParam - Refer to #getJavaScriptVersion(). |
canDisplayFrames | final public boolean canDisplayFrames()(Code) | |
Detect whether or not the browser can display frames.
true if the browser can display frames, otherwisefalse . |
canDisplayIFrames | final public boolean canDisplayIFrames()(Code) | |
Detect whether or not the browser can display <iframe&bt;
tags.
true if the browser can display iframes, otherwisefalse . |
canDisplayMarquee | final public boolean canDisplayMarquee()(Code) | |
Detect whether or not the browser can display
<marquee&bt; tags.
true if the browser can display marquee, otherwisefalse . |
getJavaScriptVersion | public String getJavaScriptVersion()(Code) | |
A String depicting the version number of the JavaScript this browser
supports if supported, otherwise null if the browser
doesn't support JavaScript.
the current value of javaScriptVersion. |
getUserAgent | public String getUserAgent()(Code) | |
Initialized by the constructor, this is the user agent string from the
request.getHeader("User-Agent") value.
the current value of userAgent. |
getVersion | public String getVersion()(Code) | |
A string depiction of the browser version number if available and known,
otherwise null if the browser manufacturer could not be
identified.
the current value of version. |
isFirefox | public boolean isFirefox()(Code) | | Detect whether or not this browser is a flavor of Firefox.
true if this is Firefox. |
isInternetExplorer | public boolean isInternetExplorer()(Code) | | Detect whether or not this browser is a flavor of IE.
true if this is IE. |
isJavaScriptEnabled | public boolean isJavaScriptEnabled()(Code) | |
Detect whether or not this browser is capable of displaying JavaScript,
and has JavaScript enabled.
true if the browser can display JavaScript,otherwise false . |
isMozilla | public boolean isMozilla()(Code) | | Detect whether or not this browser is a flavor of Mozilla, though not
Firefox.
true if this is Mozilla. |
isNetscape | public boolean isNetscape()(Code) | | Detect whether or not this browser is a flavor of Netscape.
true if this is Netscape. |
isOpera | public boolean isOpera()(Code) | | Detect whether or not this browser is a flavor of Opera.
true if this is Opera. |
setVersion | final public void setVersion(String versionParam)(Code) | | Refer to
#getVersion() .
Parameters: versionParam - Refer to #getVersion(). |
|
|