|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 BrowserListener
public void onURLChange(BrowserEvent e)
BrowserListener
onURLChange
in interface BrowserListener
public void onTitleChange(BrowserEvent e)
BrowserListener
onTitleChange
in interface BrowserListener
public void onBeforeNavigate(BrowserEvent e)
BrowserListener
BrowserEvent.getURL()
BrowserEvent.getPOSTData()
BrowserEvent.getTargetFrame()
BrowserEvent.getHeaders()
onBeforeNavigate
in interface BrowserListener
public void onNavigationCancelled(BrowserEvent e)
BrowserListener
onNavigationCancelled
in interface BrowserListener
public void onLoadIntercept(BrowserEvent e)
BrowserListener
onLoadIntercept
in interface BrowserListener
public 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 |