java.lang.Object
org.xhtmlrenderer.swt.NaiveUserAgent
- All Implemented Interfaces:
org.xhtmlrenderer.extend.UserAgentCallback
@ParametersAreNonnullByDefault
public class NaiveUserAgent
extends Object
implements org.xhtmlrenderer.extend.UserAgentCallback
Naive user agent, copy of org.xhtmlrenderer.swing.NaiveUserAgent (but
modified for SWT, of course).
- Author:
- Vianney le Clément
-
Constructor Summary
ConstructorsConstructorDescriptionNaiveUserAgent(org.eclipse.swt.graphics.Device device) Creates a new instance of NaiveUserAgent -
Method Summary
Modifier and TypeMethodDescriptionprotected org.xhtmlrenderer.resource.ImageResourcecreateImageResource(String uri, InputStream is) Factory method to generate ImageResources from a given Image.voidDispose all images in cache and clean the cache.byte[]getBinaryResource(String uri) org.xhtmlrenderer.resource.CSSResourcegetCSSResource(String uri) org.xhtmlrenderer.resource.ImageResourcegetImageResource(String uri) org.xhtmlrenderer.resource.XMLResourcegetXMLResource(String uri) booleanGets the visited attribute of the NaiveUserAgent objectresolveURI(String uri) voidsetBaseURL(String url)
-
Constructor Details
-
NaiveUserAgent
public NaiveUserAgent(org.eclipse.swt.graphics.Device device) Creates a new instance of NaiveUserAgent
-
-
Method Details
-
getCSSResource
- Specified by:
getCSSResourcein interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-
getImageResource
- Specified by:
getImageResourcein interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-
createImageResource
Factory method to generate ImageResources from a given Image. May be overridden in subclass.- Parameters:
uri- The URI for the image, resolved to an absolute URI.is- Stream of the image; may be null (for example, if image could not be loaded).- Returns:
- An ImageResource containing the image.
-
getXMLResource
- Specified by:
getXMLResourcein interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-
isVisited
Gets the visited attribute of the NaiveUserAgent object- Specified by:
isVisitedin interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-
setBaseURL
- Specified by:
setBaseURLin interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-
resolveURI
- Specified by:
resolveURIin interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-
getBaseURL
- Specified by:
getBaseURLin interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-
disposeCache
public void disposeCache()Dispose all images in cache and clean the cache. -
getBinaryResource
- Specified by:
getBinaryResourcein interfaceorg.xhtmlrenderer.extend.UserAgentCallback
-