All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vnr.awt.HTMLViewer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JPanel
                                   |
                                   +----vnr.awt.HTMLViewer

public class HTMLViewer
extends JPanel
implements HyperlinkListener
A JPanel subclass that has as its only child a JEditorPane to view HTML URLs. This class takes care of loading of new pages when links are selected


Constructor Index

 o HTMLViewer(URL)
Create a HTMLViewer, viewing a given URL

Method Index

 o getStatus()
 o getViewer()
 o hyperlinkUpdate(HyperlinkEvent)
if they've pressed a link, and it's activated, then call the linkActivated method
 o linkActivated(URL)
Follows the reference in a link.
 o setStatus(StatusBar)
 o setViewer(JEditorPane)

Constructors

 o HTMLViewer
 public HTMLViewer(URL u)
Create a HTMLViewer, viewing a given URL

Methods

 o hyperlinkUpdate
 public void hyperlinkUpdate(HyperlinkEvent e)
if they've pressed a link, and it's activated, then call the linkActivated method

 o linkActivated
 public void linkActivated(URL u)
Follows the reference in a link. The given url is the requested reference. By default this calls setPage, and if an exception is thrown the original previous document is restored and a beep sounded. If an attempt was made to follow a link, but it represented a malformed url, this method will be called with a null argument.

Parameters:
u - the URL to follow
 o getViewer
 public JEditorPane getViewer()
 o setViewer
 public void setViewer(JEditorPane $3)
 o getStatus
 public StatusBar getStatus()
 o setStatus
 public void setStatus(StatusBar $4)

All Packages  Class Hierarchy  This Package  Previous  Next  Index