Class BrowserUserAgent
java.lang.Object
org.xhtmlrenderer.swt.NaiveUserAgent
org.xhtmlrenderer.demo.browser.swt.BrowserUserAgent
- All Implemented Interfaces:
UserAgentCallback
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCSSResource
(String uri) Retrieves the CSS at the given URI.getDemos()
getImageResource
(String uri) Retrieves the Image at the given URI.private XMLResource
Used internally when a document can't be loaded--returns XHTML as an XMLResource indicating that fact.getXMLResource
(String uri) Retrieves the XML at the given URI.boolean
Gets the visited attribute of the NaiveUserAgent objectresolveFullURI
(String uri) resolveURI
(String uri) Used to find an uri that may be relative to the BaseURL.void
setBaseURL
(String url) Does not need to be a correct URL, only an identifier that the implementation can resolve.Methods inherited from class org.xhtmlrenderer.swt.NaiveUserAgent
createImageResource, disposeCache, getBaseURL, getBinaryResource
-
Field Details
-
_demos
-
_history
-
-
Constructor Details
-
BrowserUserAgent
public BrowserUserAgent(org.eclipse.swt.graphics.Device device)
-
-
Method Details
-
resolveURI
Description copied from interface:UserAgentCallback
Used to find an uri that may be relative to the BaseURL. The returned value will always only be used via methods in the same implementation of this interface, therefore may be a private uri-space.- Specified by:
resolveURI
in interfaceUserAgentCallback
- Overrides:
resolveURI
in classNaiveUserAgent
- Parameters:
uri
- an absolute or relative (to baseURL) uri to be resolved.- Returns:
- the full uri in uri-spaces known to the current implementation.
-
setBaseURL
Description copied from interface:UserAgentCallback
Does not need to be a correct URL, only an identifier that the implementation can resolve.- Specified by:
setBaseURL
in interfaceUserAgentCallback
- Overrides:
setBaseURL
in classNaiveUserAgent
- Parameters:
url
- A URL against which relative references can be resolved.
-
resolveFullURI
-
getXMLResource
Description copied from interface:UserAgentCallback
Retrieves the XML at the given URI. This is a synchronous call.- Specified by:
getXMLResource
in interfaceUserAgentCallback
- Overrides:
getXMLResource
in classNaiveUserAgent
- Parameters:
uri
- Location of the XML- Returns:
- A XMLResource for the content at the URI.
-
getCSSResource
Description copied from interface:UserAgentCallback
Retrieves the CSS at the given URI. This is a synchronous call.- Specified by:
getCSSResource
in interfaceUserAgentCallback
- Overrides:
getCSSResource
in classNaiveUserAgent
- Parameters:
uri
- Location of the CSS- Returns:
- A CSSResource for the content at the URI.
-
getImageResource
Description copied from interface:UserAgentCallback
Retrieves the Image at the given URI. This is a synchronous call.- Specified by:
getImageResource
in interfaceUserAgentCallback
- Overrides:
getImageResource
in classNaiveUserAgent
- Parameters:
uri
- Location of the image- Returns:
- An ImageResource for the content at the URI.
-
getNotFoundDocument
Used internally when a document can't be loaded--returns XHTML as an XMLResource indicating that fact.- Parameters:
uri
- The URI which could not be loaded.- Returns:
- An XMLResource containing XML which about the failure.
-
isVisited
Description copied from class:NaiveUserAgent
Gets the visited attribute of the NaiveUserAgent object- Specified by:
isVisited
in interfaceUserAgentCallback
- Overrides:
isVisited
in classNaiveUserAgent
- Parameters:
uri
- A URI which may have been visited by this user agent.- Returns:
- The visited value
-
getDemos
-
getHistory
-