com.webrenderer.event
Class JavascriptEvent

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

public class JavascriptEvent
extends java.util.EventObject

An event which indicates that there has been a change to Javascript. Currently, a JavascriptEvent will be invoked if a Javascript status message arises.

To reduce the cost of multiple method invocations, the event object will record only the new data pertaining to the event.

See Also:
Serialized Form

Constructor Summary
JavascriptEvent(java.lang.Object source)
          Constructor for JavascriptEvent with a source.
 
Method Summary
 void blockDialog()
          This method blocks Javascript dialogs if called inside onJavaScriptDialog() event handler
 boolean getBlockDialog()
          Gets the blocked status of Javascript dialogs.
 java.lang.String getCaption()
          Gets the caption.
 java.lang.String getJavascriptStatus()
          Gets the Javascript status message.
 java.lang.String getMessage()
          Gets the message.
 void setCaption(java.lang.String newCaption)
          Sets the caption.
 void setJavascriptStatus(java.lang.String newStatus)
          Set the Javascript status message.
 void setMessage(java.lang.String newMessage)
          Sets the message.
 
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

JavascriptEvent

public JavascriptEvent(java.lang.Object source)
Constructor for JavascriptEvent with a source. The status message is initialised to null.

Parameters:
source - The source of the event
Method Detail

setJavascriptStatus

public void setJavascriptStatus(java.lang.String newStatus)
Set the Javascript status message. This should only be used for constructing new events.

Parameters:
newStatus - The Javascript status message.

getJavascriptStatus

public java.lang.String getJavascriptStatus()
Gets the Javascript status message. This could be null. The status message indicates the current action being taken by the component (for example, the page currently being loaded).

Returns:
Status string. This string may be empty or null if there is no status data available.

blockDialog

public void blockDialog()
This method blocks Javascript dialogs if called inside onJavaScriptDialog() event handler


getBlockDialog

public boolean getBlockDialog()
Gets the blocked status of Javascript dialogs.

Returns:
true if dialogs are blocked.

getCaption

public java.lang.String getCaption()
Gets the caption.

Returns:
the caption.

setCaption

public void setCaption(java.lang.String newCaption)
Sets the caption.

Parameters:
newCaption - caption

getMessage

public java.lang.String getMessage()
Gets the message.

Returns:
the message.

setMessage

public void setMessage(java.lang.String newMessage)
Sets the message.

Parameters:
newMessage - the message.