public class HtmlPane extends java.lang.Object implements LinkListener
Constructor and Description |
---|
HtmlPane()
Construct a HtmlPane with default size and position.
|
HtmlPane(Position position,
Size size)
Construct a HtmlPane with given position and size.
|
Modifier and Type | Method and Description |
---|---|
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 |
dispose() |
static void |
disposeAll()
Release all used system resources
of all currently openend HtmlPane windows.
|
static int |
getInstanceCount()
Returns the number of HtmlPane instances.
|
void |
hide()
Hide the console window.
|
void |
insertFile(java.lang.String filename)
Insert HTML formatted text from the given file.
|
void |
insertResource(java.lang.String filename)
Insert HTML formatted text from the given file in a JAR resource.
|
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.
|
void |
linkClicked(java.lang.String url)
Invoked when a link is clicked in a HtmlPane.
|
void |
setTitle(java.lang.String title)
Show the given title in the title bar.
|
public void insertText(java.lang.String text)
text
- the html text to showpublic void insertResource(java.lang.String filename)
filename
- the path of the JAR resource text file relative to the
application rootpublic void insertFile(java.lang.String filename)
filename
- the qualified or relative path to the html text filepublic void insertUrl(java.lang.String htmlUrl)
htmlUrl
- an URL string like http://www.aplu.ch/index.html" to
the html text filepublic void setTitle(java.lang.String title)
title
- the new title to showpublic void clear()
public void addExitListener(ExitListener exitListener)
exitListener
- the ExitListener to registerpublic void hide()
public boolean isDisposed()
public static void browse(java.lang.String url)
url
- the URL of the WEB site, prefixed with http:// or notpublic void addLinkListener(LinkListener listener)
listener
- the LinkListener to registerpublic void linkClicked(java.lang.String url)
LinkListener
linkClicked
in interface LinkListener
public void dispose()
public static int getInstanceCount()
public static void disposeAll()