|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.lwuit.html.DefaultDocumentRequestHandler
public class DefaultDocumentRequestHandler
Default implementation of the HTML components document request handler to allow simple HTML support in LWUIT. This version includes only the basics supported by MIDP e.g. resources and jar file URL's such as jar:// and res://
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.sun.lwuit.html.AsyncDocumentRequestHandler |
---|
AsyncDocumentRequestHandler.IOCallback |
Constructor Summary | |
---|---|
DefaultDocumentRequestHandler()
|
Method Summary | |
---|---|
static Resources |
getResFile()
Allows URL's referring to a res:// local resource to default to this file |
boolean |
isTrackVisitedURLs()
Allows tracking whether a URL was visited or not |
java.io.InputStream |
resourceRequested(DocumentInfo docInfo)
Implementations should return the document in the requested url as an InputStream This is triggered only for the main document requested and not for its resources. |
void |
resourceRequestedAsync(DocumentInfo docInfo,
AsyncDocumentRequestHandler.IOCallback callback)
This method is called by HTMLComponent when a resource is requested asynchronously. |
static void |
setResFile(Resources res)
Allows URL's referring to a local:// local resource to default to this file |
void |
setTrackVisitedURLs(boolean trackVisitedURLs)
Allows tracking whether a URL was visited or not |
boolean |
wasURLVisited(java.lang.String url)
Returns true if the URL was visited, requires trackVisitedURLs to be true |
protected void |
visitingURL(java.lang.String url)
This method can be invoked to indicate a URL was visited fro tracking |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDocumentRequestHandler()
Method Detail |
---|
public void resourceRequestedAsync(DocumentInfo docInfo, AsyncDocumentRequestHandler.IOCallback callback)
AsyncDocumentRequestHandler
resourceRequestedAsync
in interface AsyncDocumentRequestHandler
docInfo
- A DocumentInfo object representing the requested URL and its attributescallback
- The HTMLComponent that should be called back when the stream was fetched.public java.io.InputStream resourceRequested(DocumentInfo docInfo)
DocumentRequestHandler
resourceRequested
in interface DocumentRequestHandler
docInfo
- A DocumentInfo object representing the requested URL and its attributes
protected void visitingURL(java.lang.String url)
url
- the urlpublic boolean wasURLVisited(java.lang.String url)
url
- the url
public static Resources getResFile()
public static void setResFile(Resources res)
res
- the resourcepublic boolean isTrackVisitedURLs()
public void setTrackVisitedURLs(boolean trackVisitedURLs)
trackVisitedURLs
- the trackVisitedURLs to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |