Package org.htmlunit
Class WebWindowEvent
java.lang.Object
java.util.EventObject
org.htmlunit.WebWindowEvent
- All Implemented Interfaces:
Serializable
An event that will be fired when a WebWindow changes.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The content of the window has changed.static final int
A window has closed.static final int
A window has opened.Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionWebWindowEvent
(WebWindow webWindow, int type, Page oldPage, Page newPage) Creates an instance. -
Method Summary
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
OPEN
public static final int OPENA window has opened.- See Also:
-
CLOSE
public static final int CLOSEA window has closed.- See Also:
-
CHANGE
public static final int CHANGEThe content of the window has changed.- See Also:
-
-
Constructor Details
-
Method Details
-
equals
Returns true if the two objects are equal. -
hashCode
public int hashCode()Returns the hash code for this object. -
getOldPage
Returns the oldPage.- Returns:
- the page or null if the window has no page
-
getNewPage
Returns the oldPage.- Returns:
- the page or null if the window has no page
-
getWebWindow
Returns the web window that fired the event.- Returns:
- the web window that fired the event
-
toString
Returns a string representation of this event.- Overrides:
toString
in classEventObject
- Returns:
- a string representation of this event
-
getEventType
public int getEventType()- Returns:
- the event type
-