com.webrenderer.event
Class BrowserEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.webrenderer.event.BrowserEvent
All Implemented Interfaces:
java.io.Serializable

public class BrowserEvent
extends java.util.EventObject

An event which indicates that there has been a change in some areas of the browser. Currently, a 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.

See Also:
BrowserListener, Serialized Form

Constructor Summary
BrowserEvent(java.lang.Object source)
          Constructor for BrowserEvent with a source.
 
Method Summary
 void blockLoad()
          Set a flag to block loading.
 boolean getBlockLoad()
          Get the current block status.
 java.lang.String getHeaders()
          Gets the request headers.
 java.lang.String getLink()
          Gets the link message.
 java.lang.String getPOSTData()
          Gets the post data.
 java.lang.String getTargetFrame()
          Get the target frame name.
 java.lang.String getTitle()
          Get the title.
 int getTransactionId()
          Get the transaction ID.
 java.lang.String getURL()
          Get the URL.
 int getX()
          Returns the x.
 int getY()
          Returns the y.
 void setHeaders(java.lang.String string)
          Set the request headers.
 void setLink(java.lang.String link)
          Set the link message.
 void setPOSTData(java.lang.String string)
           
 void setTargetFrame(java.lang.String string)
          Set the name of the target frame.
 void setTitle(java.lang.String title)
          Set the title.
 void setTransactionId(int i)
          Set the transaction ID.
 void setURL(java.lang.String url)
          Set the URL.
 void setX(int x)
          Sets the x position
 void setY(int y)
          Sets the y position.
 void unBlockLoad()
          Unblock the loading.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BrowserEvent

public BrowserEvent(java.lang.Object source)
Constructor for BrowserEvent with a source. The URL, title, and link fields are initialised to null.

Parameters:
source -
See Also:
EventObject.EventObject(Object)
Method Detail

getURL

public java.lang.String getURL()
Get the URL.

Returns:
the URL or null

see availability of return values in BrowserListener

See Also:
getURL()

setURL

public void setURL(java.lang.String url)
Set the URL. This should only be used for constructing new events.

Parameters:
url - The URL.
See Also:
getURL()

getTitle

public java.lang.String getTitle()
Get the title.

Returns:
the title, or null.

see availability of return values in BrowserListener

See Also:
setTitle(String)

setTitle

public void setTitle(java.lang.String title)
Set the title. This should only be used for constructing new events.

Parameters:
title - The title.

getLink

public java.lang.String getLink()
Gets the link message.

Returns:
the link message, or null

see availability of return values in BrowserListener


getPOSTData

public java.lang.String getPOSTData()
Gets the post data.

Returns:
the post data, or null

see availability of return values in BrowserListener


getHeaders

public java.lang.String getHeaders()
Gets the request headers.

Returns:
the request headers, or null

see availability of return values in BrowserListener


setLink

public void setLink(java.lang.String link)
Set the link message. This should only be used for constructing new events.

Parameters:
link - The link message.

getTargetFrame

public java.lang.String getTargetFrame()
Get the target frame name.

Returns:
the Target Frame Name

blockLoad

public void blockLoad()
Set a flag to block loading. When called from onLoadIntercept allows the stop of a load before it starts

See Also:
unBlockLoad()

unBlockLoad

public void unBlockLoad()
Unblock the loading.

See Also:
blockLoad()

getBlockLoad

public boolean getBlockLoad()
Get the current block status.

Returns:
the current status of load blocking.
See Also:
unBlockLoad(), blockLoad()

setHeaders

public void setHeaders(java.lang.String string)
Set the request headers.

Parameters:
string - the new request headers.

setPOSTData

public void setPOSTData(java.lang.String string)
Parameters:
string -
See Also:
#setPostData(String)

setTargetFrame

public void setTargetFrame(java.lang.String string)
Set the name of the target frame.

Parameters:
string - the target frame.

getX

public int getX()
Returns the x.

Returns:
int

getY

public int getY()
Returns the y.

Returns:
int

setX

public void setX(int x)
Sets the x position

Parameters:
x - the x position.

setY

public void setY(int y)
Sets the y position.

Parameters:
y - the y position.

getTransactionId

public int getTransactionId()
Get the transaction ID. Used to link a BrowserEvent.onBeforeNavigate to a NetowrkEvent.onHTTPResponse

Returns:
Transaction ID
See Also:
setTransactionId(int)

setTransactionId

public void setTransactionId(int i)
Set the transaction ID.

Parameters:
i - the transaction ID.
See Also:
getTransactionId()