ch.aplu.util
Class HtmlPane

java.lang.Object
  extended by ch.aplu.util.HtmlPane

public class HtmlPane
extends java.lang.Object


Constructor Summary
HtmlPane()
          Construct a HtmlPane with default size and position.
HtmlPane(Position position, Size size)
          Construct a HtmlPane with given position and size.
 
Method Summary
 void addExitListener(ExitListener exitListener)
          Register an ExitListener to get a notification when the close button is clicked.
 void addLinkListener(LinkListener listener)
          Registers a LinkListener to get events when clicked on a hyperlink.
static void browse(java.lang.String url)
          Calls the standard system browser
 void clear()
          Erase all text.
 void hide()
          Hide the console window.
 void insertText(java.lang.String text)
          Insert HTML formatted text.
 void insertUrl(java.lang.String htmlUrl)
          Insert HTML from given URL.
 boolean isDisposed()
          Return true, if the HtmlPane window was disposed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlPane

public HtmlPane()
Construct a HtmlPane with default size and position.


HtmlPane

public HtmlPane(Position position,
                Size size)
Construct a HtmlPane with given position and size.

Parameters:
position - a reference to a Position object
size - a reference to a Size object
See Also:
Position, Size
Method Detail

insertUrl

public void insertUrl(java.lang.String htmlUrl)
Insert HTML from given URL.

Parameters:
htmlUrl - must be a valid URL string like http://www.aplu.ch/index.html"

clear

public void clear()
Erase all text.


addExitListener

public void addExitListener(ExitListener exitListener)
Register an ExitListener to get a notification when the close button is clicked. After registering the automatic termination of the application is disabled. To terminate the application, System.exit() should be called.


hide

public void hide()
Hide the console window.


isDisposed

public boolean isDisposed()
Return true, if the HtmlPane window was disposed.


insertText

public void insertText(java.lang.String text)
Insert HTML formatted text. The old text is erased.


browse

public static void browse(java.lang.String url)
Calls the standard system browser

Parameters:
url - the URL of the WEB site, prefixed with http:// or not

addLinkListener

public void addLinkListener(LinkListener listener)
Registers a LinkListener to get events when clicked on a hyperlink.

Parameters:
listener - the listener to register