|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.webrenderer.event.BrowserAdapter
An abstract adapter class for receiving browser events. The methods in this class are empty. This exists as a convenience class for creating listener objects.
Extend this class to create a BrowserEvent listener and
override the methods for the events of interest. (If you implement the
BrowserListener interface, you have to define all of the methods
in it. This abstract class defines null methods for them all, so
you only have to define methods for events you require.)
Create a listener object using the extended class and then register it
with a browser using the browser's addBrowserListener method.
When a browser event occurs, the relevant method in the listener object is
invoked and the BrowserEvent is passed to it.
An example of using a BrowserAdapter on a IBrowserCanvas
called browser to listen for title change events can be achived by:
browser.addBrowserListener( new BrowserAdapter() {
public void onTitleChange( BrowserEvent e ) {
System.out.println( "Title Changed to: " + e.getTitle() );
}
});
| Constructor Summary | |
BrowserAdapter()
|
|
| Method Summary | |
void |
onBeforeNavigate(BrowserEvent e)
Invoked just before a URL begins to load. |
void |
onContextMenu(BrowserEvent e)
Invoked when user press right click button for context menu |
void |
onLinkChange(BrowserEvent e)
Invoked when the link message changes in a browser. |
void |
onLoadIntercept(BrowserEvent e)
Invoked before any load is commenced. |
void |
onNavigationCancelled(BrowserEvent e)
Invoked when the loading of a URL is prematurely stopped. |
void |
onTitleChange(BrowserEvent e)
Invoked when the title changes in a browser. |
void |
onURLChange(BrowserEvent e)
Invoked when the URL changes in a browser. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BrowserAdapter()
| Method Detail |
public void onLinkChange(BrowserEvent e)
BrowserListener
onLinkChange in interface BrowserListenerpublic void onURLChange(BrowserEvent e)
BrowserListener
onURLChange in interface BrowserListenerpublic void onTitleChange(BrowserEvent e)
BrowserListener
onTitleChange in interface BrowserListenerpublic void onBeforeNavigate(BrowserEvent e)
BrowserListenerBrowserEvent.getURL()
BrowserEvent.getPOSTData()
BrowserEvent.getTargetFrame()
BrowserEvent.getHeaders()
onBeforeNavigate in interface BrowserListenerpublic void onNavigationCancelled(BrowserEvent e)
BrowserListener
onNavigationCancelled in interface BrowserListenerpublic void onLoadIntercept(BrowserEvent e)
BrowserListener
onLoadIntercept in interface BrowserListenerpublic void onContextMenu(BrowserEvent e)
BrowserListener
onContextMenu in interface BrowserListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||