public class BrowserEvent extends EventObject
BrowserEvent
encapsulates:
To reduce the cost of multiple method invocations, the event object will record the new data pertaining to the event. The object will only contain the data required for the given event. This implies that if the event was generated due to a URL change, then the title and link information will be invalid.
If a function is not appropriate/available for the situation from which it is being
called, it will return null
.
To clarify the meaning of a link message, these occur when the users mouse passes over a HTML link. The message passed back is usually the url the link is pointing to, unless modified via scripting.
BrowserListener
,
Serialized Formsource
Constructor and Description |
---|
BrowserEvent(Object source)
Constructor for BrowserEvent with a source.
|
Modifier and Type | Method and Description |
---|---|
void |
blockLoad()
Set a flag to block loading.
|
boolean |
getBlockLoad()
Get the current block status.
|
BufferedImage |
getFavicon()
Get the favicon.
|
String |
getHeaders()
Gets the request headers.
|
String |
getLink()
Gets the link message.
|
String |
getPOSTData()
Gets the post data.
|
String |
getTargetFrame()
Get the target frame name.
|
String |
getTitle()
Get the title.
|
String |
getURL()
Get the URL.
|
boolean |
isTopFrame()
Return if this load is the top frame.
|
void |
setFavicon(BufferedImage favicon) |
void |
setHeaders(String string)
Set the request headers.
|
void |
setLink(String link)
Set the link message.
|
void |
setPOSTData(String string) |
void |
setTargetFrame(String string)
Set the name of the target frame.
|
void |
setTitle(String title)
Set the title.
|
void |
setTopFrame(boolean topFrame) |
void |
setURL(String url)
Set the URL.
|
void |
unBlockLoad()
Unblock the loading.
|
getSource, toString
public BrowserEvent(Object source)
null
.source
- EventObject.EventObject(Object)
public String getURL()
null
see availability of return values in BrowserListener
getURL()
public void setURL(String url)
url
- The URL.getURL()
public String getTitle()
null
.
see availability of return values in BrowserListener
setTitle(String)
public void setTitle(String title)
title
- The title.public String getLink()
null
see availability of return values in BrowserListener
public String getPOSTData()
null
see availability of return values in BrowserListener
public String getHeaders()
null
see availability of return values in BrowserListener
public void setLink(String link)
link
- The link message.public String getTargetFrame()
public void blockLoad()
unBlockLoad()
public void unBlockLoad()
blockLoad()
public boolean getBlockLoad()
unBlockLoad()
,
blockLoad()
public void setHeaders(String string)
string
- the new request headers.public void setPOSTData(String string)
string
- public void setTargetFrame(String string)
string
- the target frame.public BufferedImage getFavicon()
public void setFavicon(BufferedImage favicon)
public boolean isTopFrame()
public void setTopFrame(boolean topFrame)