Package org.htmlunit
Class WebWindowEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.htmlunit.WebWindowEvent
-
- All Implemented Interfaces:
java.io.Serializable
public final class WebWindowEvent extends java.util.EventObject
An event that will be fired when a WebWindow changes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WebWindowEvent(WebWindow webWindow, int type, Page oldPage, Page newPage)
Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Returns true if the two objects are equal.int
getEventType()
Page
getNewPage()
Returns the oldPage.Page
getOldPage()
Returns the oldPage.WebWindow
getWebWindow()
Returns the web window that fired the event.int
hashCode()
Returns the hash code for this object.private static boolean
isEqual(java.lang.Object object1, java.lang.Object object2)
java.lang.String
toString()
Returns a string representation of this event.
-
-
-
Field Detail
-
oldPage_
private final Page oldPage_
-
newPage_
private final Page newPage_
-
type_
private final int type_
-
OPEN
public static final int OPEN
A window has opened.- See Also:
- Constant Field Values
-
CLOSE
public static final int CLOSE
A window has closed.- See Also:
- Constant Field Values
-
CHANGE
public static final int CHANGE
The content of the window has changed.- See Also:
- Constant Field Values
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
Returns true if the two objects are equal.- Overrides:
equals
in classjava.lang.Object
- Parameters:
object
- the object to compare against- Returns:
- true if the two objects are equal
-
hashCode
public int hashCode()
Returns the hash code for this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the hash code for this object
-
getOldPage
public Page getOldPage()
Returns the oldPage.- Returns:
- the page or null if the window has no page
-
getNewPage
public Page getNewPage()
Returns the oldPage.- Returns:
- the page or null if the window has no page
-
getWebWindow
public WebWindow getWebWindow()
Returns the web window that fired the event.- Returns:
- the web window that fired the event
-
isEqual
private static boolean isEqual(java.lang.Object object1, java.lang.Object object2)
-
toString
public java.lang.String toString()
Returns a string representation of this event.- Overrides:
toString
in classjava.util.EventObject
- Returns:
- a string representation of this event
-
getEventType
public int getEventType()
- Returns:
- the event type
-
-