|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Composite org.eclipse.swt.browser.Browser
Instances of this class implement the browser user interface metaphor. It allows the user to visualize and navigate through HTML documents.
Note that although this class is a subclass of Composite
,
it does not make sense to set a layout on it.
IMPORTANT: This class is not intended to be subclassed.
Constructor Summary | |
Browser(Composite parent,
int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
Method Summary | |
void |
addLocationListener(LocationListener listener)
Adds the listener to receive events. |
void |
addProgressListener(ProgressListener listener)
Adds the listener to receive events. |
void |
addStatusTextListener(StatusTextListener listener)
Adds the listener to receive events. |
void |
addTitleListener(TitleListener listener)
Adds the listener to receive events. |
boolean |
back()
Navigate to the previous session history item. |
boolean |
forward()
Navigate to the next session history item. |
java.lang.String |
getUrl()
Returns the current URL. |
boolean |
isBackEnabled()
Returns true if the receiver can navigate to the
previous session history item, and false otherwise. |
boolean |
isForwardEnabled()
Returns true if the receiver can navigate to the
next session history item, and false otherwise. |
void |
refresh()
Refresh the current page. |
void |
removeLocationListener(LocationListener listener)
Removes the listener. |
void |
removeProgressListener(ProgressListener listener)
Removes the listener. |
void |
removeStatusTextListener(StatusTextListener listener)
Removes the listener. |
void |
removeTitleListener(TitleListener listener)
Removes the listener. |
boolean |
setText(java.lang.String html)
Renders HTML. |
boolean |
setUrl(java.lang.String url)
Loads a URL. |
void |
stop()
Stop any loading and rendering activity. |
Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, getChildren, getLayout, getTabList, layout, layout, setLayout, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Browser(Composite parent, int style)
The style value is either one of the style constants defined in
class SWT
which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those SWT
style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to construct
java.lang.IllegalArgumentException
- SWTException
- SWTError
- Widget.getStyle()
Method Detail |
public void addLocationListener(LocationListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public void addProgressListener(ProgressListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public void addStatusTextListener(StatusTextListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public void addTitleListener(TitleListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public boolean back()
true
if the operation was successful and false
otherwise
SWTException
- forward()
public boolean forward()
true
if the operation was successful and false
otherwise
SWTException
- back()
public boolean isBackEnabled()
true
if the receiver can navigate to the
previous session history item, and false
otherwise.
SWTException
- back()
public boolean isForwardEnabled()
true
if the receiver can navigate to the
next session history item, and false
otherwise.
SWTException
- forward()
public java.lang.String getUrl()
String
if there is no current URL
SWTException
- setUrl(java.lang.String)
public void refresh()
SWTException
- public void removeLocationListener(LocationListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public void removeProgressListener(ProgressListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public void removeStatusTextListener(StatusTextListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public void removeTitleListener(TitleListener listener)
listener
- the listener
java.lang.IllegalArgumentException
- SWTException
- public boolean setText(java.lang.String html)
The html parameter is Unicode encoded since it is a java String
.
As a result, the HTML meta tag charset should not be set. The charset is implied
by the String
itself.
html
- the HTML content to be rendered
java.lang.IllegalArgumentException
- SWTException
- setUrl(java.lang.String)
public boolean setUrl(java.lang.String url)
url
- the URL to be loaded
java.lang.IllegalArgumentException
- SWTException
- getUrl()
public void stop()
SWTException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |