All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ice.htmlbrowser.Browser

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----ice.htmlbrowser.Document
                                   |
                                   +----ice.htmlbrowser.Browser

public class Browser
extends Document
Browser is just a Document with additional functionality such as history and html source caching. Additional methods to control this functionality are provided. The Browser class is an implemenation of an HTML file browser using the ICE Browser package. It provides caching (memory only) of the HTML documents. It can be either imported directly into an application or used as a JavaBean.

Note that you can execute the demonstration of the Browser class from the command prompt as it includes main() method.

Version:
4.01
Author:
Jeremy Cook, Alexey Goloshubin

Constructor Index

 o Browser()
Create a new Browser component

Method Index

 o clearCache()
Clear all cached html sources and all cached applets
 o getCacheSize()
Get the internal HTML document cache size.
 o goBack()
Go to the previous document in the history stack.
 o goForward()
Go to the next document in the history stack.
 o gotoLocation(String, String, String)
Load a new HTML document.
 o main(String[])
 o reload()
Reload the current document.
 o setCacheSize(int)
Set the internal HTML document cache size.
 o setCurrentLocation(String)
Load a new HTML document.

Constructors

 o Browser
 public Browser()
Create a new Browser component

Methods

 o main
 public static void main(String args[])
 o setCacheSize
 public void setCacheSize(int size)
Set the internal HTML document cache size. The cache is pruned if it's size exceede the cacheSize property. The default cache size is 1MB.

 o getCacheSize
 public int getCacheSize()
Get the internal HTML document cache size. The cache is pruned if it's size exceede the cacheSize property. The default cache size is 1MB.

 o gotoLocation
 public void gotoLocation(String loc,
                          String targetFrame,
                          String outputString)
Load a new HTML document. This overrides the default gotoLocation() method in Document by adding history and cache management.

Overrides:
gotoLocation in class Document
 o setCurrentLocation
 public void setCurrentLocation(String loc)
Load a new HTML document. This overrides the default gotoLocation() method in Document by adding history and cache management.

Overrides:
setCurrentLocation in class Document
 o goBack
 public void goBack()
Go to the previous document in the history stack.

 o goForward
 public void goForward()
Go to the next document in the history stack.

 o reload
 public void reload()
Reload the current document. If the document has been cached, it is removed from cache and is fully reloaded. Applets of the current document are restarted.

Overrides:
reload in class Document
 o clearCache
 public void clearCache()
Clear all cached html sources and all cached applets

Overrides:
clearCache in class Document

All Packages  Class Hierarchy  This Package  Previous  Next  Index